I want to change the radio buttons name or rename "individual" and "company" when I create a new contact or customer
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
This change cannot be from XML or Edit View. You will have to override the selection field in your custom module and change the label.
Ex:
company_type = fields.Selection(string='Company Type',
selection=[('person', 'My Personal'), ('company', 'My Company')],
In the code, you can see I have changed the label from "Individual" to "My Personal" and "Company" to "My Company" which will be reflected in the view.
Here is the original field definition. You just need to change the label as I did.
Thanks Sudhir
/base/models/res_partner.py
I changed everything and saved but it's not reflecting on the page still showing
# company_type is only an interface field, do not use it in business logic
company_type = fields.Selection (string = 'Company Type',
selection = [('person', 'Customer'), ('company', 'Company')],
compute = '_ compute_company_type', reverse = '_ write_company_type')
Updated modules/restarted the odoo and server
Should I create a new module or any other way?
Thanks for the help
Fixed by changing on database
Thanks Sudhir
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký