formatting, indexes optimized
This commit is contained in:
parent
77ee7d15b7
commit
7220cff5ac
12 changed files with 124 additions and 126 deletions
|
@ -17,7 +17,8 @@ field_done = fields.Boolean(
|
|||
help='Show cashbook lines in Done-state.')
|
||||
field_catnamelong = fields.Boolean(
|
||||
string='Category: Show long name',
|
||||
help='Shows the long name of the category in the Category field of a cash book line.')
|
||||
help='Shows the long name of the category in the Category ' +
|
||||
'field of a cash book line.')
|
||||
|
||||
|
||||
class Configuration(ModelSingleton, ModelSQL, ModelView, UserMultiValueMixin):
|
||||
|
@ -29,60 +30,47 @@ class Configuration(ModelSingleton, ModelSQL, ModelView, UserMultiValueMixin):
|
|||
domain=[
|
||||
If(Eval('date_to') & Eval('date_from'),
|
||||
('date_from', '<=', Eval('date_to')),
|
||||
()),
|
||||
]))
|
||||
())]))
|
||||
date_to = fields.MultiValue(fields.Date(
|
||||
string='End Date', depends=['date_from'],
|
||||
domain=[
|
||||
If(Eval('date_to') & Eval('date_from'),
|
||||
('date_from', '<=', Eval('date_to')),
|
||||
()),
|
||||
]))
|
||||
())]))
|
||||
checked = fields.MultiValue(field_checked)
|
||||
done = fields.MultiValue(field_done)
|
||||
catnamelong = fields.MultiValue(field_catnamelong)
|
||||
defbook = fields.MultiValue(fields.Many2One(
|
||||
string='Default Cashbook',
|
||||
help='The default cashbook is selected when you open the booking wizard.',
|
||||
help='The default cashbook is selected when you open ' +
|
||||
'the booking wizard.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None), ('state', '=', 'open'),
|
||||
]))
|
||||
domain=[('btype', '!=', None), ('state', '=', 'open')]))
|
||||
book1 = fields.MultiValue(fields.Many2One(
|
||||
string='Cashbook 1',
|
||||
help='Cash book available in selection dialog.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None), ('state', '=', 'open'),
|
||||
]))
|
||||
domain=[('btype', '!=', None), ('state', '=', 'open')]))
|
||||
book2 = fields.MultiValue(fields.Many2One(
|
||||
string='Cashbook 2',
|
||||
help='Cash book available in selection dialog.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None), ('state', '=', 'open'),
|
||||
]))
|
||||
domain=[('btype', '!=', None), ('state', '=', 'open')]))
|
||||
book3 = fields.MultiValue(fields.Many2One(
|
||||
string='Cashbook 3',
|
||||
help='Cash book available in selection dialog.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None), ('state', '=', 'open'),
|
||||
]))
|
||||
domain=[('btype', '!=', None), ('state', '=', 'open')]))
|
||||
book4 = fields.MultiValue(fields.Many2One(
|
||||
string='Cashbook 4',
|
||||
help='Cash book available in selection dialog.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None), ('state', '=', 'open'),
|
||||
]))
|
||||
domain=[('btype', '!=', None), ('state', '=', 'open')]))
|
||||
book5 = fields.MultiValue(fields.Many2One(
|
||||
string='Cashbook 5',
|
||||
help='Cash book available in selection dialog.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None), ('state', '=', 'open'),
|
||||
]))
|
||||
domain=[('btype', '!=', None), ('state', '=', 'open')]))
|
||||
|
||||
@classmethod
|
||||
def multivalue_model(cls, field):
|
||||
|
@ -121,21 +109,20 @@ class UserConfiguration(ModelSQL, UserValueMixin):
|
|||
domain=[
|
||||
If(Eval('date_to') & Eval('date_from'),
|
||||
('date_from', '<=', Eval('date_to')),
|
||||
()),
|
||||
])
|
||||
())])
|
||||
date_to = fields.Date(
|
||||
string='End Date', depends=['date_from'],
|
||||
domain=[
|
||||
If(Eval('date_to') & Eval('date_from'),
|
||||
('date_from', '<=', Eval('date_to')),
|
||||
()),
|
||||
])
|
||||
())])
|
||||
checked = field_checked
|
||||
done = field_done
|
||||
catnamelong = field_catnamelong
|
||||
defbook = fields.Many2One(
|
||||
string='Default Cashbook',
|
||||
help='The default cashbook is selected when you open the booking wizard.',
|
||||
help='The default cashbook is selected when you open ' +
|
||||
'the booking wizard.',
|
||||
model_name='cashbook.book', ondelete='SET NULL',
|
||||
domain=[
|
||||
('btype', '!=', None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue