On this selection field I want to remove the type consumable on odoo15 can a type be removed from a selection form xml
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi,
In Odoo 15, to remove a selection option like 'consu' (Consumable) from the detailed_type field, you must override the field in Python, not XML, as selection values are defined in the model.
class ProductTemplate(models.Model):
_inherit = 'product.template'
detailed_type = fields.Selection([
('product', 'Storable Product'),
('service', 'Service'),
# 'consu' removed
], string='Product Type', required=True, default='product')
Before applying this, update or delete all products with detailed_type = 'consu' to avoid errors.
Hope it helps.
You can remove the consumable type by overriding the detailed_type field in the product.template module using Python. However, before making any changes, ensure that no products are currently assigned to that type.
Thank you.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
mar 15
|
10041 | ||
|
1
mar 15
|
4427 | ||
|
0
mar 15
|
3295 | ||
|
0
mar 15
|
3441 | ||
|
0
mar 15
|
2917 |