2016-11-13 12 views
1

Odooシステムでは、製品テンプレートにproduct_code(interal reference)を設定すると、その注釈もqwebレポートに表示されます。私は販売注文qwebレポートの製品名のみを取得したいと思いますが、product_codeフィールドレポートを削除(または非表示)することはできますか?そうであれば、それを解決するための具体的な手順を教えてください。ありがとう 私QWEBコード:Odoo-9の販売注文レポートqwebの 'product_code'フィールドを削除するには?

    </tr> 
        <t t-set="index" t-value="0"/> 
        <t t-set="product" t-value="0"/> 
        <t t-foreach="doc.handle_orderline(doc.order_line)" t-as="product_line"> 
         <t t-set="product_num" t-value="0"/> 
         <t t-set="index" t-value="index + 1"/> 
         <t t-foreach="product_line" t-as="l"> 
          <t t-set="product_num" t-value="product_num+1"/> 
          <t t-if="not l.product_uom_qty"> 
           <t t-set="index" t-value="index - 1"/> 
          </t> 
          <tr t-if="l.product_uom_qty"> 
           <t t-if="product_num == 1"> 
            <td class="text-center" t-att-rowspan="len(product_line)"> 
             <span t-esc="index"/> 
            </td> 
            <td class="text-center" t-att-rowspan="len(product_line)"> 
             <strong><span t-field="l.name"/></strong> 
             <br/> 
             <t t-if="l.width_id">(<span style="font-style:italic" t-field="l.width_id.name"/>)</t> 
            </td> 
           </t> 
+0

<strong><span t-field="l.name"/></strong> 

は、次のコードを置き換えますか?あなたの試行コードで質問を更新できますか? –

+0

私に返信してくれてありがとう、流行しているコードは私のsale_order_report_documentsに製品名を表示しています: –

答えて

1

sale.order.lineオブジェクト名、製品名およびコードの組み合わせでフィールドストア値で。 名前フィールド値をonchangeProductフィールドに設定します。

QWEBレポートでは、product_idフィールドから値を取得して、製品名を表示する必要があります。あなたがこれまでに試してみました何

<strong><span t-field="l.product_id.name"/></strong> 
+0

私に返信してくれてありがとうございます、l.nameは既に削除されていますが、報告書は手元には出ていません。 –

+0

もう一度ログインすると、チャームのように機能します。良い一日の仲間を持っています。 –

+0

あなたはもう1つの質問に答えるのを助けてくれますか?私のレポートには2つのカスタムフィールドがあります。qwebの整数値と同じ値を持つすべての製品をグループ化することは可能ですか?(1.55 + 2.50)x3 --->は整数フィールドの値で、1.55と2.50は他のfloatフィールドの値です)可能であれば、私は他の質問トピックを作成します。 –

関連する問題