跳至内容
菜单
此问题已终结

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

形象
丢弃

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 !

编写者

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

最佳答案

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

形象
丢弃
编写者

Thanks ;)

相关帖文 回复 查看 活动
0
4月 16
4538
2
2月 25
2373
0
11月 19
3751
1
6月 23
2072
0
6月 22
2648