Here's the write () method i want to restrict in my custom module. I don't want this existing write method to work how can I do that?
class Product (models.Model):
_name = 'product.product'
@ api multi
def write ( self , values ):
'' 'Store the standard price change in order to be able to retrieve the cost of a product for a given date' ''
res = super ( ProductProduct , self ). write ( values )
if 'standard_price' in values :
self . _set_standard_price ( values [ 'standard_price' ])
return res
I can't comment this code as it belongs to the source model. I just want this function to bypass so it wont have any effect because i have written another method according to my requirement.