in addons/website/models/ir_http.py, I have:
class ModelConverter(ir.ir_http.ModelConverter):
def to_url(self, value):
return slug(value)
I would like to override the def to_url method in my module.
How can I do this?
I tried to write this in local_addons/my_app/addons/my_module/models/my_module_ir_http.py:class ModelConverter(odoo.addons.website.models.ir_http.ir.ir_http.ModelConverter):
def to_url(self, value):
logger.info("_____________________Let's slugify!!!!" + repr(value))
logger.info("slugged: " + str(value.id))
return str(value.id)
But it doesn't seem to work.
Can you help? Thanks