118
118
if not view_id and context.get('invoice_type', False):
119
119
mod_obj = self.pool.get('ir.model.data')
120
120
if context.get('invoice_type') in ('out_invoice', 'out_refund'):
121
result = mod_obj._get_id(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
121
result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
123
result = mod_obj._get_id(cr, uid, 'account_voucher', 'view_vendor_payment_form')
124
result = mod_obj.read(cr, uid, [result], ['res_id'], context=context)[0]['res_id']
123
result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form')
126
126
res = super(account_voucher, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
127
127
doc = etree.XML(res['arch'])