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.clause

Compute Method: _compute_dynamic_content

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

Back to entity