Hi, new odoo ce user, trying to sort my issues. image below pretty much shows context precisely, i wanted to access linked Work Orders . Any ideas, huge thanks in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi, new odoo ce user, trying to sort my issues. image below pretty much shows context precisely, i wanted to access linked Work Orders . Any ideas, huge thanks in advance.
The better way to go about this would be to use self.env to perform the search. The code you have executes an XMLRPC event. Using self.env, your code would look like
result = self.env['mrp.workorder'].search([('production_id', '=', '3')])
not sure, this is best answer, but atlease i managed to solve this, by adding line below in python function :)
result = models.execute_kw(db, uid, password, 'mrp.workorder', 'search', [[['production_id
...: ', '=', 3]]])
relWorkOrders = self.env['mrp.workorder'].search([('production_id','=',self.id)])
mo = self.env['mrp.workorder']
wo_fields = ['name','state','workcenter_id']
relWorkOrdersData = mo.search_read([('production_id','=',self.id)],wo_fields)
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 7 25
|
348 | ||
|
1
thg 9 24
|
2013 | ||
|
1
thg 8 24
|
2063 | ||
|
1
thg 1 23
|
3011 | ||
|
3
thg 1 23
|
10864 |