diff options
Diffstat (limited to 'addons/purchase_stock/models/res_config_settings.py')
| -rw-r--r-- | addons/purchase_stock/models/res_config_settings.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/addons/purchase_stock/models/res_config_settings.py b/addons/purchase_stock/models/res_config_settings.py new file mode 100644 index 00000000..5f459962 --- /dev/null +++ b/addons/purchase_stock/models/res_config_settings.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + module_stock_dropshipping = fields.Boolean("Dropshipping") + days_to_purchase = fields.Float( + related='company_id.days_to_purchase', readonly=False) + + is_installed_sale = fields.Boolean(string="Is the Sale Module Installed") + + def get_values(self): + res = super(ResConfigSettings, self).get_values() + res.update( + is_installed_sale=self.env['ir.module.module'].search([('name', '=', 'sale'), ('state', '=', 'installed')]).id, + ) + return res |
