From 45f448f8b28575cdd768acf2235d2bb86e4b8b82 Mon Sep 17 00:00:00 2001 From: Nikul Chaudhary Date: Thu, 1 Oct 2020 08:28:19 +0530 Subject: [PATCH] [FIX] Fixed Issue #291 --- purchase_operating_unit/README.rst | 1 + purchase_operating_unit/readme/CONTRIBUTORS.rst | 1 + .../tests/test_purchase_operating_unit.py | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/purchase_operating_unit/README.rst b/purchase_operating_unit/README.rst index 621ff8d321..a4e49acdff 100644 --- a/purchase_operating_unit/README.rst +++ b/purchase_operating_unit/README.rst @@ -80,6 +80,7 @@ Contributors * Aaron Henriquez * Sudhir Arya * Nicola Studer +* Nikul Chaudhary Maintainers ~~~~~~~~~~~ diff --git a/purchase_operating_unit/readme/CONTRIBUTORS.rst b/purchase_operating_unit/readme/CONTRIBUTORS.rst index d5625161d4..5ddf7e513a 100644 --- a/purchase_operating_unit/readme/CONTRIBUTORS.rst +++ b/purchase_operating_unit/readme/CONTRIBUTORS.rst @@ -2,3 +2,4 @@ * Aaron Henriquez * Sudhir Arya * Nicola Studer +* Nikul Chaudhary diff --git a/purchase_operating_unit/tests/test_purchase_operating_unit.py b/purchase_operating_unit/tests/test_purchase_operating_unit.py index 327e659711..21ed118299 100644 --- a/purchase_operating_unit/tests/test_purchase_operating_unit.py +++ b/purchase_operating_unit/tests/test_purchase_operating_unit.py @@ -15,6 +15,7 @@ def setUp(self): self.StockPicking = self.env["stock.picking"] self.PurchaseOrder = self.env["purchase.order"] self.AccountInvoice = self.env["account.move"] + self.AccountAccount = self.env["account.account"] # company self.company1 = self.env.ref("base.main_company") self.company2 = self.env.ref("stock.res_company_1") @@ -32,7 +33,10 @@ def setUp(self): self.product2 = self.env.ref("product.product_product_9") self.product3 = self.env.ref("product.product_product_11") # Account - self.account = self.env.ref("l10n_generic_coa.payable") + payable_acc_type = self.env.ref("account.data_account_type_payable").id + self.account = self.AccountAccount.search( + [("user_type_id", "=", payable_acc_type)], limit=1 + ) # Create users self.user1_id = self._create_user( "user_1",