Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4709 Vues

Hi, i want to change the domain filter of a existing field. e.g. in class stock_move in file: addons/stock/stock.py

'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('state','<>','obsolete')],states={'done': [('readonly', True)]}), 

I want to write a new module for that, which overwrites the existing column with the new domain. How can I do this?

Avatar
Ignorer
Auteur Meilleure réponse

Inheriting the existing model and overwriting the existing _column in my mymodule.py seems to work. No view.xml needed.

Avatar
Ignorer
Publications associées Réponses Vues Activité
1
mars 15
3690
1
juil. 24
1836
1
mai 24
2677
1
janv. 24
4939
2
mars 23
2689