Skip to Content
Menú
This question has been flagged
1 Respondre
4688 Vistes

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
Descartar
Autor Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de març 15
3672
1
de jul. 24
1778
1
de maig 24
2631
1
de gen. 24
4831
2
de març 23
2611