تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4710 أدوات العرض

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
مارس 15
3690
1
يوليو 24
1836
1
مايو 24
2677
1
يناير 24
4939
2
مارس 23
2689