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

Problem Description

Note: I am using Odoo's Technical Menu to complete task.

I have created a new model called "x_ther_class" which contains a field "x_ther_class" (pardon my great creativity in naming). Now I have related this field to the "product.template" model by creating a new field and selecting "many2many" as field type. Then in the related model I selected "x_ther_class" and entered Column1: "product_template_id", and Column2: "x_ther_class_id".

Next, I have customized the " product.template.common.form", and added the following code using xpath:

This shows the field on the Product form at the desired location, however, the field only shows the id of the class and not the char field. How can I display the char field instead of the id?

Regards.


Odoo version: 17.0 Community

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

You should create a text (char) field x_name and that should be displayed.  If there's no name field you will get the Record ID.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
7
thg 12 24
7836
0
thg 7 24
1117
0
thg 5 24
1493
0
thg 4 24
23
1
thg 3 24
2774