This question has been flagged
1 Reply
6674 Views

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.





Avatar
Discard
Best Answer

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.

Avatar
Discard
Author

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

Author

I have found it. It works. Thank you.

Its ok @Uppili Arivukkannu