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.
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)
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit se| Related Posts | Odpovědi | Zobrazení | Aktivita | |
|---|---|---|---|---|
|
1
kvě 26
|
1366 | |||
|
1
říj 25
|
1711 | |||
|
|
1
zář 24
|
4571 | ||
|
1
srp 24
|
4184 | |||
|
1
led 23
|
5043 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.