FIX the key in the context
Add a comment bzr revid: alexis@via.ecp.fr-20120804214800-ktq2yps1meefyx7x
This commit is contained in:
@@ -61,8 +61,12 @@ class stock_picking(osv.osv):
|
||||
if picking.purchase_id:
|
||||
invoice_vals['fiscal_position'] = picking.purchase_id.fiscal_position.id
|
||||
invoice_vals['payment_term'] = picking.purchase_id.payment_term.id
|
||||
# Fill the date_due on the invoice, for usability purposes.
|
||||
# Note that when an invoice with a payment term is validated, the
|
||||
# date_due is always recomputed from the invoice date and the payment
|
||||
# term.
|
||||
if picking.purchase_id.payment_term and context.get('date_inv'):
|
||||
invoice_vals['date_due'] = self.pool.get('account.invoice').onchange_payment_term_date_invoice(cr, uid, [], picking.purchase_id.payment_term.id, context.get('invoice_date'))['value'].get('date_due')
|
||||
invoice_vals['date_due'] = self.pool.get('account.invoice').onchange_payment_term_date_invoice(cr, uid, [], picking.purchase_id.payment_term.id, context.get('date_inv'))['value'].get('date_due')
|
||||
return invoice_vals
|
||||
|
||||
def get_currency_id(self, cursor, user, picking):
|
||||
|
||||
Reference in New Issue
Block a user