This question has been flagged
2 Replies
4242 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?

Avatar
Discard

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

Best Answer

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!    

Avatar
Discard