Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5004 Vues

Hi. 

I've installed the web_printscreen module and the button Printscreen appears near More button.

When I'm in list view everything works fine. But when I'm in form view if I click in PDF or EXCEL I get the folowing error: 

"Cannot read property 'length' of undifined"

I wanted to know if you know how to fix it or how to remove the button "Printscreen" from form view? 

I've tryed like this in .../web_printscreen/static/xml/printscreen.xml :

<t t-name="AddPrintScreenMain"  class="oe_list_content">

but nothing happened...

Thanks

Avatar
Ignorer

Hello, Need more information from where you have downloaded this module and on which version are you running because this module is not standard in Odoo !

Auteur

I don't know, was a colleague that find this, in the file __openerp__.py : 'author': 'Zesty Beanz Technologies', 'website': 'http://www.zbeanztech.com/', 'version': '2.1', It seems to be this one : http://www.zbeanztech.com/blog/printscreen-openerp-7?page=2

Meilleure réponse

Hello,

The message is because the code is looking for visible column. But like you said, when you are in a form view, you have no columns.

So this module is done to work only with list view.

If you don't want to add the button in other view, you can update the JS file and add a condition in the redraw function : 

if (self.getParent().ViewManager.active_view === "list") {
                self.$el.find('.oe_sidebar').append(...
                self.$el.find('.oe_sidebar_printscreen_pdf')....
                self.$el.find('.oe_sidebar_printscreen_xls')....
}

It's maybe to check and to improve, but it's a first step :)

 

Good luck

Avatar
Ignorer
Auteur

Thanks ;)

Publications associées Réponses Vues Activité
0
avr. 16
4535
2
févr. 25
2371
0
nov. 19
3751
1
juin 23
2072
0
juin 22
2647