Skip to Content
Menu
This question has been flagged
1 Atsakyti
4680 Rodiniai

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?

Portretas
Atmesti
Autorius Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
kov. 15
3667
1
liep. 24
1763
1
geg. 24
2620
1
saus. 24
4805
2
kov. 23
2599