Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4687 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мар. 15
3672
1
июл. 24
1777
1
мая 24
2631
1
янв. 24
4829
2
мар. 23
2611