Merge lp:~openerp-dev/openobject-addons/trunk-bug-929373-mtr into lp:openobject-addons

Proposed by Meera Trambadia (OpenERP)
Status: Rejected
Rejected by: qdp (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-929373-mtr
Merge into: lp:openobject-addons
Diff against target: 19 lines (+5/-1)
1 file modified
sale/sale.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-929373-mtr
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+93167@code.launchpad.net

Description of the change

Sale: Paid(boolean) now works correctly if SO has more than one invoice in different states

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

code has been improved then merged in revision 6613.

Thanks

Unmerged revisions

6584. By Arif(arifmlpm)

[FIX] sale: Paid(boolean) now works correctly if SO has more than one invoice in different states

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2012-02-14 12:25:20 +0000
3+++ sale/sale.py 2012-02-15 09:56:09 +0000
4@@ -147,11 +147,15 @@
5 res = {}
6 for sale in self.browse(cursor, user, ids, context=context):
7 res[sale.id] = True
8+ invoices = []
9 for invoice in sale.invoice_ids:
10+ if invoice.state != 'cancel':
11+ invoices.append(invoice)
12+ for invoice in invoices:
13 if invoice.state != 'paid':
14 res[sale.id] = False
15 break
16- if not sale.invoice_ids:
17+ if not invoices:
18 res[sale.id] = False
19 return res
20

Subscribers

People subscribed via source and target branches

to all changes: