Chandni Gandhi has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1102078-cga into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1102078 in OpenERP Addons: "Due date on supplier invoice won't be 
changed If we don't select the payment term"
  https://bugs.launchpad.net/openobject-addons/+bug/1102078

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1102078-cga/+merge/145134

Hello,

Return nothing when payment term is not define.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1102078-cga/+merge/145134
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1102078-cga.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2013-01-05 23:29:19 +0000
+++ account/account_invoice.py	2013-01-28 09:24:29 +0000
@@ -544,7 +544,7 @@
         if not date_invoice:
             date_invoice = time.strftime('%Y-%m-%d')
         if not payment_term_id:
-            return {'value':{'date_due': date_invoice}} #To make sure the invoice has a due date when no payment term 
+            return {} #To make sure the invoice has a due date when no payment term 
         pterm_list = self.pool.get('account.payment.term').compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
         if pterm_list:
             pterm_list = [line[0] for line in pterm_list]

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to