diff --git a/addons/sale/sale.py b/addons/sale/sale.py index ccd53c47b25..0c9499ed558 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -489,7 +489,7 @@ class sale_order(osv.osv): # 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 + context['date_invoice'] = date_inv 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): diff --git a/addons/sale/wizard/sale_make_invoice.py b/addons/sale/wizard/sale_make_invoice.py index eb54d447013..d19bbd65331 100644 --- a/addons/sale/wizard/sale_make_invoice.py +++ b/addons/sale/wizard/sale_make_invoice.py @@ -32,7 +32,7 @@ class sale_make_invoice(osv.osv_memory): } _defaults = { 'grouped': False, - 'invoice_date': lambda *a:datetime.now().strftime('%Y-%m-%d %H:%M:%S') + 'invoice_date': lambda *a:datetime.now().strftime('%Y-%m-%d') } def view_init(self, cr, uid, fields_list, context=None):