2
0

[IMP] account_loan: add multi-company ir_rule for 'account_loan_line'

This commit is contained in:
Zina Rasoamanana 2024-02-08 17:08:45 +01:00
parent dedd873814
commit 458f4d5d40
2 changed files with 13 additions and 1 deletions

View File

@ -26,7 +26,10 @@ class AccountLoanLine(models.Model):
ondelete="cascade", ondelete="cascade",
) )
company_id = fields.Many2one( 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( partner_id = fields.Many2one(
"res.partner", readonly=True, related="loan_id.partner_id" "res.partner", readonly=True, related="loan_id.partner_id"

View File

@ -8,4 +8,13 @@
['|',('company_id','=',False),('company_id','in',company_ids)] ['|',('company_id','=',False),('company_id','in',company_ids)]
</field> </field>
</record> </record>
<record id="account_loan_line_multi_company_rule" model="ir.rule">
<field name="name">Account loan line multi-company</field>
<field ref="model_account_loan_line" name="model_id" />
<field eval="True" name="global" />
<field name="domain_force">
['|',('company_id','=',False),('company_id','in',company_ids)]
</field>
</record>
</odoo> </odoo>