تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
141 أدوات العرض

Bonjour 

Nous venons de basculer sur la version 18 et dans mes devis où bons de commandes, mode code produit apparait en plus de la description. Nous ne souhaitons pas que ce code apparaissent sur nos rapports seulement la description. Savez-vous comment faire ?

Merci

الصورة الرمزية
إهمال
أفضل إجابة

Hi,


in Odoo 18, by default, reports like quotes, sales orders, or purchase orders now show both the product name and the internal reference (product code). This is because the QWeb templates have been updated to include product.default_code alongside product.name in the line description.


To remove the code from the reports and display only the description, you have a few options:

Option 1: Customize the QWeb report template


    Go to Settings → Technical → Reports → Reports.


    Find the report you want to modify (e.g., Quotation / Sale Order, Purchase Order).


    Open the QWeb template (under the Report Template field).


    Look for the line displaying the product, it often looks like:

     <t t-esc="line.product_id.display_name"/>

     Modify it to show only the name:

    <t t-esc="line.product_id.name"/>





Option 2: Create a studio/override snippet (no coding)


    If you don’t want to modify XML directly, you can use Odoo Studio:

        Edit the report in Studio.

        Select the product line.

        Remove or replace the field showing the internal reference (default_code).

        Save changes.


Option 3: Override in a custom module

    If you have a custom module, you can inherit the QWeb template:

         <template id="report_saleorder_document_custom" inherit_id="sale.report_saleorder_document">

    <xpath expr="//td[@class='product_name']" position="replace">

        <td><span t-esc="line.product_id.name"/></td>

    </xpath>

</template>


Hope it helps

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أكتوبر 25
2
0
أكتوبر 25
2
2
أكتوبر 25
342
0
سبتمبر 25
1
0
سبتمبر 25
1