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

I am using a third-party module in Odoo to do mass label printing ([https://www.odoo.com/apps/modules/12.0/label/][1]) and despite that the fact that the module claims to be compatible with version 12, I am getting server errors when trying to run the pdf rendering:

Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1677, in report_download
response = self.report_routes(reportname, converter=converter, **dict(data))
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1614, in report_routes
pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 677, in render_qweb_pdf
html = self.with_context(context).render_qweb_html(res_ids, data=data)[0]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 710, in render_qweb_html
data = self._get_rendering_context(docids, data)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 723, in _get_rendering_context
data.update(report_model._get_report_values(docids, data=data))
AttributeError: 'report.label.report_label' object has no attribute '_get_report_values'

Screenshot:

![Odoo](https://i.imgur.com/FGCxLwb.png)


It may be an error related to the change of some Odoo version (or not, I don’t really know).


Does anyone know if this attribute exist? I haven’t been able to find this information in the Odoo documentation (it doesn’t seem very complete regarding these topic).


Here are some screenshots of the configurations I’m using:

https://i.imgur.com/xITBy7B.png

https://i.imgur.com/MyqQOAl.png

https://i.imgur.com/OkmZKLv.png

https://i.imgur.com/zaXUddm.png


Thank you for your help!

아바타
취소
베스트 답변

Hello,

In module go to report > dynamic_label.py file and change method name from get_report_values to _get_report_values.

Thanks

아바타
취소
작성자

Thank you for this workaround! The pdf generation is now working. By the way, now the generated pdf is blank (empty page), with 0 bytes. Am I missing something? It could be that my configuration is wrong. Do you have any working example? Thank you so much.

Hi cristian,

Please check your configuration for label printing, I have tasted for product label printing (product.template) and it looks like it works.

You can get an example from modules description (index file) from the app store and follow it to test working or not.

베스트 답변

Hello Cristian González,

For Empty pdf problem, try to set the Label Configuration by go to [ Settings >> Configuration >> Label Configuration >> Create ]

On the setting, Need to put the both of values for Height (in mm) and Width (in mm).

https://sv1.picz.in.th/images/2019/01/30/T96UO0.png


아바타
취소
관련 게시물 답글 화면 활동
3
3월 24
7175
1
12월 20
11416
6
1월 24
14041
0
10월 19
3251
1
10월 19
5800