exclude categorys 'accounting' equal True
This commit is contained in:
parent
a99a70fd1d
commit
0566d0d66f
@ -6,7 +6,7 @@ from sql.operators import Equal
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.model import (
|
||||
ModelView, ModelSQL, fields, Exclude)
|
||||
from trytond.pyson import If, Eval, Id
|
||||
from trytond.pyson import Bool, If, Eval, Id
|
||||
from trytond.exceptions import UserError
|
||||
|
||||
|
||||
@ -67,12 +67,14 @@ class Template(metaclass=PoolMeta):
|
||||
calibration = fields.Boolean("Apply calibration")
|
||||
observation = fields.Text('Observation')
|
||||
mark_category = fields.Many2One('product.category', 'Mark',
|
||||
domain=[('parent', '=', None)],
|
||||
domain=[('parent', '=', None),
|
||||
('accounting', '=', False)],
|
||||
states={'required': Eval('equipment', False)},
|
||||
depends=['equipment']
|
||||
)
|
||||
model_category = fields.Many2One('product.category', "Model",
|
||||
domain=[('parent', '=', Eval('mark_category'))],
|
||||
domain=[('parent', '=', Eval('mark_category')),
|
||||
('accounting', '=', False)],
|
||||
states={'required': Eval('equipment', False)},
|
||||
depends=['equipment']
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user