Odoo Help


This community 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.


[SOLVED] Understanding how sale order works: _amount_all_wrapper and _amount_all functions in sale model/view, when are they launched?

on 2/14/16, 7:32 AM 258 views

I am programming a custom module to apply a discount to sale orders (please avoid suggesting existing discount modules, I have tried several without success and also I want to learn how to do this stuff, thanks).

I have added the fields and modified _amount_all function and everything works fine, BUT I noted that it only works when you change something from the sale order item list. If you press update link in the subtotals and you did not change anything from the items the method _amount_all is not invoked at all. I added a "discount" field so if I modify later that discount value without modifying the items the user can not reflect the changes in the totals.

Now I am struggling to understand what triggers _amount_all and how can I force that updating a given field can trigger that function when user clicks on update link too.

Any help is really welcomed.

On 2/14/16, 9:59 AM

This question is better formulated and properly answered here:


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 2/14/16, 7:32 AM
Seen: 258 times
Last updated: 2/14/16, 10:00 AM