odoo-addon-base-report-to-printer 15.0.1.2.0.1__py3-none-any.whl → 15.0.1.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of odoo-addon-base-report-to-printer might be problematic. Click here for more details.

@@ -7,7 +7,7 @@ Report to printer
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:a45690bf8aec749dce7fff61da2c6d09998d9c5ef45f787de50f09e0df96acce
10
+ !! source digest: sha256:d01e7484148b791ad16131189bac95c50224b19a7bff27f4720ab76fa22d1efd
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -106,6 +106,13 @@ Guidelines for use:
106
106
  When no tray is configured for a report and a user, the
107
107
  default tray setup on the CUPS server is used.
108
108
 
109
+ Known issues / Roadmap
110
+ ======================
111
+
112
+ - With threaded printing there's no download fallback when the issue isn't detected by
113
+ the CUPS Odoo backend. To able to do it, we would need to notify the bus or use
114
+ web_notify for it.
115
+
109
116
  Changelog
110
117
  =========
111
118
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  {
9
9
  "name": "Report to printer",
10
- "version": "15.0.1.2.0",
10
+ "version": "15.0.1.2.1",
11
11
  "category": "Generic Modules/Base",
12
12
  "author": "Agile Business Group & Domsense, Pegueroles SCP, NaN,"
13
13
  " LasLabs, Camptocamp, Odoo Community Association (OCA),"
@@ -379,6 +379,13 @@ msgstr ""
379
379
  msgid "If checked, this server is useable."
380
380
  msgstr ""
381
381
 
382
+ #. module: base_report_to_printer
383
+ #. openerp-web
384
+ #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
385
+ #, python-format
386
+ msgid "Issue on"
387
+ msgstr ""
388
+
382
389
  #. module: base_report_to_printer
383
390
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printing_job_view_form
384
391
  msgid "Job"
@@ -552,8 +559,11 @@ msgid "Port of the server."
552
559
  msgstr ""
553
560
 
554
561
  #. module: base_report_to_printer
562
+ #. openerp-web
563
+ #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
555
564
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.act_report_xml_view
556
565
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.wizard_print_attachment_form
566
+ #, python-format
557
567
  msgid "Print"
558
568
  msgstr ""
559
569
 
@@ -828,7 +838,7 @@ msgstr ""
828
838
  #. openerp-web
829
839
  #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
830
840
  #, python-format
831
- msgid "The printer couldn't be reached. Downloading document instead"
841
+ msgid "The report"
832
842
  msgstr ""
833
843
 
834
844
  #. module: base_report_to_printer
@@ -950,6 +960,13 @@ msgstr ""
950
960
  msgid "Wizard"
951
961
  msgstr ""
952
962
 
963
+ #. module: base_report_to_printer
964
+ #. openerp-web
965
+ #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
966
+ #, python-format
967
+ msgid "couldn't be printed. Click on the button below to download it"
968
+ msgstr ""
969
+
953
970
  #. module: base_report_to_printer
954
971
  #: code:addons/base_report_to_printer/wizards/print_attachment_report.py:0
955
972
  #, python-format
@@ -1,23 +1,21 @@
1
1
  # Translation of Odoo Server.
2
2
  # This file contains the translation of the following modules:
3
- # * base_report_to_printer
3
+ # * base_report_to_printer
4
4
  #
5
- # Translators:
6
- # OCA Transbot <transbot@odoo-community.org>, 2017
7
5
  msgid ""
8
6
  msgstr ""
9
- "Project-Id-Version: Odoo Server 11.0\n"
7
+ "Project-Id-Version: Odoo Server 15.0\n"
10
8
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2017-12-19 03:38+0000\n"
12
- "PO-Revision-Date: 2023-10-16 19:36+0000\n"
13
- "Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
14
- "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
9
+ "POT-Creation-Date: 2024-11-11 16:26+0000\n"
10
+ "PO-Revision-Date: 2024-11-11 17:27+0100\n"
11
+ "Last-Translator: \n"
12
+ "Language-Team: \n"
15
13
  "Language: es\n"
16
14
  "MIME-Version: 1.0\n"
17
15
  "Content-Type: text/plain; charset=UTF-8\n"
18
- "Content-Transfer-Encoding: \n"
19
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
20
- "X-Generator: Weblate 4.17\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Generator: Poedit 3.4.4\n"
21
19
 
22
20
  #. module: base_report_to_printer
23
21
  #: model:ir.model.fields.selection,name:base_report_to_printer.selection__printing_job__job_state__aborted
@@ -59,7 +57,8 @@ msgstr "Archivado"
59
57
  #. module: base_report_to_printer
60
58
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printing_printer_view_form
61
59
  msgid "Are you sure to want to cancel all jobs of this printer?"
62
- msgstr "¿Estás seguro que quieres cancelar todos los trabajos de la impresora?"
60
+ msgstr ""
61
+ "¿Estás seguro que quieres cancelar todos los trabajos de la impresora?"
63
62
 
64
63
  #. module: base_report_to_printer
65
64
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printing_printer_view_form
@@ -298,7 +297,7 @@ msgstr "Política de cifrado para conectar al servidor. Vacía por defecto."
298
297
  #. module: base_report_to_printer
299
298
  #: model:ir.model.fields.selection,name:base_report_to_printer.selection__printing_printer__status__error
300
299
  msgid "Error"
301
- msgstr "Error"
300
+ msgstr ""
302
301
 
303
302
  #. module: base_report_to_printer
304
303
  #: model:ir.model.fields.selection,name:base_report_to_printer.selection__printing_job__job_state_reason__compression-error
@@ -314,8 +313,8 @@ msgstr "Error en el documento"
314
313
  #: code:addons/base_report_to_printer/models/printing_server.py:0
315
314
  #, python-format
316
315
  msgid ""
317
- "Failed to connect to the CUPS server on %(address)s:%(port)s. Check that the "
318
- "CUPS server is running and that you can reach it from the Odoo server."
316
+ "Failed to connect to the CUPS server on %(address)s:%(port)s. Check that "
317
+ "the CUPS server is running and that you can reach it from the Odoo server."
319
318
  msgstr ""
320
319
  "Ha fallado la conexión al servidor CUPS en %(address)s:%(port)s. Compruebe "
321
320
  "que el servidor CUPS está en funcionamiento y que el servidor de Odoo tiene "
@@ -379,7 +378,7 @@ msgstr "Retenido por que la impresora está desconectada"
379
378
  #: model:ir.model.fields,field_description:base_report_to_printer.field_wizard_print_attachment__id
380
379
  #: model:ir.model.fields,field_description:base_report_to_printer.field_wizard_print_attachment_line__id
381
380
  msgid "ID"
382
- msgstr "ID"
381
+ msgstr ""
383
382
 
384
383
  #. module: base_report_to_printer
385
384
  #: model:ir.model.fields,help:base_report_to_printer.field_printing_server__address
@@ -391,6 +390,13 @@ msgstr "Dirección IP o nombre del servidor"
391
390
  msgid "If checked, this server is useable."
392
391
  msgstr "Si está marcado, el servidor es utilizable."
393
392
 
393
+ #. module: base_report_to_printer
394
+ #. openerp-web
395
+ #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
396
+ #, python-format
397
+ msgid "Issue on"
398
+ msgstr "Incidencia en"
399
+
394
400
  #. module: base_report_to_printer
395
401
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printing_job_view_form
396
402
  msgid "Job"
@@ -480,7 +486,7 @@ msgstr "Modelo"
480
486
  #: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer__multi_thread
481
487
  #: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server__multi_thread
482
488
  msgid "Multi Thread"
483
- msgstr ""
489
+ msgstr "Multi Hilo"
484
490
 
485
491
  #. module: base_report_to_printer
486
492
  #: model:ir.model.fields,field_description:base_report_to_printer.field_printing_action__name
@@ -515,7 +521,7 @@ msgstr "Sin razón"
515
521
  #. module: base_report_to_printer
516
522
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printer_update_wizard
517
523
  msgid "Ok"
518
- msgstr "Ok"
524
+ msgstr ""
519
525
 
520
526
  #. module: base_report_to_printer
521
527
  #: model:ir.model.fields,field_description:base_report_to_printer.field_ir_actions_report__printer_tray_id
@@ -564,8 +570,11 @@ msgid "Port of the server."
564
570
  msgstr "Puerto del servidor."
565
571
 
566
572
  #. module: base_report_to_printer
573
+ #. openerp-web
574
+ #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
567
575
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.act_report_xml_view
568
576
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.wizard_print_attachment_form
577
+ #, python-format
569
578
  msgid "Print"
570
579
  msgstr "Imprimir"
571
580
 
@@ -657,7 +666,7 @@ msgstr "Lista de impresoras"
657
666
  #: model:ir.ui.menu,name:base_report_to_printer.printing_menu
658
667
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.view_users_form
659
668
  msgid "Printing"
660
- msgstr "Impresión"
669
+ msgstr "Imprimiendo"
661
670
 
662
671
  #. module: base_report_to_printer
663
672
  #: model:res.groups,name:base_report_to_printer.printing_group_manager
@@ -727,7 +736,7 @@ msgstr "Informe"
727
736
  #. module: base_report_to_printer
728
737
  #: model:ir.model,name:base_report_to_printer.model_ir_actions_report
729
738
  msgid "Report Action"
730
- msgstr "Informar Acción"
739
+ msgstr "Acción de informe"
731
740
 
732
741
  #. module: base_report_to_printer
733
742
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printing_report_xml_action_view_form
@@ -840,8 +849,8 @@ msgstr "El ID del trabajo debe ser único por servidor !"
840
849
  #. openerp-web
841
850
  #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
842
851
  #, python-format
843
- msgid "The printer couldn't be reached. Downloading document instead"
844
- msgstr ""
852
+ msgid "The report"
853
+ msgstr "El informe"
845
854
 
846
855
  #. module: base_report_to_printer
847
856
  #: model:ir.model.fields,help:base_report_to_printer.field_ir_actions_report__printing_action_ids
@@ -851,7 +860,8 @@ msgstr "Este campo permite configurar acción e impresora a nivel de usuario"
851
860
  #. module: base_report_to_printer
852
861
  #: model_terms:ir.ui.view,arch_db:base_report_to_printer.printer_update_wizard
853
862
  msgid ""
854
- "This process will create all missing printers from the current CUPS server.\""
863
+ "This process will create all missing printers from the current CUPS server."
864
+ "\""
855
865
  msgstr ""
856
866
  "Este proceso creará todas las impresoras que falten desde el servidor CUPS "
857
867
  "actual"
@@ -890,7 +900,7 @@ msgstr "Tipo"
890
900
  #. module: base_report_to_printer
891
901
  #: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer__uri
892
902
  msgid "URI"
893
- msgstr "URI"
903
+ msgstr ""
894
904
 
895
905
  #. module: base_report_to_printer
896
906
  #: model:ir.model.fields.selection,name:base_report_to_printer.selection__printing_printer__status__unavailable
@@ -963,37 +973,15 @@ msgstr "Usuarios"
963
973
  msgid "Wizard"
964
974
  msgstr "Asistente"
965
975
 
976
+ #. module: base_report_to_printer
977
+ #. openerp-web
978
+ #: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js:0
979
+ #, python-format
980
+ msgid "couldn't be printed. Click on the button below to download it"
981
+ msgstr "no se ha podido imprimir. Pulsar en el botón para descargarlo"
982
+
966
983
  #. module: base_report_to_printer
967
984
  #: code:addons/base_report_to_printer/wizards/print_attachment_report.py:0
968
985
  #, python-format
969
986
  msgid "{name} ({copies} copies)"
970
987
  msgstr "{name} ({copies} copies) :{name} ({copies} copias)"
971
-
972
- #, python-format
973
- #~ msgid "Document sent to the printer %s"
974
- #~ msgstr "Documento enviado a la impresora %s"
975
-
976
- #, python-format
977
- #~ msgid "Error when sending the document to the printer "
978
- #~ msgstr "Error enviando el documento a la impresora "
979
-
980
- #, python-format
981
- #~ msgid ""
982
- #~ "Failed to connect to the CUPS server on %s:%s. Check that the CUPS server "
983
- #~ "is running and that you can reach it from the Odoo server."
984
- #~ msgstr ""
985
- #~ "Ha fallado la conexión al servidor CUPS %s:%s. Comprueba que el servidor "
986
- #~ "CUPS está funcionando y que el servidor de Odoo puede comunicarse con él."
987
-
988
- #~ msgid ""
989
- #~ "This process will create all missing printers from the current CUPS "
990
- #~ "server."
991
- #~ msgstr ""
992
- #~ "Este proceso creará las impresoras no configurada del servidor CUPS "
993
- #~ "actual."
994
-
995
- #~ msgid "or"
996
- #~ msgstr "o"
997
-
998
- #~ msgid "ir.actions.report"
999
- #~ msgstr "ir.actions.report"
@@ -59,6 +59,8 @@ class IrActionsReport(models.Model):
59
59
  "skip_printer_exception"
60
60
  ):
61
61
  serializable_result["printer_exception"] = True
62
+ if self.env.context.get("force_print_to_client"):
63
+ serializable_result["action"] = "client"
62
64
  return serializable_result
63
65
 
64
66
  def _get_user_default_print_behaviour(self):
@@ -135,7 +137,10 @@ class IrActionsReport(models.Model):
135
137
 
136
138
  return True
137
139
  else:
138
- return self.print_document(record_ids, data=data)
140
+ try:
141
+ return self.print_document(record_ids, data=data)
142
+ except Exception:
143
+ return
139
144
 
140
145
  def print_document_threaded(self, report_id, record_ids, data):
141
146
  with registry(self._cr.dbname).cursor() as cr:
@@ -171,6 +176,7 @@ class IrActionsReport(models.Model):
171
176
  else:
172
177
  title = self.report_name
173
178
  behaviour["title"] = title
179
+ behaviour["res_ids"] = record_ids
174
180
  # TODO should we use doc_format instead of report_type
175
181
  return printer.print_document(
176
182
  self, document, doc_format=self.report_type, **behaviour
@@ -0,0 +1,3 @@
1
+ - With threaded printing there's no download fallback when the issue isn't detected by
2
+ the CUPS Odoo backend. To able to do it, we would need to notify the bus or use
3
+ web_notify for it.
@@ -367,7 +367,7 @@ ul.auto-toc {
367
367
  !! This file is generated by oca-gen-addon-readme !!
368
368
  !! changes will be overwritten. !!
369
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:a45690bf8aec749dce7fff61da2c6d09998d9c5ef45f787de50f09e0df96acce
370
+ !! source digest: sha256:d01e7484148b791ad16131189bac95c50224b19a7bff27f4720ab76fa22d1efd
371
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
372
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/report-print-send/tree/15.0/base_report_to_printer"><img alt="OCA/report-print-send" src="https://img.shields.io/badge/github-OCA%2Freport--print--send-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/report-print-send-15-0/report-print-send-15-0-base_report_to_printer"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/report-print-send&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <p>This module allows users to send reports to a printer attached to the server.</p>
@@ -396,16 +396,17 @@ preprinted paper such as payment slip.</p>
396
396
  <li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
397
397
  <li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
398
398
  <li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
399
- <li><a class="reference internal" href="#changelog" id="toc-entry-4">Changelog</a><ul>
400
- <li><a class="reference internal" href="#section-1" id="toc-entry-5">13.0.1.0.0 (2019-09-30)</a></li>
401
- <li><a class="reference internal" href="#section-2" id="toc-entry-6">12.0.1.0.0 (2018-02-04)</a></li>
399
+ <li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a></li>
400
+ <li><a class="reference internal" href="#changelog" id="toc-entry-5">Changelog</a><ul>
401
+ <li><a class="reference internal" href="#section-1" id="toc-entry-6">13.0.1.0.0 (2019-09-30)</a></li>
402
+ <li><a class="reference internal" href="#section-2" id="toc-entry-7">12.0.1.0.0 (2018-02-04)</a></li>
402
403
  </ul>
403
404
  </li>
404
- <li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
405
- <li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
406
- <li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
407
- <li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
408
- <li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
405
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-8">Bug Tracker</a></li>
406
+ <li><a class="reference internal" href="#credits" id="toc-entry-9">Credits</a><ul>
407
+ <li><a class="reference internal" href="#authors" id="toc-entry-10">Authors</a></li>
408
+ <li><a class="reference internal" href="#contributors" id="toc-entry-11">Contributors</a></li>
409
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
409
410
  </ul>
410
411
  </li>
411
412
  </ul>
@@ -456,23 +457,31 @@ change these in <em>Settings &gt; Printing &gt; Reports</em> in
456
457
  <p>When no tray is configured for a report and a user, the
457
458
  default tray setup on the CUPS server is used.</p>
458
459
  </div>
460
+ <div class="section" id="known-issues-roadmap">
461
+ <h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
462
+ <ul class="simple">
463
+ <li>With threaded printing there’s no download fallback when the issue isn’t detected by
464
+ the CUPS Odoo backend. To able to do it, we would need to notify the bus or use
465
+ web_notify for it.</li>
466
+ </ul>
467
+ </div>
459
468
  <div class="section" id="changelog">
460
- <h1><a class="toc-backref" href="#toc-entry-4">Changelog</a></h1>
469
+ <h1><a class="toc-backref" href="#toc-entry-5">Changelog</a></h1>
461
470
  <div class="section" id="section-1">
462
- <h2><a class="toc-backref" href="#toc-entry-5">13.0.1.0.0 (2019-09-30)</a></h2>
471
+ <h2><a class="toc-backref" href="#toc-entry-6">13.0.1.0.0 (2019-09-30)</a></h2>
463
472
  <ul class="simple">
464
473
  <li>[RELEASE] Port from V12.</li>
465
474
  </ul>
466
475
  </div>
467
476
  <div class="section" id="section-2">
468
- <h2><a class="toc-backref" href="#toc-entry-6">12.0.1.0.0 (2018-02-04)</a></h2>
477
+ <h2><a class="toc-backref" href="#toc-entry-7">12.0.1.0.0 (2018-02-04)</a></h2>
469
478
  <ul class="simple">
470
479
  <li>[RELEASE] Port from V11.</li>
471
480
  </ul>
472
481
  </div>
473
482
  </div>
474
483
  <div class="section" id="bug-tracker">
475
- <h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
484
+ <h1><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h1>
476
485
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/report-print-send/issues">GitHub Issues</a>.
477
486
  In case of trouble, please check there if your issue has already been reported.
478
487
  If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -480,9 +489,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
480
489
  <p>Do not contact contributors directly about support or help with technical issues.</p>
481
490
  </div>
482
491
  <div class="section" id="credits">
483
- <h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
492
+ <h1><a class="toc-backref" href="#toc-entry-9">Credits</a></h1>
484
493
  <div class="section" id="authors">
485
- <h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
494
+ <h2><a class="toc-backref" href="#toc-entry-10">Authors</a></h2>
486
495
  <ul class="simple">
487
496
  <li>Agile Business Group &amp; Domsense</li>
488
497
  <li>Pegueroles SCP</li>
@@ -493,7 +502,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
493
502
  </ul>
494
503
  </div>
495
504
  <div class="section" id="contributors">
496
- <h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
505
+ <h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
497
506
  <ul class="simple">
498
507
  <li>Ferran Pegueroles &lt;<a class="reference external" href="mailto:ferran&#64;pegueroles.com">ferran&#64;pegueroles.com</a>&gt;</li>
499
508
  <li>Albert Cervera i Areny &lt;<a class="reference external" href="mailto:albert&#64;nan-tic.com">albert&#64;nan-tic.com</a>&gt;</li>
@@ -518,7 +527,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
518
527
  </ul>
519
528
  </div>
520
529
  <div class="section" id="maintainers">
521
- <h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
530
+ <h2><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h2>
522
531
  <p>This module is maintained by the OCA.</p>
523
532
  <a class="reference external image-reference" href="https://odoo-community.org">
524
533
  <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -1,4 +1,5 @@
1
1
  /** @odoo-module */
2
+ import {Markup} from "web.utils";
2
3
  import {registry} from "@web/core/registry";
3
4
 
4
5
  async function cupsReportActionHandler(action, options, env) {
@@ -8,13 +9,12 @@ async function cupsReportActionHandler(action, options, env) {
8
9
  const print_action = await orm.call(
9
10
  "ir.actions.report",
10
11
  "print_action_for_report_name",
11
- [action.report_name]
12
+ [action.report_name],
13
+ {context: {force_print_to_client: action.context.force_print_to_client}}
12
14
  );
13
- if (
14
- print_action &&
15
- print_action.action === "server" &&
16
- !print_action.printer_exception
17
- ) {
15
+ var printer_exception = print_action.printer_exception;
16
+ if (print_action && print_action.action === "server" && !printer_exception) {
17
+ // The Odoo CUPS backend is ok. We try to print into the printer
18
18
  const result = await orm.call(
19
19
  "ir.actions.report",
20
20
  "print_document_client_action",
@@ -24,20 +24,58 @@ async function cupsReportActionHandler(action, options, env) {
24
24
  env.services.notification.add(env._t("Successfully sent to printer!"), {
25
25
  type: "success",
26
26
  });
27
- } else {
28
- env.services.notification.add(env._t("Could not sent to printer!"), {
29
- type: "danger",
30
- });
27
+ return true;
28
+ // In case of exception during the job, we won't get any response. So we
29
+ // should flag the exception and notify the user
31
30
  }
32
- return true;
31
+ env.services.notification.add(env._t("Could not sent to printer!"), {
32
+ type: "danger",
33
+ });
34
+ printer_exception = true;
33
35
  }
34
- if (print_action.printer_exception) {
35
- env.services.notification.add(
36
- env._t("The printer couldn't be reached. Downloading document instead"),
36
+ if (print_action && print_action.action === "server" && printer_exception) {
37
+ // Just so the translation engine detects them as it doesn't do it inside
38
+ // template strings
39
+ const terms = {
40
+ the_report: env._t("The report"),
41
+ couldnt_be_printed: env._t(
42
+ "couldn't be printed. Click on the button below to download it"
43
+ ),
44
+ issue_on: env._t("Issue on"),
45
+ };
46
+ const notificationRemove = env.services.notification.add(
47
+ Markup(
48
+ `<p>${terms.the_report} <strong>${action.name}</strong> ${terms.couldnt_be_printed}</p>`
49
+ ),
37
50
  {
51
+ title: `${terms.issue_on} ${print_action.printer_name}`,
38
52
  type: "warning",
53
+ sticky: true,
54
+ messageIsHtml: true,
55
+ buttons: [
56
+ {
57
+ name: env._t("Print"),
58
+ primary: true,
59
+ icon: "fa-print",
60
+ onClick: async () => {
61
+ const context = {
62
+ force_print_to_client: true,
63
+ must_skip_send_to_printer: true,
64
+ };
65
+ env.services.user.updateContext(context);
66
+ await env.services.action.doAction(
67
+ {type: "ir.actions.report", ...action},
68
+ {
69
+ additionalContext: context,
70
+ }
71
+ );
72
+ notificationRemove();
73
+ },
74
+ },
75
+ ],
39
76
  }
40
77
  );
78
+ return true;
41
79
  }
42
80
  }
43
81
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-base_report_to_printer
3
- Version: 15.0.1.2.0.1
3
+ Version: 15.0.1.2.1
4
4
  Summary: Report to printer
5
5
  Home-page: https://github.com/OCA/report-print-send
6
6
  Author: Agile Business Group & Domsense, Pegueroles SCP, NaN, LasLabs, Camptocamp, Odoo Community Association (OCA), Open for Small Business Ltd
@@ -23,7 +23,7 @@ Report to printer
23
23
  !! This file is generated by oca-gen-addon-readme !!
24
24
  !! changes will be overwritten. !!
25
25
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26
- !! source digest: sha256:a45690bf8aec749dce7fff61da2c6d09998d9c5ef45f787de50f09e0df96acce
26
+ !! source digest: sha256:d01e7484148b791ad16131189bac95c50224b19a7bff27f4720ab76fa22d1efd
27
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
28
 
29
29
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -122,6 +122,13 @@ Guidelines for use:
122
122
  When no tray is configured for a report and a user, the
123
123
  default tray setup on the CUPS server is used.
124
124
 
125
+ Known issues / Roadmap
126
+ ======================
127
+
128
+ - With threaded printing there's no download fallback when the issue isn't detected by
129
+ the CUPS Odoo backend. To able to do it, we would need to notify the bus or use
130
+ web_notify for it.
131
+
125
132
  Changelog
126
133
  =========
127
134
 
@@ -1,14 +1,14 @@
1
- odoo/addons/base_report_to_printer/README.rst,sha256=fEPiBk4QrIAI3dIu6baoJbpwF-wzVK90sCYZpRjIyFU,6151
1
+ odoo/addons/base_report_to_printer/README.rst,sha256=EehFgVzF2VdbjYmVXdtdTi2CiitymkkV-ZYi91VcYBk,6389
2
2
  odoo/addons/base_report_to_printer/__init__.py,sha256=Ldk9I_2g8cYtB7aM2jrf7Si9uWQbxTyaUwq31rv-X1E,439
3
- odoo/addons/base_report_to_printer/__manifest__.py,sha256=PL58VKaliyUsrp48cylSY_JO42kIc7BRCmdfAsPvu_w,1478
3
+ odoo/addons/base_report_to_printer/__manifest__.py,sha256=7QY5iRMRiMiwm-v3e89UeHg7h0Hjy7d--O1s999J_uE,1478
4
4
  odoo/addons/base_report_to_printer/data/printing_data.xml,sha256=_D1pBsEJ8oQ2JvO0lFKaAM7yypZloLcyOaG9OFYVyIM,1476
5
5
  odoo/addons/base_report_to_printer/i18n/am.po,sha256=qrCRT78q4Bf_xwzrY9Ymc7H3ldAow8SHdmXyvwcPFUs,38868
6
- odoo/addons/base_report_to_printer/i18n/base_report_to_printer.pot,sha256=mARvIWiCbpTOMMu2vLvTISHJ0zCi2RiacwLTAVIvCSU,38498
6
+ odoo/addons/base_report_to_printer/i18n/base_report_to_printer.pot,sha256=rdX_0h45gqoCv0GBX1mlj3YYwB0yoS15rrZpskW8sbA,38963
7
7
  odoo/addons/base_report_to_printer/i18n/bg.po,sha256=0FONvcYQrPjTxgL9HfZWgOyZik9MSHo0oyPBKwjo-Ec,38967
8
8
  odoo/addons/base_report_to_printer/i18n/ca.po,sha256=jgk8dnUhDt8GVbL_H-syuZ33VdDlAigkohYq9Ofy3w0,38867
9
9
  odoo/addons/base_report_to_printer/i18n/de.po,sha256=RQtQSPedHoiyOojR-azoZmUA-gip4Hag7iZjblQbZwg,42490
10
10
  odoo/addons/base_report_to_printer/i18n/el_GR.po,sha256=CGy2D15yXBWUDnjCC1azxZzeWF8hC-W9aUPr7KgcuYk,38986
11
- odoo/addons/base_report_to_printer/i18n/es.po,sha256=cuDr3HShfPHLZC3E6n0sOhcBYyK7O4clXAz1LL50ITU,44084
11
+ odoo/addons/base_report_to_printer/i18n/es.po,sha256=1T_Sgjqwd8vXfpGlAVqwXVt0YRTXtmhwjVigw6caCZk,43610
12
12
  odoo/addons/base_report_to_printer/i18n/es_AR.po,sha256=iJ0uyywg0_iYjRBwQ46aL9whBM25iYQqwqbRFv7e7nk,42656
13
13
  odoo/addons/base_report_to_printer/i18n/es_ES.po,sha256=GpUQ1nuHr6RKNuSKjXeMaXAJJGJlV7Q3jvxUsZNVQyQ,38886
14
14
  odoo/addons/base_report_to_printer/i18n/fi.po,sha256=7Z3rdVcSi6sUsJzX1bGMP_G5bm_BO-jtNylPDKftdi8,38873
@@ -27,7 +27,7 @@ odoo/addons/base_report_to_printer/i18n/sv.po,sha256=-h0_DnJhYkAEkThDVjaV-YT-P4c
27
27
  odoo/addons/base_report_to_printer/i18n/tr.po,sha256=-HvEUZyWcXiv_W_sRNh4_5a9WovUTUCnLYTrg-OzOTg,38851
28
28
  odoo/addons/base_report_to_printer/i18n/zh_CN.po,sha256=cwKzxj5xZEALApPpI2d42msMplYK42r8viAFuhOFB6k,38863
29
29
  odoo/addons/base_report_to_printer/models/__init__.py,sha256=y92zKlKN-X-KT04jwLi8XgUsY8HAbDiRvdPKDWCpvGo,243
30
- odoo/addons/base_report_to_printer/models/ir_actions_report.py,sha256=jzM43JjIX82HwdULzDQ8EhWvXmraTi8I0sn7nsThfPA,9018
30
+ odoo/addons/base_report_to_printer/models/ir_actions_report.py,sha256=h5iQG_nbXUgzi_nx4E8giDBlRjvA5afpJCsKtPNwNSY,9245
31
31
  odoo/addons/base_report_to_printer/models/printing_action.py,sha256=5i1Vdd-59RxfMoJSI_24BwpHb2BXKm7brRmO17zzsF8,912
32
32
  odoo/addons/base_report_to_printer/models/printing_job.py,sha256=jDAQABz5oDnSMW4VGJj-8J-1q3ug_EXeqERG8SNhK00,4923
33
33
  odoo/addons/base_report_to_printer/models/printing_printer.py,sha256=HR4xit5ieC6pxxYfXFx2Km2eJIdGg-VZ_FDmKs54nAI,8840
@@ -40,12 +40,13 @@ odoo/addons/base_report_to_printer/readme/CONTRIBUTORS.rst,sha256=PLRVqJh9yMBe9V
40
40
  odoo/addons/base_report_to_printer/readme/DESCRIPTION.rst,sha256=r9bWH-rEGsBaJM0owPnSZwPLCaji7FSopDvM9_Hf63Y,767
41
41
  odoo/addons/base_report_to_printer/readme/HISTORY.rst,sha256=ABtERQPm9HZB_R6jXIUgVKFWsAsN-DcRr96SX9foXZ4,153
42
42
  odoo/addons/base_report_to_printer/readme/INSTALL.rst,sha256=t2YpmitUkax9UiKn1geUUjPCNvf-uMR3oiyYdBWOXpg,246
43
+ odoo/addons/base_report_to_printer/readme/ROADMAP.rst,sha256=mR5-Z4p6Mr9qB24NLMpbiiNP-SsQmHjdffeWgQOJ_Zo,190
43
44
  odoo/addons/base_report_to_printer/readme/USAGE.rst,sha256=__mLAaeK28z7E4PnK7L038QJFltllISiWXO_gT6JhK0,593
44
45
  odoo/addons/base_report_to_printer/security/ir.model.access.csv,sha256=tIjk4kiES-JnJ_vgM7QrBSkuldIfvqUH5mZAKYPnY08,194
45
46
  odoo/addons/base_report_to_printer/security/security.xml,sha256=O00e1bSgh_Wla57UQRbRSGRKdVip4WWi8NT1dIk7j0o,7438
46
47
  odoo/addons/base_report_to_printer/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
47
- odoo/addons/base_report_to_printer/static/description/index.html,sha256=XlB7uaUZJjHke-V3l0lo9kokX-pTzadT6EsPj3wdBhI,18842
48
- odoo/addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js,sha256=qd7q0JhhshoeFD09JAHdk04AdUqMu_eEuhO_sjlcWm8,1522
48
+ odoo/addons/base_report_to_printer/static/description/index.html,sha256=PVjswPZzAxbvfvAvg-_74-ER1g9hkoGiWIT8ocW2aoo,19313
49
+ odoo/addons/base_report_to_printer/static/src/js/qweb_action_manager.esm.js,sha256=Wp1cRqIdRqYVaZE4hzPt5Ts04v8MU8MPHmahsyIHbdU,3596
49
50
  odoo/addons/base_report_to_printer/tests/__init__.py,sha256=tpUyFuG96289zrpY1fTMi-moLC2KFq_93_NjuDCw1Rg,458
50
51
  odoo/addons/base_report_to_printer/tests/test_ir_actions_report.py,sha256=IoFRIJLCy2NIA_op7TvD5V6DBy9aj_cCYlWEasVyxjI,12086
51
52
  odoo/addons/base_report_to_printer/tests/test_printing_job.py,sha256=z7LZ9eJeloIE9jHCH1x-trsU6ZzWIjKyo7xiohL_jQY,2129
@@ -68,7 +69,7 @@ odoo/addons/base_report_to_printer/wizards/print_attachment_report.py,sha256=fhS
68
69
  odoo/addons/base_report_to_printer/wizards/print_attachment_report.xml,sha256=nniCofH1YSOj_HeD4zTV1ilGTjhjCgdZUqK9lfBz2K4,2214
69
70
  odoo/addons/base_report_to_printer/wizards/printing_printer_update_wizard.py,sha256=l58Nk3BAVydb9Yi_fbh7FIpA-UDyTnvK7xIYvEr742c,895
70
71
  odoo/addons/base_report_to_printer/wizards/printing_printer_update_wizard_view.xml,sha256=UbN9xjc12hI57ojjs84hPgQOfqPbuD_XThPyvyMxp-Y,1399
71
- odoo_addon_base_report_to_printer-15.0.1.2.0.1.dist-info/METADATA,sha256=YVhd0ERAwh_QoUSpAB3JkbKwOo12-ZtepPoNO1WU9ww,6785
72
- odoo_addon_base_report_to_printer-15.0.1.2.0.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
73
- odoo_addon_base_report_to_printer-15.0.1.2.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
74
- odoo_addon_base_report_to_printer-15.0.1.2.0.1.dist-info/RECORD,,
72
+ odoo_addon_base_report_to_printer-15.0.1.2.1.dist-info/METADATA,sha256=hBiRIseusjJWU0A7tTUNR8rU3vE3bQbdvXdVooqTIRU,7021
73
+ odoo_addon_base_report_to_printer-15.0.1.2.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
74
+ odoo_addon_base_report_to_printer-15.0.1.2.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
75
+ odoo_addon_base_report_to_printer-15.0.1.2.1.dist-info/RECORD,,