[FIX] sale_stock: payment_term in supplier invoice

When invoicing a supplier, this is the supplier payment term which
has to be taken into account.

opw:656307
This commit is contained in:
Goffin Simon 2015-11-16 19:07:09 +01:00
parent cf82f0fffc
commit e3b90ba1d4
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ class stock_picking(osv.osv):
def _get_invoice_vals(self, cr, uid, key, inv_type, journal_id, move, context=None):
inv_vals = super(stock_picking, self)._get_invoice_vals(cr, uid, key, inv_type, journal_id, move, context=context)
sale = move.picking_id.sale_id
if sale:
if sale and inv_type in ('out_invoice', 'out_refund'):
inv_vals.update({
'fiscal_position': sale.fiscal_position.id,
'payment_term': sale.payment_term.id,