Nehal Panchal (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-579389-nep into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579389-nep/+merge/126430

Hello,

Invoice date of Create Invoices wizard is not considered while creating 
invoices.

Steps to reproduce:
1. Create Sales Order and confirm it. 
2. Create Invoices through wizard and provide the Invoice date.

Provided date will not be shown in generated invoice. 

This fixes the issue.

Thanks


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579389-nep/+merge/126430
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-579389-nep.
=== modified file 'sale/sale.py'
--- sale/sale.py	2012-08-28 09:29:46 +0000
+++ sale/sale.py	2012-09-26 11:20:33 +0000
@@ -437,7 +437,7 @@
             'comment': order.note,
             'payment_term': order.payment_term and order.payment_term.id or False,
             'fiscal_position': order.fiscal_position.id or order.partner_id.property_account_position.id,
-            'date_invoice': context.get('date_invoice', False),
+            'date_invoice': context.get('date_inv', False),
             'company_id': order.company_id.id,
             'user_id': order.user_id and order.user_id.id or False
         }
@@ -537,7 +537,9 @@
             for o in self.browse(cr, uid, ids, context=context):
                 for i in o.invoice_ids:
                     if i.state == 'draft':
-                        return i.id
+                        if context:
+                            invoice.write(cr, uid, [i.id], {'date_invoice': context['date_inv']})
+                        continue
         for val in invoices.values():
             if grouped:
                 res = self._make_invoice(cr, uid, val[0][0], reduce(lambda x, y: x + y, [l for o, l in val], []), context=context)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to