Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4675 Vistas

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 Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 15
3665
1
jul 24
1758
1
may 24
2617
1
ene 24
4799
2
mar 23
2598