Merge lp:~openerp-dev/openobject-addons/trunk-opw-579389-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Merged
Merge reported by: Fabien (Open ERP)
Merged at revision: not available
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-579389-port-mma
Merge into: lp:openobject-addons
Diff against target: 25 lines (+5/-2)
1 file modified
sale/sale.py (+5/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-579389-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+136633@code.launchpad.net

Description of the change

Hello,

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

Steps to reproduce:
1. Create Sales Order and confirm it.
2. open a list view and select that sale order now Create Invoice through make invoice wizard and provide the Invoice date.
     So Provided date will not be shown in generated invoice.

code is forward port from 6.1

Thanks,
Mayur

To post a comment you must log in.
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

applied another fix

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2012-11-26 15:51:39 +0000
3+++ sale/sale.py 2012-11-28 12:14:23 +0000
4@@ -366,7 +366,7 @@
5 'comment': order.note,
6 'payment_term': order.payment_term and order.payment_term.id or False,
7 'fiscal_position': order.fiscal_position.id or order.partner_id.property_account_position.id,
8- 'date_invoice': context.get('date_invoice', False),
9+ 'date_invoice': context.get('date_inv', False),
10 'company_id': order.company_id.id,
11 'user_id': order.user_id and order.user_id.id or False
12 }
13@@ -508,8 +508,11 @@
14 if not invoices:
15 for o in self.browse(cr, uid, ids, context=context):
16 for i in o.invoice_ids:
17+ date_inv = context.get('date_inv', False)
18 if i.state == 'draft':
19- return i.id
20+ if date_inv:
21+ invoice.write(cr, uid, [i.id], {'date_invoice': date_inv})
22+ continue
23 for val in invoices.values():
24 if grouped:
25 res = self._make_invoice(cr, uid, val[0][0], reduce(lambda x, y: x + y, [l for o, l in val], []), context=context)

Subscribers

People subscribed via source and target branches

to all changes: