Odoo Help

0

Sale order line subtotal not updating

By
Marie Pinto
on 10/12/15, 6:14 PM 643 views

I changed the price_subtotal field (in sale.order.line model) from function to float, because of a special requirement. Now, price_subtotal should be saved when I hit the Save Order button, but I see the write method saves every modified field to database, except price_subtotal.

Why does this happen?

it will be better if you include the code (changes you made)

Baiju KS
on 10/13/15, 1:54 AM
0

Pawan

--Pawan--
Pawan
1392
| 4 4 5
Hyderabad, India
--Pawan--


Pawan
On 10/14/15, 1:01 AM

Marie,

If you have changed price_subtotal to float, then it must be added as a column in sale_order_line table at database(unlike functional fields, which are not stored in database so you can't find its column also). Odoo don't write the functional fields values to DB... as its functionally computed.

That might be one of the reason why the value price_subtotal is not writing to the DB.

But since you have changed it to float field, it must write its value to DB.

So, check your database and if its not there in the table(sale_order_line) then try updating your module again to reflect it to database.

Hope it helps!    

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 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

Question tools

1 follower(s)

Stats

Asked: 10/12/15, 6:14 PM
Seen: 643 times
Last updated: 10/14/15, 1:01 AM