cashbook: optimize for speed for checking rows
This commit is contained in:
parent
246f035417
commit
8c2fb8ed7c
1 changed files with 6 additions and 6 deletions
12
book.py
12
book.py
|
@ -32,8 +32,8 @@ class Book(SymbolMixin, metaclass=PoolMeta):
|
||||||
'invisible': Eval('feature', '') != 'asset',
|
'invisible': Eval('feature', '') != 'asset',
|
||||||
'readonly': Or(
|
'readonly': Or(
|
||||||
STATES2['readonly'],
|
STATES2['readonly'],
|
||||||
Len(Eval('lines')) > 0)},
|
Eval('has_lines', False))},
|
||||||
depends=DEPENDS2+['feature', 'lines'])
|
depends=DEPENDS2+['feature', 'has_lines'])
|
||||||
quantity_digits = fields.Integer(
|
quantity_digits = fields.Integer(
|
||||||
string='Digits', help='Quantity Digits',
|
string='Digits', help='Quantity Digits',
|
||||||
domain=[
|
domain=[
|
||||||
|
@ -44,8 +44,8 @@ class Book(SymbolMixin, metaclass=PoolMeta):
|
||||||
'invisible': Eval('feature', '') != 'asset',
|
'invisible': Eval('feature', '') != 'asset',
|
||||||
'readonly': Or(
|
'readonly': Or(
|
||||||
STATES2['readonly'],
|
STATES2['readonly'],
|
||||||
Len(Eval('lines')) > 0)},
|
Eval('has_lines', False))},
|
||||||
depends=DEPENDS2+['feature', 'lines'])
|
depends=DEPENDS2+['feature', 'has_lines'])
|
||||||
asset_uomcat = fields.Function(fields.Many2One(
|
asset_uomcat = fields.Function(fields.Many2One(
|
||||||
string='UOM Category', readonly=True,
|
string='UOM Category', readonly=True,
|
||||||
model_name='product.uom.category',
|
model_name='product.uom.category',
|
||||||
|
@ -59,8 +59,8 @@ class Book(SymbolMixin, metaclass=PoolMeta):
|
||||||
'invisible': Eval('feature', '') != 'asset',
|
'invisible': Eval('feature', '') != 'asset',
|
||||||
'readonly': Or(
|
'readonly': Or(
|
||||||
STATES2['readonly'],
|
STATES2['readonly'],
|
||||||
Len(Eval('lines')) > 0)},
|
Eval('has_lines', False))},
|
||||||
depends=DEPENDS2+['feature', 'lines', 'asset_uomcat'])
|
depends=DEPENDS2+['feature', 'asset_uomcat', 'has_lines'])
|
||||||
symbol = fields.Function(fields.Char(
|
symbol = fields.Function(fields.Char(
|
||||||
string='Symbol', readonly=True), 'on_change_with_symbol')
|
string='Symbol', readonly=True), 'on_change_with_symbol')
|
||||||
asset_symbol = fields.Function(fields.Many2One(
|
asset_symbol = fields.Function(fields.Many2One(
|
||||||
|
|
Loading…
Reference in a new issue