diff --git a/locale/es.po b/locale/es.po index fd9e2b7..57fc09b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -122,6 +122,14 @@ msgctxt "field:statement.line,end_balance:" msgid "End Balance" 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:" msgid "Transfer" msgstr "Trasladar" diff --git a/statement.py b/statement.py index 60eda69..5fa3210 100644 --- a/statement.py +++ b/statement.py @@ -346,9 +346,13 @@ class StatementLine(ModelView): balance = Monetary( "Balance", currency='currency', digits='currency', states=_states) end_balance = Monetary( - "End Balance", currency='currency', digits='currency') + "End Balance", currency='currency', digits='currency', readonly=True) transfer = Monetary( "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", domain=[ ('company', '=', Eval('company', 0)), @@ -369,6 +373,13 @@ class StatementLine(ModelView): 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): 'Payment Invoice To Supplier' __name__ = 'pay_invoice.statement.start' diff --git a/view/statement_line_tree_sequence.xml b/view/statement_line_tree_sequence.xml index ebed34c..ef560b9 100644 --- a/view/statement_line_tree_sequence.xml +++ b/view/statement_line_tree_sequence.xml @@ -3,9 +3,11 @@ this repository contains the full copyright notices and license terms. --> - - + + + +