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

Is it possible to display this as the SKU on the product page underneath the add to cart/compare sections?

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

Hi @Gabriel Rojas, @wanli cheng:

If you're looking for a simple way to replace the text "Internal Reference" with "SKU" in your Odoo instance, you can use the module i created, you can find it in the Odoo store or github under the name change_internal_reference_for_sku.

You can download an install it.

It helps you modify the product form and list views in the backend, and also updates the product detail page on the website to display the SKU above the attributes.

It uses Odoo's inheritance system (XPath) for clean and efficient changes. Ideal for those who want clearer change the original "Interal Reference" for any other text.

Best regards.

Diego Naranjo

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

Hi,

Try to add the below at the end of the templates.xml, this will show internal reference in shop page for all products.

<template id="products_item_internal_reference" inherit_id="website_sale.products_item" active="True" name="Product Internal Reference">

<xpath expr="//*[hasclass('product_price')]" position="before">

<h6 class="o_wsale_products_item_title mb-1">

            <a class="text-primary text-decoration-none" itemprop="default_code" t-att-href="product_href"

t-att-content="product.default_code" t-field="product.default_code"/>

        </h6>

    </xpath>

</template>


Hope it helps

الصورة الرمزية
إهمال

Hi,

Where to find templates.xml to modify?

sorry for so evident question, im new in Odoo, thanks

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 24
1846
1
فبراير 24
1539
4
مايو 25
2836
4
يناير 25
2655
2
يونيو 24
2075