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

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
oct. 25
2
0
oct. 25
2
2
oct. 25
344
0
sept. 25
1
0
sept. 25
1