跳至內容
選單
此問題已被標幟
1 回覆
4677 瀏覽次數

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?

頭像
捨棄
作者 最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 15
3665
1
7月 24
1759
1
5月 24
2617
1
1月 24
4799
2
3月 23
2598