[FIX] can not delete an analytic account having lines

bzr revid: fp@tinyerp.com-20121114143454-6bkldl0yk6ob8qmp
This commit is contained in:
Fabien Pinckaers 2012-11-14 15:34:54 +01:00
parent fdf9f920f0
commit 13f9de3d7c
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ class account_analytic_line(osv.osv):
'date': fields.date('Date', required=True, select=True),
'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]),
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='set null', select=True, domain=[('type','<>','view')]),
'user_id': fields.many2one('res.users', 'User'),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),