diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/point_of_sale/models/res_config_settings.py | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/point_of_sale/models/res_config_settings.py')
| -rw-r--r-- | addons/point_of_sale/models/res_config_settings.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/addons/point_of_sale/models/res_config_settings.py b/addons/point_of_sale/models/res_config_settings.py new file mode 100644 index 00000000..30b92b95 --- /dev/null +++ b/addons/point_of_sale/models/res_config_settings.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax", related='company_id.account_sale_tax_id', readonly=False) + module_pos_mercury = fields.Boolean(string="Vantiv Payment Terminal", help="The transactions are processed by Vantiv. Set your Vantiv credentials on the related payment method.") + module_pos_adyen = fields.Boolean(string="Adyen Payment Terminal", help="The transactions are processed by Adyen. Set your Adyen credentials on the related payment method.") + module_pos_six = fields.Boolean(string="Six Payment Terminal", help="The transactions are processed by Six. Set the IP address of the terminal on the related payment method.") + update_stock_quantities = fields.Selection(related="company_id.point_of_sale_update_stock_quantities", readonly=False) + + def set_values(self): + super(ResConfigSettings, self).set_values() + if not self.group_product_pricelist: + configs = self.env['pos.config'].search([('use_pricelist', '=', True)]) + for config in configs: + config.use_pricelist = False |
