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

What I mean is that;

Model with name "stock.return.picking" has "location_id" field. 

When I click on the return button , I want to see all the location_id. But location_id has domain:

location_id = fields.Many2one(  'stock.location', 'Return Location',

       domain="['|', ('id', '=', original_location_id), '&', ('return_location', '=', True), ('id', 'child_of',     parent_location_id)]")


How can I change this domain?

الصورة الرمزية
إهمال
أفضل إجابة

Hi..

You need to inherit the model stock.return.picking and just re-define the field.

class ClassName(models.Model):

     _inherit = 'stock.return.picking'

    location_id = fields.Many2one(  'stock.location', domain=[])

Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يناير 20
12190
1
يناير 20
4897
1
مارس 23
2512
2
ديسمبر 22
24065
0
مارس 20
4214