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)
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
1
maj 26
|
1368 | |||
|
1
okt. 25
|
1713 | |||
|
1
sep. 24
|
4610 | |||
|
1
aug. 24
|
4186 | |||
|
1
jan. 23
|
5044 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.