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

In products, in product.template model I want to change the field name of field 'type'

The code is

'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual.")

Here the product name is 'Product Type' I want to change this as 'Material type'.

I tried changing it

'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Material Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual.")

I have restarted server and I have also upgraded the product module. But the name of the field was not changed. I tried with another field it changes. How to change the name of this field ('type')?

I have an another doubt in the same field. It is a selection field. In the code it has two selections

'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual.")

Hence in the selection it must show Consumable and Service. But it shows an extra selection Stockable Product.

How is this possible?

Thanks.





形象
丢弃
最佳答案

Hi Uppili Arivukkannu,
I think you have to upgrade "Warehouse Management" module not product module. Then All your problem will solve. Because,  product.template is inherited there in class product_template. Where type is redefined like this:


'type': fields.selection([('product', 'Stockable Product'), ('consu', 'Consumable'), ('service', 'Service')], 'Product Type', required=True, help="Consumable: Will not imply stock management for this product. \nStockable product: Will imply stock management for this product."),


Ensure also you are redefining in warehouse, After your redefining, Please upgrade the warehouse Management module. Then it will effect as you desire.
Hope this may help you.

形象
丢弃
编写者

Thanks for your replay. Can you give the exact model name(.py file) where the product_template is inherited?

编写者

I have found it. It works. Thank you.

Its ok @Uppili Arivukkannu

相关帖文 回复 查看 活动
9
4月 22
29167
2
12月 17
16952
0
3月 16
3367
0
12月 15
4400
0
4月 15
3979