Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Get value of module_sale_margin from res.config.settings

形象
odoo
形象
丢弃
1 答案
0
形象
odoo
最佳答案

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

形象
丢弃