콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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