Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4700 มุมมอง

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
3682
1
ก.ค. 24
1788
1
พ.ค. 24
2644
1
ม.ค. 24
4857
2
มี.ค. 23
2623