콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5011 화면

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
4059
1
7월 24
2317
1
5월 24
3032
1
1월 24
5791
2
3월 23
3137