I want to add a function in sale.py so that if a user edits the unit price,, it will still return the initial pricelist when he tries to save the form, in sale.order.line. The values passed to the form should be the one from the database.
i.e if price_unit != pricelist _warn mssg: ("you are not allowed to change unit price")
what the function should do is check, if the value that is in field is same as the one in the pricelist, then allow to save and close or new, if less or more.. return error,
How can i add it?