[FIX] point_of_sale: allow company branch to change default tax

Before this commit:
When a company having branches,
they uses the same taxes as the parent company,
In POS settings, the default tax used a company domain
which does not allow branch to change the default tax

After this commit:
A branch is allowed to change the default tax

task-3775857

closes odoo/odoo#156434

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
Harsh Modi
2024-03-08 11:17:39 +00:00
parent 7d2702fa2f
commit f2ce34aaf1
2 changed files with 2 additions and 2 deletions
@@ -30,7 +30,7 @@ class ResConfigSettings(models.TransientModel):
return self.env['pos.config'].search([('company_id', '=', self.env.company.id)], order='write_date desc', limit=1)
pos_config_id = fields.Many2one('pos.config', string="Point of Sale", default=lambda self: self._default_pos_config())
sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax", related='company_id.account_sale_tax_id', readonly=False)
sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax", related='company_id.account_sale_tax_id', readonly=False, check_company=True)
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_stripe = fields.Boolean(string="Stripe Payment Terminal", help="The transactions are processed by Stripe. Set your Stripe credentials on the related payment method.")
@@ -150,7 +150,7 @@
Default sales tax for products
</div>
<div class="content-group mt16">
<field name="sale_tax_id" colspan="4" nolabel="1" domain="[('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company_id)]"/>
<field name="sale_tax_id" colspan="4" nolabel="1" domain="[('type_tax_use', 'in', ('sale', 'all'))]"/>
</div>
<div class="mt8">
<button name="%(account.action_tax_form)d" icon="oi-arrow-right" type="action" string="Taxes" class="btn-link"/>