İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4684 Görünümler

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
Vazgeç
Üretici En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Mar 15
3671
1
Tem 24
1770
1
May 24
2629
1
Oca 24
4823
2
Mar 23
2607