From 663e7bb531aa5f48c9356487481ad33091ffcf89 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 11 Jun 2015 11:39:14 +0200 Subject: [PATCH] [FIX] stock_account: refund Invoices of type refund should be considered. --- addons/stock_account/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock_account/stock.py b/addons/stock_account/stock.py index de3b8c8a192..12c806367d5 100644 --- a/addons/stock_account/stock.py +++ b/addons/stock_account/stock.py @@ -323,8 +323,8 @@ class stock_picking(osv.osv): if is_extra_move[move.id] and (invoice_line_vals['product_id'], invoice_line_vals['uos_id']) in product_price_unit: invoice_line_vals['price_unit'] = product_price_unit[invoice_line_vals['product_id'], invoice_line_vals['uos_id']] if is_extra_move[move.id]: - desc = (inv_type == 'out_invoice' and move.product_id.product_tmpl_id.description_sale) or \ - (inv_type == 'in_invoice' and move.product_id.product_tmpl_id.description_purchase) + desc = (inv_type in ('out_invoice', 'out_refund') and move.product_id.product_tmpl_id.description_sale) or \ + (inv_type in ('in_invoice','in_refund') and move.product_id.product_tmpl_id.description_purchase) invoice_line_vals['name'] += ' ' + desc if desc else '' if extra_move_tax[move.picking_id, move.product_id]: invoice_line_vals['invoice_line_tax_id'] = extra_move_tax[move.picking_id, move.product_id]