Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Agreements Legal

Entity: agreement.appendix

Compute Method: _compute_dynamic_content

Inputs Method Outputs
MailTemplates = self.env["mail.template"]
for appendix in self:
            lang = (
                appendix.agreement_id
                and appendix.agreement_id.partner_id.lang
                or "en_US"
            )
            content = MailTemplates.with_context(lang=lang)._render_template(
                appendix.content, "agreement.appendix", [appendix.id]
            )[appendix.id]
            appendix.dynamic_content = content

Back to entity