summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorARA (OpenERP) <ara@tinyerp.com>2010-12-28 15:52:36 +0530
committerARA (OpenERP) <ara@tinyerp.com>2010-12-28 15:52:36 +0530
commit2d16e982e9e45785355dbd35c7741b0d94b3b95d (patch)
tree2355b926e66d63ec977308320e3fa081a265dff0
parenteece769abc150fa83185ec23c17c7c27488caf40 (diff)
[FIX]account: If you delete an invoice entry, invoice still exists
lp bug: https://launchpad.net/bugs/675494 fixed bzr revid: ara@tinyerp.com-20101228102236-anr2cd6aunkmfqui
-rw-r--r--addons/account/invoice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index a751e3fb7fc..f094e1c5f3b 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -246,7 +246,7 @@ class account_invoice(osv.osv):
'invoice_line': fields.one2many('account.invoice.line', 'invoice_id', 'Invoice Lines', readonly=True, states={'draft':[('readonly',False)]}),
'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),
- 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, help="Link to the automatically generated Journal Items."),
+ 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, ondelete='restrict', help="Link to the automatically generated Journal Items."),
'amount_untaxed': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Untaxed',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),