Remove or modify a native onchange method in Odoo 18
17:48 09 Apr 2026

In one of its modules, Odoo has this small onchange method that is complicating my operation, since I don’t need it for my business logic and I’m trying to eliminate its behavior.

@api.onchange('street', 'zip', 'city', 'state_id', 'country_id')
def _delete_coordinates(self):
    self.partner_latitude = False
    self.partner_longitude = False

I already did this, but the method is still being executed.

@api.onchange('street', 'zip', 'city' 'state_id', 'country_id')
def _delete_coordinates(self):
    pass

Is there any way to prevent this method from running?

python-3.x odoo odoo-17 odoo-18