From b789c2e1e3595b5985a7dcdc52d02fcadfb197e1 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Thu, 16 Dec 2010 17:22:33 +0530 Subject: [PATCH] [FIX] account_analytic_line must not be deleted if the journal etc is deleted lp bug: https://launchpad.net/bugs/690753 fixed bzr revid: ara@tinyerp.com-20101216115233-b5oszgkb2oh7hkd6 --- addons/account/account_analytic_line.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 329eb59ab05..e55d36cbb94 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -31,9 +31,9 @@ class account_analytic_line(osv.osv): _columns = { 'product_uom_id': fields.many2one('product.uom', 'UoM'), 'product_id': fields.many2one('product.product', 'Product'), - 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='cascade'), - 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True), - 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True), + 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'), + 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='restrict', select=True), + 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True), 'code': fields.char('Code', size=8), 'ref': fields.char('Ref.', size=64), 'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),