Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-opw-577521-port-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577521-port-mma/+merge/134892

Hello,

'Invoiced & Paid' field of Purchase Order marked as True, even though invoice 
is validated but not paid.

Code is Forward port from 6.0

Thanks
Mayur
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577521-port-mma/+merge/134892
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-opw-577521-port-mma.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2012-11-15 12:38:51 +0000
+++ purchase/purchase.py	2012-11-19 12:41:17 +0000
@@ -134,7 +134,10 @@
         for purchase in self.browse(cursor, user, ids, context=context):
             invoiced = False
             if purchase.invoiced_rate == 100.00:
-                invoiced = True
+                for invoice in purchase.invoice_ids
+                    invoiced = True
+                    if invoice.state != 'paid':
+                        invoiced = False
             res[purchase.id] = invoiced
         return res
     

_______________________________________________
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