projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
5656253
)
[MERGE] lp:929373. Courtesy of Arif
author
Quentin (OpenERP)
<qdp-launchpad@openerp.com>
Thu, 16 Feb 2012 16:52:53 +0000
(17:52 +0100)
committer
Quentin (OpenERP)
<qdp-launchpad@openerp.com>
Thu, 16 Feb 2012 16:52:53 +0000
(17:52 +0100)
bzr revid: qdp-launchpad@openerp.com-
20120216165253
-01d70hrlf8pmnn7x
addons/sale/sale.py
patch
|
blob
|
history
diff --git
a/addons/sale/sale.py
b/addons/sale/sale.py
index
99d2e49
..
82bfda7
100644
(file)
--- a/
addons/sale/sale.py
+++ b/
addons/sale/sale.py
@@
-147,11
+147,14
@@
class sale_order(osv.osv):
res = {}
for sale in self.browse(cursor, user, ids, context=context):
res[sale.id] = True
+ invoice_existence = False
for invoice in sale.invoice_ids:
- if invoice.state != 'paid':
- res[sale.id] = False
- break
- if not sale.invoice_ids:
+ if invoice.state!='cancel':
+ invoice_existence = True
+ if invoice.state != 'paid':
+ res[sale.id] = False
+ break
+ if not invoice_existence:
res[sale.id] = False
return res