konfig: kassenbuch-default für buchungswizard
buchungswizard: ok + test
This commit is contained in:
parent
25db274d2d
commit
a2cb2b308b
8 changed files with 377 additions and 12 deletions
|
@ -15,6 +15,9 @@ field_done = fields.Boolean(string='Done',
|
|||
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.')
|
||||
field_defbook = fields.Many2One(string='Default Cashbook',
|
||||
help='The default cashbook is selected when you open the booking wizard.',
|
||||
model_name='cashbook.book', ondelete='SET NULL')
|
||||
|
||||
|
||||
class Configuration(ModelSingleton, ModelSQL, ModelView, UserMultiValueMixin):
|
||||
|
@ -36,6 +39,7 @@ class Configuration(ModelSingleton, ModelSQL, ModelView, UserMultiValueMixin):
|
|||
checked = fields.MultiValue(field_checked)
|
||||
done = fields.MultiValue(field_done)
|
||||
catnamelong = fields.MultiValue(field_catnamelong)
|
||||
defbook = fields.MultiValue(field_defbook)
|
||||
|
||||
@classmethod
|
||||
def multivalue_model(cls, field):
|
||||
|
@ -44,7 +48,7 @@ class Configuration(ModelSingleton, ModelSQL, ModelView, UserMultiValueMixin):
|
|||
pool = Pool()
|
||||
|
||||
if field in ['date_from', 'date_to', 'checked', 'done',
|
||||
'catnamelong']:
|
||||
'catnamelong', 'defbook']:
|
||||
return pool.get('cashbook.configuration_user')
|
||||
return super(Configuration, cls).multivalue_model(field)
|
||||
|
||||
|
@ -82,6 +86,7 @@ class UserConfiguration(ModelSQL, UserValueMixin):
|
|||
checked = field_checked
|
||||
done = field_done
|
||||
catnamelong = field_catnamelong
|
||||
defbook = field_defbook
|
||||
|
||||
@classmethod
|
||||
def default_checked(cls):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue