projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da84f36
)
Bug fix - https://bugs.launchpad.net/openobject-addons/+bug/929373
author
arifmlpm@gmail.com
<>
Tue, 14 Feb 2012 12:56:53 +0000
(18:26 +0530)
committer
arifmlpm@gmail.com
<>
Tue, 14 Feb 2012 12:56:53 +0000
(18:26 +0530)
bzr revid: arifmlpm@gmail.com-
20120214125653
-05w3973ostuqpe5h
addons/sale/sale.py
patch
|
blob
|
history
diff --git
a/addons/sale/sale.py
b/addons/sale/sale.py
index
d2f3ffd
..
c65c552
100644
(file)
--- a/
addons/sale/sale.py
+++ b/
addons/sale/sale.py
@@
-147,11
+147,15
@@
class sale_order(osv.osv):
res = {}
for sale in self.browse(cursor, user, ids, context=context):
res[sale.id] = True
+ invoices = []
for invoice in sale.invoice_ids:
+ if invoice.state!='cancel':
+ invoices.append(invoice)
+ for invoice in invoices:
if invoice.state != 'paid':
res[sale.id] = False
break
- if not sale.invoice_ids:
+ if not invoices:
res[sale.id] = False
return res