hello odoo community,,
i have field 'production date' , 'duration' field and i need calculate 'expiration date'
this is my module
from odoo import fields,models
class MyMarketProduct(models.Model):
_name = 'market.products'
def _compute_expiry(self):
self.production_date+self.valid_durity
name = fields.Char()
product_country = fields.Char()
image = fields.Binary()
production_date = fields.Date()
desc = fields.Char()
valid_durity = fields.Date()
expiration_date = fields.Date(compute=_compute_expiry)