c2c_correct_invoice, modify action => error if invoice without payment date

Bug #290712 reported by André Kurz (Hasa.ch)
2
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Joël Grand-Guillaume @ camptocamp

Bug Description

In the module c2c_correct_invoice, when we try to refund an invoice with the "modify action", the following error appears when an invoice is without payment term and date :

  File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/c2c_correct_invoice/c2c_wizard_refund.py", line 34, in _invoice_modify
    return self._compute_refund(cr, uid, data, 'modify', context)
  File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/c2c_correct_invoice/c2c_wizard_refund.py", line 170, in _compute_refund
    inv.write(cr, uid, [inv_id],data['value'])
KeyError: 'value'

The code of c2c_correct_invoice/c2c_wizard_refund could be corrected like that if I'm not wrong :

158 inv.write(cr, uid, [inv_id],data['value'])

with

158 if data:
159 inv.write(cr, uid, [inv_id],data['value'])

Changed in openobject-addons:
assignee: nobody → jgrandguillaume-c2c
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.