[FIX] stock_account: VAT issue

In the case of a move from an out_invoice not linked to a sale order, the customer taxes set on
the product of this move must be taken into account to create the customer invoice line.

opw:645879
This commit is contained in:
Goffin Simon 2015-07-31 14:42:21 +02:00
parent bac0c395ae
commit a6831546c1
1 changed files with 2 additions and 0 deletions

View File

@ -424,6 +424,8 @@ class stock_move(osv.osv):
fp = move.picking_id.sale_id.fiscal_position
res = self.pool.get("account.invoice.line").product_id_change(cr, uid, [], move.product_id.id, None, partner_id=move.picking_id.partner_id.id, fposition_id=(fp and fp.id), context=context)
extra_move_tax[0, move.product_id] = [(6, 0, res['value']['invoice_line_tax_id'])]
else:
extra_move_tax[0, move.product_id] = [(6, 0, [x.id for x in move.product_id.product_tmpl_id.taxes_id])]
return (is_extra_move, extra_move_tax)
def _get_taxes(self, cr, uid, move, context=None):