Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Is there any way to calculate amount_subtotal from account.invoice.line use onchange of tax without clock on update Button
I want to calculate amount_subtotal use onchange function of tax_id without click on the update button of customer invoice line.....need a help
One of the reasons there is a button might be, that the tax calculation method is a rather costly python method. Actually you can kind of verify this when clicking on the update button. It is not truely "lighting fast".
Asuming you wouldn't be scared by performance decline you should probably look for the action that is triggered by the Update Button within the account_invoice.xml
Then you might add a onchange onto a meaningful field of the invoice line. Product Id is probably not wise, as it doen't change with quantity, euqally quantitiy might not change with price, and price might not change with discount, and discount might not change with taxes.. So probably the hard bit is to intelligently figure out on wich field change, you want the calculus to be triggered (altering other fields having not update effect, and running it on every field being performancewise totaly unacceptable)
-- EDIT --
Sorry I only got it right after a second and third reading.
You should probably look at the computation:
How the update method works:
I would truely suggest, observing as well the corresponding activity on the dev branch, as tax is refactored in V8.
There is a whole set of branches like: https://github.com/odoo-dev/odoo/tree/master-new-tax-design-tpa
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 6/27/14, 3:04 AM|
|Seen: 850 times|
|Last updated: 3/16/15, 8:10 AM|