← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~hugosantosred/ocb-addons/7.0-bug-1279249 into lp:ocb-addons

 

Hugo Santos (Factorlibre) has proposed merging lp:~hugosantosred/ocb-addons/7.0-bug-1279249 into lp:ocb-addons.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1279249 in OpenERP Community Backports (Addons): "due date invoice"
  https://bugs.launchpad.net/ocb-addons/+bug/1279249

For more details, see:
https://code.launchpad.net/~hugosantosred/ocb-addons/7.0-bug-1279249/+merge/206689

Fixes bug https://bugs.launchpad.net/ocb-addons/+bug/1279249

Due date must always be calculated in order to update invoice with the new due date if invoice date is changed.
-- 
https://code.launchpad.net/~hugosantosred/ocb-addons/7.0-bug-1279249/+merge/206689
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~hugosantosred/ocb-addons/7.0-bug-1279249 into lp:ocb-addons.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2014-02-05 10:03:24 +0000
+++ account/account_invoice.py	2014-02-17 11:10:51 +0000
@@ -793,11 +793,10 @@
 
     def action_date_assign(self, cr, uid, ids, *args):
         for inv in self.browse(cr, uid, ids):
-            if not inv.date_due:
-                res = self.onchange_payment_term_date_invoice(cr, uid, inv.id,
-                                                              inv.payment_term.id, inv.date_invoice)
-                if res and res['value']:
-                    self.write(cr, uid, [inv.id], res['value'])
+            res = self.onchange_payment_term_date_invoice(cr, uid, inv.id,
+                                                          inv.payment_term.id, inv.date_invoice)
+            if res and res['value']:
+                self.write(cr, uid, [inv.id], res['value'])
         return True
 
     def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):


Follow ups