Search code examples
odooodoo-12

MissingError Template: web.external_layout


I am trying to create a report in Odoo 12. But I come across an issue.

<template id="applicant_contract_offering_document">
    <t t-call="web.external_layout">
        <div class="header tahoma underline_bold center font_size_11">
            <p>OFFICIAL OFFERING LETTER</p>
        </div>
    </t>
</template>

<template id="applicant_contract_offering">
    <t t-call="web.html_container">
        <t t-foreach="docs" t-as="o">
            <t t-call="fhid_recruitment.applicant_contract_offering_document" />
        </t>
    </t>
</template>

Odoo always gives me

Error to render compiling AST
MissingError: ('Record does not exist or has been deleted.\n\n(Records: [4], User:2)', None)
Template: web.external_layout 

What am I missing? I can print without web.external_layout but it seems the CSS is not applied to the body of the report.


Solution

  • This error message is very misleading. I urge every developer who encounter this kind of error message to try to check their codes again.

    In my case, it was caused by empty record id.