Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-bug-928899-rha into 
lp:openobject-addons/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)
Related bugs:
  Bug #928899 in OpenERP Addons: "[v6.x] [account] _reconciled method for 
account.invoice method does not take into account the invoice state 'paid' when 
the result is False"
  https://bugs.launchpad.net/openobject-addons/+bug/928899

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-928899-rha/+merge/92975

Hello,

_reconciled method for account.invoice method does not take into account the 
invoice state 'paid' when the result is False so invoice remains paid, not open.

Kindly review it.

Regards,
Rifakat
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-928899-rha/+merge/92975
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-bug-928899-rha.
=== modified file 'account/invoice.py'
--- account/invoice.py	2012-02-10 17:06:29 +0000
+++ account/invoice.py	2012-02-14 13:18:48 +0000
@@ -80,8 +80,11 @@
 
     def _reconciled(self, cr, uid, ids, name, args, context=None):
         res = {}
-        for id in ids:
-            res[id] = self.test_paid(cr, uid, [id])
+        wf_service = netsvc.LocalService("workflow")
+        for inv in self.browse(cr, uid, ids, context=context):
+            res[inv.id] = self.test_paid(cr, uid, [inv.id])
+            if not res[inv.id] and inv.state == 'paid':
+                wf_service.trg_validate(uid, 'account.invoice', inv.id, 'open_test', cr)
         return res
 
     def _get_reference_type(self, cr, uid, context=None):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to