This question has been flagged
3 Replies
2863 Views

If I create a new SO, the Total amount updates with every change in order line.

If I reopen a saved SO, the Total amount will update only with the first added line. Then there is no update of the Total price until I save the order.

I tried putting

@api.onchange('order_line.price_total')

but no change

Avatar
Discard
Best Answer

Hi,

for sale order line price total, please check the dependency on other fields also like price_unit, quantity, tax_id and discount.

For sales order total amount,

only onchange is sufficient to get the values without save for all sale order line price_toal.


Regards

Sumit Sinha

Avatar
Discard
Author Best Answer

it is already there originally

Avatar
Discard
Author

Sumit Sinha:

it is suposed to be sufficient but does not work. Are we encountering a bug? can someone confirm?

P.S. I had to recreate my user and my karma went down to pot! can someone upvote me :)

Best Answer

Hello Magen,

Please use and test below code.

@api.depends('order_line.price_total')

Thanks.
Avatar
Discard