[IMP] analytic,account_analytic_plans: analytic lines should only reference non-view analytic accounts
bzr revid: odo@openerp.com-20101210192751-wlic09qc88st2cra
This commit is contained in:
parent
f377b3696c
commit
acee5c69bc
|
@ -240,7 +240,7 @@ class account_analytic_plan_instance_line(osv.osv):
|
|||
_description = "Analytic Instance Line"
|
||||
_columns = {
|
||||
'plan_id': fields.many2one('account.analytic.plan.instance', 'Plan Id'),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, domain=[('type','<>','view')]),
|
||||
'rate': fields.float('Rate (%)', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
|
|
|
@ -206,7 +206,7 @@ class account_analytic_line(osv.osv):
|
|||
'date': fields.date('Date', required=True, select=1),
|
||||
'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),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', 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),
|
||||
|
||||
|
|
Loading…
Reference in New Issue