Odoo Help


Restricting user from editing the unit price for product.

on 7/22/13, 7:44 AM 3,061 views

Hi all,

My client do not want anyone to change unit price from sales order line. Rather they want to control changing price from masterdata only.

I checked the filed 'price_unit' from sale order line and the field is readonly

I checked the view 'sale.order.line.form2' and the 'price_unit' has no readonly attributes.

Can anyone help me to make this field readonly so that no one can change the value?


Any head way with this?

on 7/25/13, 10:51 AM

No way to solve this

on 7/25/13, 11:07 AM

Really weird! I thought it would be part of the Rules and security section.

on 7/25/13, 11:10 AM
Bharat Devnani
On 2/12/17, 3:55 AM

It's better to customize the functionality by making the price unit readonly (Note: by default onchange will not be applicable on readonly, to bypass this you can refer to https://bharatrdevnani.wordpress.com/2016/02/04/readonly-attributes-onchange-odoo/)


Write one more onchange on price unit, if someone tries to change the price unit field, a new onchange method will be triggered to get the values from the product master again.

Best Regards,


Boris Ghelman
On 10/1/14, 11:16 PM

After many days investigating and googleling,  I solved using this function, very usefull, is not read only  , is a :  don't allow users to quote below the sales price of products, and you can make your particular changes.





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.


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

2 follower(s)


Asked: 7/22/13, 7:44 AM
Seen: 3061 times
Last updated: 2/12/17, 3:55 AM