line: balance-berechnung ausgelagert,
reconciliation: Feld 'feature'
This commit is contained in:
parent
e0a6d39bdb
commit
b809d51fe0
6 changed files with 57 additions and 26 deletions
|
@ -40,6 +40,8 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
|
|||
model_name='cashbook.book', ondelete='CASCADE', readonly=True)
|
||||
date = fields.Date(string='Date', required=True, select=True,
|
||||
states=STATES, depends=DEPENDS)
|
||||
feature = fields.Function(fields.Char(string='Feature', readonly=True,
|
||||
states={'invisible': True}), 'on_change_with_feature')
|
||||
|
||||
date_from = fields.Date(string='Start Date',
|
||||
required=True,
|
||||
|
@ -342,6 +344,13 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
|
|||
IrDate = Pool().get('ir.date')
|
||||
return IrDate.today()
|
||||
|
||||
@fields.depends('cashbook', '_parent_cashbook.btype')
|
||||
def on_change_with_feature(self, name=None):
|
||||
""" get feature-set
|
||||
"""
|
||||
if self.cashbook:
|
||||
return self.cashbook.btype.feature
|
||||
|
||||
@fields.depends('cashbook', '_parent_cashbook.id', 'date_from')
|
||||
def on_change_with_predecessor(self, name=None):
|
||||
""" get predecessor
|
||||
|
@ -366,7 +375,7 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
|
|||
|
||||
@fields.depends('cashbook', '_parent_cashbook.currency')
|
||||
def on_change_with_currency_digits(self, name=None):
|
||||
""" currency of cashbook
|
||||
""" currency-digits of cashbook
|
||||
"""
|
||||
if self.cashbook:
|
||||
return self.cashbook.currency.digits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue