I added a field to the product listings to calculate the profit margin. I use this formula:
for record in self:
record['x_studio_margen_de_utilidad'] = (record.list_price - record.standard_price) / record.list_price
What condition should I apply to the field to avoid errors in the database?