Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4706 Vizualizări

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?

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mar. 15
3688
1
iul. 24
1824
1
mai 24
2666
1
ian. 24
4923
2
mar. 23
2681