0
1 答案
0
最佳答案
Hi,
If you check the field in the code, you can see that this field value is not stored inside the ir config parameter model. Currently when we enable and disable this field, the module sale_margin will get installed/uninstalled from the database.
So if you need to know whether this is activated or not, just see the status of the corresponding module.
Code sample:
sale_margin = self.env['ir.module.module'].search([('name' ,'=', 'sale_margin')])
if sale_margin.state == 'installed':
Thanks