feat: Se añade campo de real declarado y descuadre
This commit is contained in:
13
statement.py
13
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'
|
||||
|
||||
Reference in New Issue
Block a user