2017-06-15 8 views
0

私は、inheritとxpathによって新しいページ開始販売注文レポートを追加しようとしました。しかし、それは動作しません。 は、ここでは、コードです:odooで販売注文レポートを継承する10

<template id="report_saleorder_inherit" inherit_id="sale.report_saleorder"> 
<xpath expr="//t[@t-call='report.html_container']" position="before"> 
    <t t-call="report.html_container"> 
    <t t-call="report.external_layout"> 
     <div class="page"> 
     <h1>New Page</h1> 
     </div> 
    </t> 
    </t> 
</xpath> 

しかし、私は以下のようなコアモジュールSaleで編集し、それが動作します。

<template id="report_saleorder"> 
    <t t-call="report.html_container"> 
    <t t-call="report.external_layout"> 
     <div class="page"> 
      <h1>New Page</h1> 
     </div> 
    </t> 
    </t> 
<t t-call="report.html_container"> 
    <t t-foreach="docs" t-as="doc"> 
    <t t-call="sale.report_saleorder_document" t- 
     lang="doc.partner_id.lang"/> 
    </t> 
</t> 
</template> 

カスタムモジュールでこれをどのように達成できますか?

答えて

0

あなたのモジュール内の「売却」モジュールの依存関係を追加し、コードの下にしようと

<template id="report_saleorder_inherit" inherit_id="sale.report_saleorder"> 
<xpath expr="t" position="before"> 
    <t t-call="report.html_container"> 
     <t t-call="report.external_layout"> 
      <div class="page"> 
      <h1>New Page</h1> 
      </div> 
     </t> 
     </t> 
</xpath> 
</template> 
関連する問題