diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 14aabed86ad..ab6ad97b180 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1460,6 +1460,7 @@ class account_invoice_line(osv.osv): result = {} res = self.pool.get('product.product').browse(cr, uid, product, context=context) + result['name'] = res.partner_ref if type in ('out_invoice','out_refund'): a = res.property_account_income.id if not a: @@ -1474,19 +1475,21 @@ class account_invoice_line(osv.osv): if type in ('out_invoice', 'out_refund'): taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False) + if res.description_sale: + result['name'] += '\n'+res.description_sale else: taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False) + if res.description_purchase: + result['name'] += '\n'+res.description_purchase + tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes) if type in ('in_invoice', 'in_refund'): result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} ) else: result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id}) - result['name'] = res.partner_ref result['uos_id'] = uom_id or res.uom_id.id - if res.description: - result['name'] += '\n'+res.description domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]} diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index ce9a09def08..3940c1e5357 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -313,8 +313,8 @@ TSAJ sale - - + + @@ -323,8 +323,8 @@ TSCNJ sale_refund - - + + @@ -334,8 +334,8 @@ TEXJ purchase - - + + @@ -344,8 +344,8 @@ TECNJ purchase_refund - - + + @@ -355,8 +355,8 @@ TBNK bank - - + + @@ -365,8 +365,8 @@ TCHK bank - - + + @@ -374,9 +374,9 @@ Cash Journal - (test) TCSH cash - - - + + + - - + + @@ -403,8 +403,8 @@ TOEJ situation - - + + @@ -413,8 +413,8 @@ USD Bank Journal - (test) TUBK bank - - + +