openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #04686
[Bug 909755] Re: Cannot open duplicated special reports (e.g. "Order with Layout" from sale_layout)
For the record, here is what I answered on the converted question:
The "Order with Layout" report is a special kind of report that cannot
be duplicated, because it depends on a special preprocessor system that
makes a virtual "sale_order_lines" value available during report
generation. This list contains the sale order lines in a special format,
allowing the rendering the various layout options chosen on the sale
order.
Of course the "Order with Layout" report uses this virtual "sale_order_lines", so if you duplicate it and create a normal report it will not have the special preprocessor (it is based on the normal "sale order" document), so you will get an error when it tries to access the missing virtual value. Duplicating special reports with preprocessors is not possible, but you have other options:
- modify the original report directly
- or after duplicating the report, remove the references to virtual fields that do not exist in the base document
For example for the Order with Layout report you could change the "loop"
on the order lines using the Report Designer, to make it loop on the
normal "Order Lines" field (order_line), instead of the virtual
sale_order_lines (called here sale_order_lines(o)).
Thanks for your understanding!
PS: we could improve the system to warn about duplicating special
reports with preprocessors, but there is no way currently to know for
sure if a report cannot be duplicated, so that would be a new
development (wishlist). At the same time we could also improve the error
message, but at least it shows the correct issue: the report refers to a
'sale_order_lines' name that cannot be found.
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/909755
Title:
Cannot open duplicated special reports (e.g. "Order with Layout" from
sale_layout)
Status in OpenERP Addons (modules):
Invalid
Bug description:
With OpenERP 6.0.3 (on SaaS platform).
I tried to duplicate the report "Order with layout" but I get an error
when I tried to open the duplicated one.
Here is the error I get:
(<type 'exceptions.NameError'>, NameError("name 'sale_order_lines' is not defined",), <traceback object at 0x7fcf38768908>)
Step to reproduce the bug:
- Install the module sale_order_layout and base_report_designer
- Open OpenOffice writer and select "Modify an existing report"
- Copy the content of the Sale Order report and paste it in a new document
- Select the option "Open new report" and choose "Sale Order" in the list
- Save your report and send it to the server
- Open the report in OpenERP
==> Bug!
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/909755/+subscriptions
References