Wizardform optimiert
This commit is contained in:
parent
953bf248a4
commit
e3887debe9
3 changed files with 21 additions and 32 deletions
|
@ -1294,6 +1294,10 @@ msgctxt "view:cashbook.enterbooking.start:"
|
|||
msgid "Description"
|
||||
msgstr "Beschreibung"
|
||||
|
||||
msgctxt "view:cashbook.enterbooking.start:"
|
||||
msgid "Booking"
|
||||
msgstr "Buchung"
|
||||
|
||||
msgctxt "field:cashbook.enterbooking.start,cashbook:"
|
||||
msgid "Cashbook"
|
||||
msgstr "Kassenbuch"
|
||||
|
@ -1302,10 +1306,6 @@ msgctxt "field:cashbook.enterbooking.start,cashbooks:"
|
|||
msgid "Cashbooks"
|
||||
msgstr "Kassenbücher"
|
||||
|
||||
msgctxt "field:cashbook.enterbooking.start,balance:"
|
||||
msgid "Balance"
|
||||
msgstr "Saldo"
|
||||
|
||||
msgctxt "field:cashbook.enterbooking.start,currency_digits:"
|
||||
msgid "Currency Digits"
|
||||
msgstr "Nachkommastellen Währung"
|
||||
|
|
|
@ -5,27 +5,28 @@ full copyright notices and license terms. -->
|
|||
<form col="2">
|
||||
<label name="cashbook"/>
|
||||
<field name="cashbook" widget="selection"/>
|
||||
<label name="balance"/>
|
||||
<field name="balance" symbol="currency"/>
|
||||
|
||||
<label name="bookingtype"/>
|
||||
<field name="bookingtype"/>
|
||||
<label name="amount"/>
|
||||
<field name="amount" symbol="currency"/>
|
||||
<label name="category"/>
|
||||
<field name="category"/>
|
||||
<label name="booktransf"/>
|
||||
<field name="booktransf"/>
|
||||
<label name="party"/>
|
||||
<field name="party"/>
|
||||
<group name="description" colspan="2" col="1" string="Description">
|
||||
<field name="description"/>
|
||||
</group>
|
||||
<notebook colspan="2">
|
||||
<page id="general" string="Booking" col="2">
|
||||
<label name="bookingtype"/>
|
||||
<field name="bookingtype"/>
|
||||
<label name="amount"/>
|
||||
<field name="amount" symbol="currency"/>
|
||||
<label name="category"/>
|
||||
<field name="category"/>
|
||||
<label name="booktransf"/>
|
||||
<field name="booktransf"/>
|
||||
<label name="party"/>
|
||||
<field name="party"/>
|
||||
</page>
|
||||
<page id="descr" string="Description" col="1">
|
||||
<field name="description"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
<field name="cashbooks"/>
|
||||
<field name="currency_digits"/>
|
||||
<field name="currency"/>
|
||||
<field name="owner_cashbook"/>
|
||||
|
||||
</form>
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue