Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4697 Widoki

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?

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
3672
1
lip 24
1779
1
maj 24
2635
1
sty 24
4835
2
mar 23
2613