跳至内容
菜单
此问题已终结
1280 查看

Hi All,

I am trying to upgrade legal_agreement addon to work with Odoo 14 I've got most issues resolved but stuck on this hopefully last issue where Preview throws an error Saying 

Error to render compiling AST
ValueError: Template rendering should be called only using on a list of IDs.

I think code responsible for this error is 

def _compute_dynamic_special_terms(self):
        MailTemplates = self.env["mail.template"]
        for agreement in self:
       lang = agreement.partner_id.lang or "en_US"
      special_terms = MailTemplates._render_template(
     agreement.special_terms, "agreement", agreement.id
)
agreement.dynamic_special_terms = special_terms

Anyone has any ideas or can spot an error in code from Odoo 14 perspective.

Any help would be much appreciated.

形象
丢弃