Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
8529 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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

Autore

I have found it. It works. Thank you.

Its ok @Uppili Arivukkannu

Post correlati Risposte Visualizzazioni Attività
9
apr 22
29276
2
dic 17
17061
0
mar 16
3402
0
dic 15
4446
0
apr 15
4068