I don't see where to modify the default behavior of the "print screen" print action...

Asked by Sneridagh

I want to modify the resultant pdf. Is there any graphical way to do it or code based?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenERP Edit question
Assignee:
No assignee Edit question
Solved by:
Sneridagh
Solved:
Last query:
Last reply:
Revision history for this message
Husen Daudi (husendaudi) said :
#1

There isn't any graphical way.
you have to change this file as per your requirements to change print screen reports.

/openobject-server/bin/report/printscreen/ps_list.py

Revision history for this message
Sneridagh (sneridagh) said :
#2

Ok, but that raises another question... I have reviewed the code, and it must print in base to the columns existing in that "list" view, but it doesn't... I've changed the list view and it doesn't reflects in the "print screen"... it shows always the same fields.

Did I do something wrong?

Thanks,

Revision history for this message
Husen Daudi (husendaudi) said :
#3

I removed some fields from view and I got effect on my print screen report too.
I have changed order of fields and print. I am getting printscreen report in the same order.
so both way it works for me. can you please check again?

Revision history for this message
Sneridagh (sneridagh) said :
#4

Maybe I'm doing things wrong... Let me explain you how I modified the view:
First things first, I want to customize the print screen action of the "All Opportunities" menu item, that (correct me if I'm wrong) is an action itself which points to the CRM-Opportunities Tree view. In that view is where I have changed the shown columns modifying its XML code:
<?xml version="1.0"?>

            <tree colors="red:state=='open'" string="Opportunities Tree">
                <field name="id"/>
                <field name="name" string="Opportunities"/>
                <field name="categ_id" string="Interesado en"/>
                <field name="stage_id" string="Sales Stage"/>
                <field name="partner_id" string="Partner"/>
                <field name="date" string="Next Meeting"/>
                <field name="user_id"/>
                <field name="state"/>
            </tree>
The changes shown in the main view of "All Opportunities" but the print screen view doesn't match at all. It adds more fields like "end date" and so on...

Thanks for answering,
V.

Revision history for this message
Sneridagh (sneridagh) said :
#5

Ok, I just seen what's the problem... The print screen on that action refered to another tree view, which is shown in the report>all cases menu. I've changed it, and all works perfectly.

Thanks for all!
V.

Revision history for this message
Damien Raemy (damien.raemy) said :
#6

Hello,

I have the same problem. Could you say me where to find the report>all cases menu? It could be very usefull.

Thank you.