Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
14787 Vizualizări

Hello everybody,

Usually, I use this code to inherit a report template in my own modules.

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <template id="report_saleorder_document_custom" inherit_id="sale.report_saleorder_document">
            <xpath expr="//div[@class='page']" position="replace">

..........

 

This new template id=report_saleorder_document_custom inherit sale.report_saleorder_document template. Ok.

But could we just OVERRIDE sale.report_saleorder_document rather than inherit it?

 

Thanks....

Imagine profil
Abandonează
Cel mai bun răspuns

Hi, I'm posting this as an answer because my Karma level does not allow me to comment. 

@Pascal Tremblay; I've tried the code you provided (on a different template - website_portal.my_account_link), but it causes a "Invalid view definition" error in Odoo. 

Is there a good way to override a <template> definition from another module??

Imagine profil
Abandonează
Autor Cel mai bun răspuns

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <template id="sale.report_saleorder_document">
            <xpath expr="//div[@class='page']" position="replace">

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
mar. 15
3308
1
mar. 23
3516
0
iul. 22
1899
4
feb. 24
48110
0
mai 22
3333