From 01a79b26e933ca569660918a3b128ebfaf671abd Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Tue, 10 Dec 2019 12:02:55 +0100 Subject: [PATCH 1/5] [IMP] emc: hide share lines menu --- easy_my_coop/views/menus.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop/views/menus.xml b/easy_my_coop/views/menus.xml index 797a51a..4ca098e 100644 --- a/easy_my_coop/views/menus.xml +++ b/easy_my_coop/views/menus.xml @@ -12,7 +12,7 @@ - + From 70a50258d583d717320860cdcebfe8d67e537d1c Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Tue, 10 Dec 2019 12:03:17 +0100 Subject: [PATCH 2/5] [IMP] name group_by_cooperator_type and filter def consistency --- easy_my_coop/views/res_partner_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easy_my_coop/views/res_partner_view.xml b/easy_my_coop/views/res_partner_view.xml index 2bd57ae..de1a944 100644 --- a/easy_my_coop/views/res_partner_view.xml +++ b/easy_my_coop/views/res_partner_view.xml @@ -87,13 +87,13 @@ res.partner - + - + - + From 592b875614728d12a9a0c6f92365bd4717a077c1 Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Wed, 11 Dec 2019 10:28:54 +0100 Subject: [PATCH 3/5] [FIX] emc_loan: remove is_bond from data and tests --- easy_my_coop_loan/demo/coop.xml | 1 - easy_my_coop_loan/tests/test_emc_loan.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/easy_my_coop_loan/demo/coop.xml b/easy_my_coop_loan/demo/coop.xml index ecd808c..e3a8c36 100644 --- a/easy_my_coop_loan/demo/coop.xml +++ b/easy_my_coop_loan/demo/coop.xml @@ -6,7 +6,6 @@ test loan issue - diff --git a/easy_my_coop_loan/tests/test_emc_loan.py b/easy_my_coop_loan/tests/test_emc_loan.py index 6d4f089..fda5895 100644 --- a/easy_my_coop_loan/tests/test_emc_loan.py +++ b/easy_my_coop_loan/tests/test_emc_loan.py @@ -13,7 +13,6 @@ class EMCLoanCase(EMCBaseCase): loan_issue_values = { "name": "test loan issue", - "is_bond": False, "default_issue": "xx", "subscription_start_date": Date.today(), "subscription_end_date": Date.today() + timedelta(days=60), @@ -43,7 +42,6 @@ class EMCLoanCase(EMCBaseCase): loan_issue_values = { "name": "test loan issue", - "is_bond": False, "default_issue": True, "user_id": self.ref("easy_my_coop.res_users_manager_emc_demo"), "subscription_start_date": Date.today(), From ae245cdae9d087e45b93ce3405487f3890c7c730 Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Wed, 11 Dec 2019 10:29:44 +0100 Subject: [PATCH 4/5] [FIX] emc_loan: bypass rules cof computed fields --- easy_my_coop_loan/models/partner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easy_my_coop_loan/models/partner.py b/easy_my_coop_loan/models/partner.py index dcd20f2..4431673 100644 --- a/easy_my_coop_loan/models/partner.py +++ b/easy_my_coop_loan/models/partner.py @@ -1,5 +1,6 @@ # Copyright 2019 Coop IT Easy SCRL fs # Houssine BAKKALI +# Robin Keunen # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models, api @@ -23,7 +24,8 @@ class ResPartner(models.Model): @api.depends("loan_line_ids", "loan_line_ids.state") def _compute_is_loaner(self): for partner in self: - loans = partner.loan_line_ids.filtered( + sudo_partner = partner.sudo() + loans = sudo_partner.loan_line_ids.filtered( lambda l: l.state in ["subscribed", "waiting", "paid"] ) - partner.is_loaner = bool(loans) + sudo_partner.is_loaner = bool(loans) From 223a3217c3b142c52f4e4ebbba27feebb74b3f70 Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Wed, 11 Dec 2019 12:10:43 +0100 Subject: [PATCH 5/5] [FIX] emc: cooperator account demo data --- easy_my_coop/demo/coop.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop/demo/coop.xml b/easy_my_coop/demo/coop.xml index 48849ca..1266def 100644 --- a/easy_my_coop/demo/coop.xml +++ b/easy_my_coop/demo/coop.xml @@ -77,7 +77,7 @@ - +