跳至內容
選單
此問題已被標幟
1 回覆
4995 瀏覽次數

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
4527
2
2月 25
2364
0
11月 19
3750
1
6月 23
2072
0
6月 22
2644