From 458f4d5d403f1fd4ec9666f98cda1f7f8f7ae12f Mon Sep 17 00:00:00 2001 From: Zina Rasoamanana Date: Thu, 8 Feb 2024 17:08:45 +0100 Subject: [PATCH] [IMP] account_loan: add multi-company ir_rule for 'account_loan_line' --- account_loan/models/account_loan_line.py | 5 ++++- account_loan/security/account_loan_security.xml | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/account_loan/models/account_loan_line.py b/account_loan/models/account_loan_line.py index 4ca3f65a..dfd719af 100644 --- a/account_loan/models/account_loan_line.py +++ b/account_loan/models/account_loan_line.py @@ -26,7 +26,10 @@ class AccountLoanLine(models.Model): ondelete="cascade", ) company_id = fields.Many2one( - "res.company", readonly=True, related="loan_id.company_id" + "res.company", + readonly=True, + related="loan_id.company_id", + store=True, ) partner_id = fields.Many2one( "res.partner", readonly=True, related="loan_id.partner_id" diff --git a/account_loan/security/account_loan_security.xml b/account_loan/security/account_loan_security.xml index 598a3cdf..69550682 100644 --- a/account_loan/security/account_loan_security.xml +++ b/account_loan/security/account_loan_security.xml @@ -8,4 +8,13 @@ ['|',('company_id','=',False),('company_id','in',company_ids)] + + + Account loan line multi-company + + + + ['|',('company_id','=',False),('company_id','in',company_ids)] + +