跳至内容
菜单
此问题已终结
1 回复
1681 查看

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!



形象
丢弃
最佳答案

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,

形象
丢弃
相关帖文 回复 查看 活动
1
3月 25
1454
1
2月 25
2917
2
2月 25
1909
1
3月 24
1467
1
4月 22
2374