This question has been flagged
2 Replies
5183 Views

Hi,

I'm trying to write a further "bill of materials" report. The first use of repeatIn() works fine :

[[repeatIn(objects,'pricelist')]]

[[pricelist.name]] ([[pricelist.product_qty]] [[pricelist.product_uom.name]])

But the second use of repeatIn() doesn't work:

[[repeatIn(get_children(pricelist.bom_lines), 'l')]]

When I'm try to printing the report I get an error message:

name 'get_children' is not defined

(<type 'exceptions.nameerror'="">, NameError("name 'get_children' is not defined",), <traceback object="" at="" 0x05f00990="">)

Can somebody help me? Thanks

BR Torsten

Avatar
Discard
Best Answer

Dear Tormen,

I have the same problem with the "mrp_industrial_design_bom". Have you solved this issue?

Regards, Paul

Avatar
Discard
Best Answer

The error indicates that the method you want to use (get_children) is not defined, or that the code has not been reloaded.

How did you get to the point of using get_children? Is it an existing method or did you write it yourself?

The second thing I notice is that the first repeatIn has got 2 inputs (objects,'pricelist'), while the second repeatIn only has got 1 (get_children()). I have not worked with reports myself yet, so this is at the moment what I can tell you.

Avatar
Discard
Author

I've duplicated the BOM report, changed and saved it under "pricelist". I think the problem is that I'm not using new python scripts for my new pricelist. At the moment I've not realized the complete structure of scripts, reports, etc. I also tried this little tutorial : http://help.openerp.com/question/5224/put-report-in-module/. But it doesn't work too. I will try it again without changing any variables and filenames.