Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5090 Tampilan

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
Buang
Penulis Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mar 15
4157
1
Jul 24
2371
1
Mei 24
3112
1
Jan 24
6002
2
Mar 23
3219