kassenbuchtyp: Feld 'feature'
This commit is contained in:
parent
db84bf7097
commit
82afd24c20
9 changed files with 68 additions and 0 deletions
9
book.py
9
book.py
|
@ -62,6 +62,8 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
|
|||
Len(Eval('lines')) > 0,
|
||||
),
|
||||
}, depends=DEPENDS+['lines'])
|
||||
feature = fields.Function(fields.Char(string='Feature', readonly=True,
|
||||
states={'invisible': True}), 'on_change_with_feature')
|
||||
owner = fields.Many2One(string='Owner', required=True, select=True,
|
||||
model_name='res.user', ondelete='SET NULL',
|
||||
states=STATES, depends=DEPENDS)
|
||||
|
@ -325,6 +327,13 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
|
|||
)
|
||||
return total
|
||||
|
||||
@fields.depends('btype')
|
||||
def on_change_with_feature(self, name=None):
|
||||
""" get feature-set
|
||||
"""
|
||||
if self.btype:
|
||||
return self.btype.feature
|
||||
|
||||
@fields.depends('currency')
|
||||
def on_change_with_currency_digits(self, name=None):
|
||||
""" currency of cashbook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue