I am creating invoices programmatically in Odoo12 all everything is going well but there is a problem in invoice which is partially paid i.e. In-Payment because its residual is not calculating.
I am trying to calculate Amount Due but all nothing happened. While creating invoice I am assigning value to
Example:
self.env['account.invoice'].create({
'residual': my_balance_field
})
Any help, any guidance?