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:
25f334f
)
ACCOUNT: pay only invoice if not in state draft
author
ced
<>
Mon, 19 Feb 2007 09:53:11 +0000
(09:53 +0000)
committer
ced
<>
Mon, 19 Feb 2007 09:53:11 +0000
(09:53 +0000)
bzr revid: ced-
83cb9e7954faa424d5b5d48669159c7a1b6da20d
addons/account/wizard/wizard_pay_invoice.py
patch
|
blob
|
history
diff --git
a/addons/account/wizard/wizard_pay_invoice.py
b/addons/account/wizard/wizard_pay_invoice.py
index
807a6eb
..
da578d2
100644
(file)
--- a/
addons/account/wizard/wizard_pay_invoice.py
+++ b/
addons/account/wizard/wizard_pay_invoice.py
@@
-86,6
+86,8
@@
def _get_period(self, cr, uid, data, context={}):
if len(ids):
period_id = ids[0]
invoice = pool.get('account.invoice').browse(cr, uid, data['id'], context)
+ if invoice.state == 'draft':
+ raise wizard.except_wizard('Error !', 'Can not pay draft invoice.')
return {'period_id': period_id, 'amount': invoice.amount_total}
class wizard_pay_invoice(wizard.interface):