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

Hi
I am working with Odoo Enterprise Web 16.4+e

In product list of Inventory module, there is a default "default_code" field that is automatically appears in front of product name in product list and also in Moves History. How to remove that one so I can see ONLY PRODUCT NAME?

Thanks in advance!



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

Hi, 

We can change the name  by using the name_get function 


class Product(models.Model)

_inherit = 'product.template'

  

       def name_get(self):

                   result = []

                   for record in self:

                            result.append((record.id, record.name))

                   return result


Hope it helps,

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 25
1443
1
thg 2 25
2895
2
thg 2 25
1906
1
thg 3 24
1453
1
thg 4 22
2365