Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

required depend filed odoo

class cars(models.Model): _name = 'cars'_inherit = “product.template”factor = fields.Float(string="",  required=False, )suggeted_price = fields.Float(string="",  required=False, compute=car_price )@api.one@api.depends('factor')def car_price(self):if self.factor:self.suggeted_price = self.factor * self.standard_price        return
Source by www.odoo.com #
 
PREVIOUS NEXT
Tagged: #required #depend #filed #odoo
ADD COMMENT
Topic
Name
2+4 =