El 20/06/14 10:44, Paul Leverett ha escrit:
Hello,

I have been trying to make a new "Production Picklist" report for use in the production model.
That will be great!

I have created a .odt document based upon the standard Picking_List (that is used Shipment module) This works fine for basic header information - Production, Reference, Code, BOM name etc. - OK with both single and multiple Production records.

But I am having ongoing problems with selecting the Input and Output data.
For testing, I have stripped this down to a very basic statement:
<for each="input in inputs[production.id]">Test</for>
That will be:

<for each="input in production.inputs"> Test </for>

and for outputs:
<for each="output in production.outputs"> Test </for>


The equivalent in Customer Shipments is <for each="move in moves[shipment.id]">test</for> and have checked that this works OK with an edited copy of picking_list.odt

That's because the moves on the picking list are sorted passed on local context of the report in:

http://hg.tryton.org/modules/stock/file/6acb20d9c7e7/shipment.py#l2162

So you can access directly from the moves variable.

Which i guess you are not doing in your report.

But I get 500 Internal Server Error every time.

Could someone please tell me which field names I should use?
Is it "input in inputs"? or "production_inputs"? or "input.input on inputs.production"? Or??

Also, is it right to use [production.id]? I know this exists because I can print it on my report.
The problem is that the moves is not populated, so you gt the error.

I am trying to learn by example, but in this case I cannot understand the syntax properly.

Or is there some other problem that is causing this to not work?

It would be great to get this working, it looks very easy to do but this bit is is driving me mad!

Thanks & regards,
Paul


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Reply via email to