Odoo Help

0

New Module: Change Domain Filter of Field

By
Peter
on 3/23/15, 9:18 AM 1,108 views

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?

1
Peter
On 3/25/15, 5:01 AM

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 3/23/15, 9:18 AM
Seen: 1108 times
Last updated: 3/25/15, 5:01 AM