Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7159 Lượt xem

I'd like to display the internal reference of my products and variants on the product page on the e commerce in odoo 10

can anyone explain me how to do it?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất


      <td t-if="line.product_id.product_tmpl_id"> 

                  <div>

                         <strong t-field="line.product_id.with_context(display_default_code=True).display_name" />

                    </div>

    </td>

It Will show like this [E232]Mouse

                                          

         

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Olivier,

To add the internal reference to the product page , you can extend the template with the id="product" using the t-extend , then you can add the code to add the internal reference like this,

Thank You

<div>
<t t-if="product.default_code">
<p t-field="product.default_code" class="text-muted" />
</t>
</div>


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 2 25
4227
2
thg 1 23
16029
0
thg 10 22
1891
1
thg 6 25
1902
0
thg 10 22
2197