跳至内容
菜单
此问题已终结
1 回复
4698 查看

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
3673
1
7月 24
1779
1
5月 24
2638
1
1月 24
4839
2
3月 23
2617