Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Want to change the field name?

By
Uppili Arivukkannu
on 11/2/16, 10:38 AM 198 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.





1

Nilmar Shereef

--Nilmar Shereef--
811
| 4 3 7
Calicut, India
--Nilmar Shereef--

Python Developer. Android Developer. .Net Developer

Nilmar Shereef
On 11/2/16, 11:52 PM

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?

Uppili Arivukkannu
on 11/3/16, 2:06 AM

I have found it. It works. Thank you.

Uppili Arivukkannu
on 11/3/16, 2:15 AM

Its ok @Uppili Arivukkannu

Nilmar Shereef
on 11/3/16, 4:15 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/2/16, 10:38 AM
Seen: 198 times
Last updated: 11/3/16, 2:15 AM