From a35d47a988187d0508e660c54771bc5c9e714e8a Mon Sep 17 00:00:00 2001 From: Zeel Patel Date: Wed, 6 Mar 2024 16:36:52 +0530 Subject: [PATCH] [FIX] point_of_sale: allow to use parent fiscal position in branch **Before Commit:** - In the point-of-sale, when a company had branches, - The branch company was unable to use the fiscal position of its parent company. **After Commit:** - The branch company can now use the fiscal position of its parent company in the point-of-sale. Task ID: 3775865 closes odoo/odoo#156676 Signed-off-by: Joseph Caburnay (jcb) --- addons/point_of_sale/models/res_config_settings.py | 4 ++-- addons/point_of_sale/views/res_config_settings_views.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/point_of_sale/models/res_config_settings.py b/addons/point_of_sale/models/res_config_settings.py index 62b96786c95..59019d7fa57 100644 --- a/addons/point_of_sale/models/res_config_settings.py +++ b/addons/point_of_sale/models/res_config_settings.py @@ -56,8 +56,8 @@ class ResConfigSettings(models.TransientModel): pos_cash_rounding = fields.Boolean(related='pos_config_id.cash_rounding', readonly=False, string="Cash Rounding (PoS)") pos_company_has_template = fields.Boolean(related='pos_config_id.company_has_template') pos_default_bill_ids = fields.Many2many(related='pos_config_id.default_bill_ids', readonly=False) - pos_default_fiscal_position_id = fields.Many2one('account.fiscal.position', string='Default Fiscal Position', compute='_compute_pos_fiscal_positions', readonly=False, store=True) - pos_fiscal_position_ids = fields.Many2many('account.fiscal.position', string='Fiscal Positions', compute='_compute_pos_fiscal_positions', readonly=False, store=True) + pos_default_fiscal_position_id = fields.Many2one('account.fiscal.position', string='Default Fiscal Position', compute='_compute_pos_fiscal_positions', readonly=False, store=True, check_company=True) + pos_fiscal_position_ids = fields.Many2many('account.fiscal.position', string='Fiscal Positions', compute='_compute_pos_fiscal_positions', readonly=False, store=True, check_company=True) pos_has_active_session = fields.Boolean(related='pos_config_id.has_active_session') pos_iface_available_categ_ids = fields.Many2many('pos.category', string='Available PoS Product Categories', compute='_compute_pos_iface_available_categ_ids', readonly=False, store=True) pos_iface_big_scrollbars = fields.Boolean(related='pos_config_id.iface_big_scrollbars', readonly=False) diff --git a/addons/point_of_sale/views/res_config_settings_views.xml b/addons/point_of_sale/views/res_config_settings_views.xml index 92c1c5bffc6..c0d71b21559 100644 --- a/addons/point_of_sale/views/res_config_settings_views.xml +++ b/addons/point_of_sale/views/res_config_settings_views.xml @@ -169,11 +169,11 @@