I want to add non-DB computed One2many field.
If I define it like
def compute(self):
field = fields.One2many('model', 'inverse_field', compute='compute')
for record in self:
record.field = self.env['model'].new()
I don't see computed values
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want to add non-DB computed One2many field.
If I define it like
def compute(self):
field = fields.One2many('model', 'inverse_field', compute='compute')
for record in self:
record.field = self.env['model'].new()
I don't see computed values
Did you read question? I want to populate One2many field dynamically.
Hi,
You can add a print statement/logger message inside the compute function and see whether the function is get called or not. Also have a look at this video: How to Write Compute Field and its Function in Odoo12
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Hope this tips will help you in future: https://github.com/sehrishnaz/learnopenerp/wiki