Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3526 Lượt xem

I need to print the same report with different Printers connected to the IoT box. 

I know we can select the Printer in the report, using the field "IoT Device" to print the selected report with that Printer. But I need to be able to change the printer based on the logged user.

Suppose I add one field "Printer" in the user profile and from there I select the printer, then any report printed for that user has to be sent to that Printer. 

I tried to extend the method 'report_action', because I saw in iot/models/ir_actions_report.py the extend it to check if the report has any device_id; so I thought I could do a similar to check the logged user printer and use it, but I am not able to extend that method. I mean, when I click 'Print' (lets say in tha sale order quotation report) my function is not called. 

Any hint?  

Ảnh đại diện
Huỷ bỏ
Tác giả

I inherited ir.actions.report, and extended method "report_action". I realized that if I go inside any form view -> Print -> Any report name, my function is not called. But, if I go to product.product form view, and clic in the button "Print Labels" after the wizard to choose Labels Layout my extended method is called.

Câu trả lời hay nhất

Hello Reinaldo,

you can use Odoo Direct Print module - https://apps.odoo.com/apps/modules/15.0/printnode_base/. It allows to assign a default printer to related user


Ảnh đại diện
Huỷ bỏ

Here are the differences between ODP and IoT box https://youtu.be/NrEC3yzJpv8

Câu trả lời hay nhất

Any possibility to do this with native IoT box? We bought Odoo Enterprise to use it without cloud for security reasons. So Printnode or any other cloud-based plugin is not suitable for us...

Ảnh đại diện
Huỷ bỏ

In Odoo V15.0 not in stable
Only from V17.0

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 25
2795
2
thg 1 23
2717
0
thg 9 22
2379
1
thg 9 22
2106
1
thg 4 21
5353