diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 8bab265ae3b..6f4d38685a6 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -475,7 +475,7 @@ class sale_order(osv.osv): return False return True - def action_invoice_create(self, cr, uid, ids, grouped=False, states=None, date_inv = False, context=None): + def action_invoice_create(self, cr, uid, ids, grouped=False, states=None, date_invoice = False, context=None): if states is None: states = ['confirmed', 'done', 'exception'] res = False @@ -488,8 +488,8 @@ class sale_order(osv.osv): context = {} # If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the # last day of the last month as invoice date - if date_inv: - context['date_inv'] = date_inv + if date_invoice: + context['date_invoice'] = date_invoice for o in self.browse(cr, uid, ids, context=context): currency_id = o.pricelist_id.currency_id.id if (o.partner_id.id in partner_currency) and (partner_currency[o.partner_id.id] <> currency_id):