feat: Se añade campo de real declarado y descuadre
This commit is contained in:
parent
303ec31799
commit
9a6554bdc1
@ -122,6 +122,14 @@ msgctxt "field:statement.line,end_balance:"
|
|||||||
msgid "End Balance"
|
msgid "End Balance"
|
||||||
msgstr "Saldo Final"
|
msgstr "Saldo Final"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,real_cash:"
|
||||||
|
msgid "Real Cash"
|
||||||
|
msgstr "Declarado"
|
||||||
|
|
||||||
|
msgctxt "field:statement.line,mismatch:"
|
||||||
|
msgid "Mismatch"
|
||||||
|
msgstr "Descuadre"
|
||||||
|
|
||||||
msgctxt "field:statement.line,transfer:"
|
msgctxt "field:statement.line,transfer:"
|
||||||
msgid "Transfer"
|
msgid "Transfer"
|
||||||
msgstr "Trasladar"
|
msgstr "Trasladar"
|
||||||
|
13
statement.py
13
statement.py
@ -346,9 +346,13 @@ class StatementLine(ModelView):
|
|||||||
balance = Monetary(
|
balance = Monetary(
|
||||||
"Balance", currency='currency', digits='currency', states=_states)
|
"Balance", currency='currency', digits='currency', states=_states)
|
||||||
end_balance = Monetary(
|
end_balance = Monetary(
|
||||||
"End Balance", currency='currency', digits='currency')
|
"End Balance", currency='currency', digits='currency', readonly=True)
|
||||||
transfer = Monetary(
|
transfer = Monetary(
|
||||||
"Transfer", currency='currency', digits='currency')
|
"Transfer", currency='currency', digits='currency')
|
||||||
|
real_cash = Monetary(
|
||||||
|
"Real Cash", currency='currency', digits='currency')
|
||||||
|
mismatch = Monetary(
|
||||||
|
"Mismatch", currency='currency', digits='currency', readonly=True)
|
||||||
account = fields.Many2One('account.account', "Account",
|
account = fields.Many2One('account.account', "Account",
|
||||||
domain=[
|
domain=[
|
||||||
('company', '=', Eval('company', 0)),
|
('company', '=', Eval('company', 0)),
|
||||||
@ -369,6 +373,13 @@ class StatementLine(ModelView):
|
|||||||
return Transaction().context.get('company')
|
return Transaction().context.get('company')
|
||||||
|
|
||||||
|
|
||||||
|
def get_mismatch(self, name):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
@fields.depends('end_balance', 'real_cash', 'mismatch')
|
||||||
|
def on_change_real_cash(self):
|
||||||
|
self.mismatch = self.real_cash - self.end_balance
|
||||||
|
|
||||||
class PayInvoiceSupplierStart(ModelView):
|
class PayInvoiceSupplierStart(ModelView):
|
||||||
'Payment Invoice To Supplier'
|
'Payment Invoice To Supplier'
|
||||||
__name__ = 'pay_invoice.statement.start'
|
__name__ = 'pay_invoice.statement.start'
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<tree editable="1">
|
<tree editable="1">
|
||||||
<field name="journal"/>
|
<field name="journal"/>
|
||||||
<field name="start_balance"/>
|
<field name="start_balance" optional="1"/>
|
||||||
<field name="balance"/>
|
<field name="balance" optional="1"/>
|
||||||
<field name="end_balance"/>
|
<field name="end_balance"/>
|
||||||
|
<field name="real_cash"/>
|
||||||
|
<field name="mismatch"/>
|
||||||
<field name="transfer"/>
|
<field name="transfer"/>
|
||||||
<field name="account"/>
|
<field name="account"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
Loading…
Reference in New Issue
Block a user