Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4693 Переглядів

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
1779
1
трав. 24
2635
1
січ. 24
4834
2
бер. 23
2613