Search code examples
odoowizardinvoiceodoo-13

How to reflect product price and quantity changes on journal entries of an invoice


I create a wizard that change price and quantity for each product but the amount_untaxed, tax_amount and total amount unchanged and journal entries are unbalanced. how to resolve that?


Solution

  • You should call _onchange_price_subtotal() on every changed invoice line (model account.move.line) to trigger the recomputation. The recomputation is only implemented for changes in the view, that's why it's isn't triggered when using a wizard. But the implementation can be used in the wizard, too, without any problems.