next_payment_date [account_payment_discount_extension]

Bug #639645 reported by Thomas Dreiling
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openerp-openbig
Fix Released
Undecided
Unassigned

Bug Description

Calculation of next_payment_date in action_date_assign is based on current date instead of invoice date.

Revision history for this message
Thomas Dreiling (thomas-dreiling) wrote :
Changed in bigconsulting:
status: New → Fix Released
Revision history for this message
Thomas Dreiling (thomas-dreiling) wrote :

You did not fully implement the patch posted! The "relativedelta" part has to be changed, too. Otherwise, I get the following error:
  File "/home/thomdrei/workspace/addons/account_payment_discount_extension/account_payment_discount.py", line 53, in action_date_assign
    self.write(cr, uid, [inv.id], {'next_payment_date':(DateTime.strptime(inv.date_invoice, '%Y-%m-%d') + relativedelta(days=delay)).strftime('%Y-%m-%d')})
  File "/usr/lib/pymodules/python2.6/dateutil/relativedelta.py", line 247, in __radd__
    raise TypeError, "unsupported type for add operation"
TypeError: unsupported type for add operation
It has to be "DateTime.RelativeDateTime(days=delay)).strftime('%Y-%m-%d')"

Changed in bigconsulting:
status: Fix Released → New
Changed in bigconsulting:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.