Merge lp:~camptocamp/openobject-addons/7.0-fix-due-date into lp:openobject-addons/7.0

Proposed by Nicolas Bessi - Camptocamp
Status: Rejected
Rejected by: Martin Trigaux (OpenERP)
Proposed branch: lp:~camptocamp/openobject-addons/7.0-fix-due-date
Merge into: lp:openobject-addons/7.0
Diff against target: 18 lines (+5/-3)
1 file modified
account/account_invoice.py (+5/-3)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/7.0-fix-due-date
Reviewer Review Type Date Requested Status
Lorenzo Battistini (community) Approve
Alexandre Fayolle - camptocamp (community) Approve
OpenERP Core Team Pending
Review via email: mp+154318@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM.

This is the change I'd like to see in trunk too, rather than the proposed one.

review: Approve
Revision history for this message
Lorenzo Battistini (elbati) :
review: Approve
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

for the record, this is merged on OCB

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hi!
I reject this one as we have integrated a fix to this problem at revision 9314 (cf bug report) but thanks for the patch.
Regards

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_invoice.py'
2--- account/account_invoice.py 2013-03-15 13:01:47 +0000
3+++ account/account_invoice.py 2013-03-20 14:05:30 +0000
4@@ -760,9 +760,11 @@
5
6 def action_date_assign(self, cr, uid, ids, *args):
7 for inv in self.browse(cr, uid, ids):
8- res = self.onchange_payment_term_date_invoice(cr, uid, inv.id, inv.payment_term.id, inv.date_invoice)
9- if res and res['value']:
10- self.write(cr, uid, [inv.id], res['value'])
11+ if not inv.date_due:
12+ res = self.onchange_payment_term_date_invoice(cr, uid, inv.id,
13+ inv.payment_term.id, inv.date_invoice)
14+ if res and res['value']:
15+ self.write(cr, uid, [inv.id], res['value'])
16 return True
17
18 def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):