From c07548a61235f371b93a7afde9ab7e25c6dc03d0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 26 Aug 2023 19:29:15 +0530 Subject: [PATCH] fix: missing company flag for regional fn (#36791) fix: missing company flag for regional fn (#36791) * fix: missing company flag for regional fn (cherry picked from commit 9bc5952dd55fd1dc8d2c8061e325c202793f81d3) Co-authored-by: Dany Robert --- erpnext/controllers/accounts_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 76fe6a91182..53039cfd8b5 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -200,9 +200,9 @@ class AccountsController(TransactionBase): # apply tax withholding only if checked and applicable self.set_tax_withholding() - validate_regional(self) - - validate_einvoice_fields(self) + with temporary_flag("company", self.company): + validate_regional(self) + validate_einvoice_fields(self) if self.doctype != "Material Request" and not self.ignore_pricing_rule: apply_pricing_rule_on_transaction(self)