Wizardform optimiert
This commit is contained in:
parent
953bf248a4
commit
e3887debe9
3 changed files with 21 additions and 32 deletions
|
@ -28,9 +28,6 @@ class EnterBookingStart(ModelView):
|
|||
owner_cashbook = fields.Function(fields.Many2One(string='Owner', readonly=True,
|
||||
states={'invisible': True}, model_name='res.user'),
|
||||
'on_change_with_owner_cashbook')
|
||||
balance = fields.Numeric(string='Balance', readonly=True,
|
||||
digits=(16, Eval('currency_digits', 2)),
|
||||
depends=['currency_digits'])
|
||||
currency = fields.Function(fields.Many2One(string='Currency',
|
||||
model_name='currency.currency', states={'invisible': True}),
|
||||
'on_change_with_currency')
|
||||
|
@ -88,15 +85,6 @@ class EnterBookingStart(ModelView):
|
|||
if not self.bookingtype in types.get(self.category.cattype, ''):
|
||||
self.category = None
|
||||
|
||||
@fields.depends('cashbook', 'balance')
|
||||
def on_change_cashbook(self):
|
||||
""" get balance of selected cashbook
|
||||
"""
|
||||
if self.cashbook:
|
||||
self.balance = self.cashbook.balance
|
||||
else :
|
||||
self.balance = None
|
||||
|
||||
@fields.depends('cashbook', '_parent_cashbook.owner')
|
||||
def on_change_with_owner_cashbook(self, name=None):
|
||||
""" get current owner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue