コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
14803 ビュー

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

アバター
破棄
最善の回答

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??

アバター
破棄
著作者 最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
0
3月 15
3319
1
3月 23
3534
0
7月 22
1920
Inherit Qweb 解決済
4
2月 24
48132
0
5月 22
3349