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"
|
msgid "Description"
|
||||||
msgstr "Beschreibung"
|
msgstr "Beschreibung"
|
||||||
|
|
||||||
|
msgctxt "view:cashbook.enterbooking.start:"
|
||||||
|
msgid "Booking"
|
||||||
|
msgstr "Buchung"
|
||||||
|
|
||||||
msgctxt "field:cashbook.enterbooking.start,cashbook:"
|
msgctxt "field:cashbook.enterbooking.start,cashbook:"
|
||||||
msgid "Cashbook"
|
msgid "Cashbook"
|
||||||
msgstr "Kassenbuch"
|
msgstr "Kassenbuch"
|
||||||
|
@ -1302,10 +1306,6 @@ msgctxt "field:cashbook.enterbooking.start,cashbooks:"
|
||||||
msgid "Cashbooks"
|
msgid "Cashbooks"
|
||||||
msgstr "Kassenbücher"
|
msgstr "Kassenbücher"
|
||||||
|
|
||||||
msgctxt "field:cashbook.enterbooking.start,balance:"
|
|
||||||
msgid "Balance"
|
|
||||||
msgstr "Saldo"
|
|
||||||
|
|
||||||
msgctxt "field:cashbook.enterbooking.start,currency_digits:"
|
msgctxt "field:cashbook.enterbooking.start,currency_digits:"
|
||||||
msgid "Currency Digits"
|
msgid "Currency Digits"
|
||||||
msgstr "Nachkommastellen Währung"
|
msgstr "Nachkommastellen Währung"
|
||||||
|
|
|
@ -5,27 +5,28 @@ full copyright notices and license terms. -->
|
||||||
<form col="2">
|
<form col="2">
|
||||||
<label name="cashbook"/>
|
<label name="cashbook"/>
|
||||||
<field name="cashbook" widget="selection"/>
|
<field name="cashbook" widget="selection"/>
|
||||||
<label name="balance"/>
|
|
||||||
<field name="balance" symbol="currency"/>
|
|
||||||
|
|
||||||
<label name="bookingtype"/>
|
<notebook colspan="2">
|
||||||
<field name="bookingtype"/>
|
<page id="general" string="Booking" col="2">
|
||||||
<label name="amount"/>
|
<label name="bookingtype"/>
|
||||||
<field name="amount" symbol="currency"/>
|
<field name="bookingtype"/>
|
||||||
<label name="category"/>
|
<label name="amount"/>
|
||||||
<field name="category"/>
|
<field name="amount" symbol="currency"/>
|
||||||
<label name="booktransf"/>
|
<label name="category"/>
|
||||||
<field name="booktransf"/>
|
<field name="category"/>
|
||||||
<label name="party"/>
|
<label name="booktransf"/>
|
||||||
<field name="party"/>
|
<field name="booktransf"/>
|
||||||
<group name="description" colspan="2" col="1" string="Description">
|
<label name="party"/>
|
||||||
<field name="description"/>
|
<field name="party"/>
|
||||||
</group>
|
</page>
|
||||||
|
<page id="descr" string="Description" col="1">
|
||||||
|
<field name="description"/>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
|
||||||
<field name="cashbooks"/>
|
<field name="cashbooks"/>
|
||||||
<field name="currency_digits"/>
|
<field name="currency_digits"/>
|
||||||
<field name="currency"/>
|
<field name="currency"/>
|
||||||
<field name="owner_cashbook"/>
|
<field name="owner_cashbook"/>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,6 @@ class EnterBookingStart(ModelView):
|
||||||
owner_cashbook = fields.Function(fields.Many2One(string='Owner', readonly=True,
|
owner_cashbook = fields.Function(fields.Many2One(string='Owner', readonly=True,
|
||||||
states={'invisible': True}, model_name='res.user'),
|
states={'invisible': True}, model_name='res.user'),
|
||||||
'on_change_with_owner_cashbook')
|
'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',
|
currency = fields.Function(fields.Many2One(string='Currency',
|
||||||
model_name='currency.currency', states={'invisible': True}),
|
model_name='currency.currency', states={'invisible': True}),
|
||||||
'on_change_with_currency')
|
'on_change_with_currency')
|
||||||
|
@ -88,15 +85,6 @@ class EnterBookingStart(ModelView):
|
||||||
if not self.bookingtype in types.get(self.category.cattype, ''):
|
if not self.bookingtype in types.get(self.category.cattype, ''):
|
||||||
self.category = None
|
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')
|
@fields.depends('cashbook', '_parent_cashbook.owner')
|
||||||
def on_change_with_owner_cashbook(self, name=None):
|
def on_change_with_owner_cashbook(self, name=None):
|
||||||
""" get current owner
|
""" get current owner
|
||||||
|
|
Loading…
Reference in a new issue