This might be silly but i don't have idea.
While we go to Accounting -> Customers -> Customer Invoices(model: account.invoice) there is a field 'Total'(amount_total).
I have added a boolean field in account.voucher.
'test': fields.boolean('Test'),
Now in wizard(Pay Invoice) which opens on click of button 'Register payment'. I want to make this field visible or unvisible based on value of 'Total'. If the value we fill in 'Paid Amount'(amount) is less than 'Total' then 'test' field should be visible else invisible.
How can i make it possible?
Thanx in advance.
In the
account_voucher-> invoice.py
file there is a method namedinvoice_pay_customer
.this is the method is called when the you click on the Register Payment button(enable the debug mode), you just need to update the context value, you just need to override this method like,
it will set the amount in the popup.