22 lines
854 B
Python
22 lines
854 B
Python
step = env['fp.job.step'].search([('job_id.name', '=', 'WH/JOB/00337')], limit=1, order='sequence')
|
|
print('Step:', step.name)
|
|
|
|
# Simulate the EXACT OWL get_views call for this action
|
|
result = step._fp_open_input_wizard(advance_after=True)
|
|
print('view_id:', result.get('view_id'))
|
|
print('views:', result.get('views'))
|
|
|
|
# Now invoke get_views with this view_id explicitly
|
|
view_id = result.get('view_id')
|
|
W = env['fp.job.step.input.wizard']
|
|
gv = W.get_views([(view_id, 'form')])
|
|
print('models served:')
|
|
for mname, minfo in gv['models'].items():
|
|
print(' ', mname, '->', list((minfo.get('fields') or {}).keys())[:10])
|
|
|
|
# Check arch
|
|
arch = gv['views']['form']['arch']
|
|
print('arch has <list>?', '<list' in arch)
|
|
print('arch has <field name="name">?', '<field name="name"' in arch)
|
|
print('arch has <field name="line_ids">', '<field name="line_ids"' in arch)
|