[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) <jcb@odoo.com>
This commit is contained in:
Zeel Patel
2024-03-08 11:17:41 +00:00
parent fc83c4846b
commit a35d47a988
2 changed files with 4 additions and 4 deletions
@@ -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)
@@ -169,11 +169,11 @@
<div class="content-group mt16" invisible="not pos_tax_regime_selection">
<div class="row">
<label string="Default" for="pos_default_fiscal_position_id" class="col-lg-3 o_light_label"/>
<field name="pos_default_fiscal_position_id" domain="['|',('company_id', '=', company_id),('company_id', '=', False)]"/>
<field name="pos_default_fiscal_position_id"/>
</div>
<div class="row">
<label string="Allowed" for="pos_fiscal_position_ids" class="col-lg-3 o_light_label"/>
<field name="pos_fiscal_position_ids" widget="many2many_tags" options="{'no_create': True}" domain="['|',('company_id', '=', company_id),('company_id', '=', False)]"/>
<field name="pos_fiscal_position_ids" widget="many2many_tags" options="{'no_create': True}"/>
</div>
<div>
<button name="%(account.action_account_fiscal_position_form)d" icon="oi-arrow-right" type="action" string="Fiscal Positions" class="btn-link"/>