[5.0 & 6.0] Print workflow doesn't work if there is more than one workflow defined
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) | Status tracked in Trunk | |||||
6.0 |
Fix Released
|
Undecided
|
OpenERP Publisher's Warranty Team | |||
Trunk |
Incomplete
|
Low
|
OpenERP's Framework R&D |
Bug Description
The print workflow report (bin/addons/
This usually won't happen for a default installation of OpenERP, as most objects currently have just one workflow. But it may happen when a developer wants to create an alternative workflow (either to replace a default workflow [the new workflow would have on_create = True, and the original workflow would be set to on_create = False], or just to have alternative workflows that would be instanced by hand [on create = False]).
*** HOW TO REPRODUCE ***
- Print the sale order's workflow => it works.
- Go to Administration -> Customization -> Workflow definitions -> Workflows.
- Create a new workflow (as simple as possible) for the sale order.
- Set the new workflow as default ("On Create" set), and disable the original one ("On Create" unset).
- Print the previous sale order's workflow again => it works (still uses the original workflow).
- Create a new sale order (this sale order will get the new workflow).
- Print the new sale order's workflow => it prints a blank page.
*** DETAILS ***
When generating the report, only the first kind of workflow available for the given model (for the sale order object for example) is checked. So, when the object (whose workflow instance is being printed) created ("on create") a different kind of workflow, it is unable to find the workflow instance to print and a blank page is printed instead.
*** SOLUTION ***
- The report should check first if the object has a workflow instance already and, if available, use that instance workflow instead of the default one.
- Otherwise (new object instance), the first workflow with "on_create" should be used (instead of just the first one).
Changed in openobject-server: | |
status: | New → Triaged |
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Low |
status: | Triaged → Confirmed |
for trunk version its working fine...the new work flow is taken into account while printing it..
So I am closing it for the trunk series and assigning it to the 6.0 where its reproducible here it prints blank page as mentioned in the original bug description.
Thanks,