0
2 Answers
0
Best Answer
I have solved this problem using compute. Just a guess, maybe using @api.model can't do because the function that uses that decorator will only be called when entering the form. In my case I want to affect the whole record without having to enter the form, so it can only be done if i'm using compute
setting = fields.Boolean(compute='_compute_setting', string='Setting')
def_compute_setting(self):
for rec in self:
config = self.env['ir.config_parameter'].sudo()
get_setting = config.get_param('sale_order_multiple_pricelist', False)
rec.setting = get_setting
0
Best Answer
Hi Muhammad Imron,
Can you please tell me when you "get_values" method called ?
Also use the IrConfigParam as it is created in the database.
Please use this reference.