properly translate work orders

This commit is contained in:
Marc Durepos 2025-08-25 11:34:49 -04:00
parent b5e4b2d257
commit b5df3a9735

View file

@ -565,8 +565,9 @@
<t t-call="web.html_container"> <t t-call="web.html_container">
<t t-foreach="docs" t-as="doc"> <t t-foreach="docs" t-as="doc">
<t t-set="doc" t-value="doc.root_ancestor.with_context(tz=doc.partner_id.tz)" t-if="doc.parent_id"/> <t t-set="doc" t-value="doc.root_ancestor.with_context(tz=doc.partner_id.tz)" t-if="doc.parent_id"/>
<t t-set="lang" t-value="(doc.work_order_contacts and doc.work_order_contacts[0].lang) or (doc.partner_id and doc.partner_id.lang) or (doc.user_id and doc.user_id.lang) or user.lang"/>
<t t-call="web.external_layout"> <t t-call="web.external_layout">
<t t-call="bemade_fsm.work_order_page"/> <t t-call="bemade_fsm.work_order_page" t-lang="lang"/>
</t> </t>
</t> </t>
</t> </t>
@ -580,7 +581,8 @@
expr="//t[@t-call='industry_fsm_report.worksheet_custom_page']" expr="//t[@t-call='industry_fsm_report.worksheet_custom_page']"
position="replace" position="replace"
> >
<t t-call="bemade_fsm.work_order_page" t-lang="(doc.work_order_contacts and doc.work_order_contacts[0].lang) or 'en_US'"/> <t t-set="lang" t-value="(doc.work_order_contacts and doc.work_order_contacts[0].lang) or (doc.partner_id and doc.partner_id.lang) or (doc.user_id and doc.user_id.lang) or user.lang"/>
<t t-call="bemade_fsm.work_order_page" t-lang="lang"/>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>