[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
This commit is contained in:
ARA (OpenERP) 2010-12-16 17:22:33 +05:30
parent 33e5e1a59d
commit b789c2e1e3
1 changed files with 3 additions and 3 deletions

View File

@ -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),