Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4689 Näkymät

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
Hylkää
Tekijä Paras vastaus

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

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
maalisk. 15
3672
1
heinäk. 24
1778
1
toukok. 24
2631
1
tammik. 24
4831
2
maalisk. 23
2611