module base_calendar overrides printing service

Bug #837552 reported by Marco-jem
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

I'm trying to port the PrintJob module to OpenERP 6 and doing this work I noticed that module base_calendar is doing something strange with the print service.

The class base_calendar.virtual_report_spool derives from the standard printing service (web_service.report_spool) and do something strange with ids passed to the method exp_report(), is seems that ids passed to the report generation method needs to be translated from base_calendar_id to real_id by the function base_calendar_id2real_id() also it seems this function is applied to ids of every report generated.
I tried to execute the server in debug mode and placing break points inside the method base_calendar.virtual_report_spool.exp_report() but while the new web service for report generation is correctly registered the method exp_report of the class base_calendar.virtual_report_spool is never executer.

I think replacing the report generation web service is probably not the correct strategy for doing ids translations.

I'm reporting this bug because I'm trying to port PrintJob module to OpenERP 6 and I need to override the default web service for generating reports (implemented in the class web_service.report_spool) with a new service implemented in PrintJob, now I can't do this because base_calendar module overrides the default service for printing and classes of this module are instantiated after the classes of PrintJob module, the result is an override of the PrintJob printing service.

Revision history for this message
Carlo - Didotech.com (iw3hxn) wrote :

I have the same problem

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Marco-jem,

I have checked your issue but I am not getting exactly your problem. Print job module is not compatible with the openERP version,

If you have any other module or related example to reproduce the problem. For print job module we already close the related

following bug:

https://bugs.launchpad.net/openobject-addons/+bug/681532

Thanks and waiting for your reply.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Lorenzo Battistini (elbati) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I am not sure about the way base_calendar is using/overriding services, so would you please double check the service logic for this.

The addons team is not concern to the service logic so as per generalise issue I am assigning this to framework team but need to double check.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Vo Minh Thu (thu) wrote :

Indeed hijacking a service is a one-shot possibility if we don't want to brake the previous one. Currently the server doesn't provide any way to have multiple, independent inheriting classes. Something similar to the Model class _inherit is needed for services.

affects: openobject-addons → openobject-server
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

Any progress?

summary: - OpenERP 6.0.3 - module base_calendar overrides printing service
+ module base_calendar overrides printing service
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.