Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
8398 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Penulis

I have found it. It works. Thank you.

Its ok @Uppili Arivukkannu

Post Terkait Replies Tampilan Aktivitas
9
Apr 22
29071
2
Des 17
16892
0
Mar 16
3346
0
Des 15
4346
0
Apr 15
3934