Skip to content

Commit

Permalink
[WIP] Commit before rebase on latest OCA#109 for user and view updates
Browse files Browse the repository at this point in the history
Migration of printer_tray to v11 and integration with base_report_to_printer
  • Loading branch information
gdgellatly authored and flachica committed Oct 1, 2022
1 parent a25340d commit a0a2f6f
Show file tree
Hide file tree
Showing 44 changed files with 2,622 additions and 770 deletions.
37 changes: 22 additions & 15 deletions base_report_to_printer/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@ Report To Printer

This module allows users to send reports to a printer attached to the server.


It adds an optional behaviour on reports to send it directly to a printer.

* `Send to Client` is the default behaviour providing you a downloadable PDF
* `Send to Printer` prints the report on selected printer

It detects trays on printers installation plus permits to select the
paper source on which you want to print directly.

Report behaviour is defined by settings.

You will find this option on default user config, on default report
config and on specific config per user per report.

This allows you to dedicate a specific paper source for example for
preprinted paper such as payment slip.

Settings can be configured:

* globaly
* globally
* per user
* per report
* per user and report
Expand All @@ -33,8 +40,8 @@ Installation
sudo apt-get install cups
sudo apt-get install libcups2-dev
sudo apt-get install python-dev OR sudo apt-get install python3-dev
sudo easy_install pycups OR sudo pip install pycups
sudo apt-get install python3-dev
sudo pip install pycups
Configuration
Expand All @@ -47,12 +54,17 @@ rights to give users the ability to view the print menu.
Usage
=====

To show all available printers for your server, use the
`Settings/Configuration/Printing/Update Printers from CUPS` wizard.

* To update the CUPS printers in *Settings > Printing > Update Printers
from CUPS*
* If you want to print a report on a specific printer or tray, you can change
these in *Settings > Printing > Reports* to define default behaviour.
* If you want to print a report on a specific printer and/or tray for a user, you can
change these in *Settings > Printing > Reports* in
*Specific actions per user*
* Users may also select a default action, printer or tray in their preferences

Then go to the user profile and set the users printing action and default
printer.
When no tray is configured for a report and a user, the
default tray setup on the CUPS server is used.

Caveat
------
Expand All @@ -62,12 +74,7 @@ displayed for the deprecated report types (RML, Webkit, ...).

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/144/9.0


Known issues / Roadmap
======================

:target: https://runbot.odoo-community.org/runbot/144/11.0


Bug Tracker
Expand Down
4 changes: 2 additions & 2 deletions base_report_to_printer/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

{
'name': "Report to printer",
'version': '11.0.1.0.1',
'version': '11.0.2.0.0',
'category': 'Generic Modules/Base',
'author': "Agile Business Group & Domsense, Pegueroles SCP, NaN,"
" LasLabs, Odoo Community Association (OCA)",
" LasLabs, Camptocamp, Odoo Community Association (OCA)",
'website': 'http://www.agilebg.com',
'license': 'AGPL-3',
"depends": ['web'],
Expand Down
4 changes: 2 additions & 2 deletions base_report_to_printer/data/printing_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field name="model_id" ref="base_report_to_printer.model_printing_server"/>
<field eval="'action_update_jobs'" name="function"/>
<field eval="'()'" name="args"/>
<field name="state">code</field>
<field name="code">model.action_update_jobs()</field>
</record>

</odoo>
98 changes: 77 additions & 21 deletions base_report_to_printer/i18n/am.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-24 02:40+0000\n"
"PO-Revision-Date: 2017-04-24 02:40+0000\n"
"POT-Creation-Date: 2017-12-19 03:38+0000\n"
"PO-Revision-Date: 2017-12-19 03:38+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n"
"MIME-Version: 1.0\n"
Expand All @@ -29,7 +29,6 @@ msgid "Aborted by the system"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_ir_act_report_xml_property_printing_action_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_action
msgid "Action"
msgstr ""
Expand All @@ -50,6 +49,11 @@ msgstr ""
msgid "Address"
msgstr ""

#. module: base_report_to_printer
#: model:ir.ui.view,arch_db:base_report_to_printer.printing_printer_view_form
msgid "Are you sure to want to cancel all jobs of this printer?"
msgstr ""

#. module: base_report_to_printer
#: selection:printing.printer,status:0
msgid "Available"
Expand Down Expand Up @@ -138,6 +142,7 @@ msgstr ""
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_update_wizard_create_uid
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_create_uid
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_create_uid
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_create_uid
msgid "Created by"
msgstr "Creado por"

Expand All @@ -148,6 +153,7 @@ msgstr "Creado por"
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_update_wizard_create_date
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_create_date
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_create_date
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_create_date
msgid "Created on"
msgstr "Creado en"

Expand Down Expand Up @@ -197,10 +203,21 @@ msgid "Default"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_ir_act_report_xml_property_printing_action_id
msgid "Default Behaviour"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_ir_act_report_xml_printing_printer_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_res_users_printing_printer_id
msgid "Default Printer"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_res_users_printer_tray_id
msgid "Default Printer Paper Source"
msgstr ""

#. module: base_report_to_printer
#: model:ir.ui.view,arch_db:base_report_to_printer.printing_printer_view_form
msgid "Disable"
Expand All @@ -213,14 +230,15 @@ msgstr ""
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_update_wizard_display_name
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_display_name
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_display_name
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_display_name
msgid "Display Name"
msgstr ""

#. module: base_report_to_printer
#. openerp-web
#: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.js:33
#, python-format
msgid "Document sent to the printer "
msgid "Document sent to the printer %s"
msgstr ""

#. module: base_report_to_printer
Expand Down Expand Up @@ -251,7 +269,7 @@ msgid "Error when sending the document to the printer "
msgstr ""

#. module: base_report_to_printer
#: code:addons/base_report_to_printer/models/printing_server.py:43
#: code:addons/base_report_to_printer/models/printing_server.py:42
#, python-format
msgid ""
"Failed to connect to the CUPS server on %s:%s. Check that the CUPS server is"
Expand Down Expand Up @@ -280,6 +298,7 @@ msgstr ""
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_update_wizard_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_id
msgid "ID"
msgstr "ID"

Expand Down Expand Up @@ -327,6 +346,7 @@ msgstr ""
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_update_wizard___last_update
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action___last_update
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server___last_update
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray___last_update
msgid "Last Modified on"
msgstr ""

Expand All @@ -337,6 +357,7 @@ msgstr ""
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_write_uid
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_write_uid
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_write_uid
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_write_uid
msgid "Last Updated by"
msgstr "Última actualización por"

Expand All @@ -347,6 +368,7 @@ msgstr "Última actualización por"
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_write_date
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_write_date
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_write_date
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_write_date
msgid "Last Updated on"
msgstr "Última actualización en"

Expand Down Expand Up @@ -375,6 +397,7 @@ msgstr ""
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_job_name
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_name
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_server_name
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_name
msgid "Name"
msgstr ""

Expand All @@ -389,7 +412,7 @@ msgid "No data has been received"
msgstr ""

#. module: base_report_to_printer
#: code:addons/base_report_to_printer/models/report.py:21
#: code:addons/base_report_to_printer/models/ir_actions_report.py:113
#, python-format
msgid "No printer configured to print this report."
msgstr ""
Expand All @@ -404,6 +427,17 @@ msgstr ""
msgid "Ok"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_ir_act_report_xml_printer_tray_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_printer_tray_id
msgid "Paper Source"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_tray_ids
msgid "Paper Sources"
msgstr ""

#. module: base_report_to_printer
#: selection:printing.job,job_state:0
msgid "Pending"
Expand Down Expand Up @@ -441,12 +475,17 @@ msgstr ""

#. module: base_report_to_printer
#: model:ir.model,name:base_report_to_printer.model_printing_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_ir_act_report_xml_printing_printer_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_job_printer_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_printer_id
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_printer_id
msgid "Printer"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model,name:base_report_to_printer.model_printing_tray
msgid "Printer Tray"
msgstr ""

#. module: base_report_to_printer
#: selection:printing.job,job_state_reason:0
msgid "Printer is stopped"
Expand Down Expand Up @@ -499,6 +538,11 @@ msgstr ""
msgid "Printing / Print User"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_res_users_printing_action
msgid "Printing Action"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model,name:base_report_to_printer.model_printing_job
msgid "Printing Job"
Expand All @@ -514,11 +558,6 @@ msgstr ""
msgid "Printing Report Printing Actions"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_res_users_printing_action
msgid "Printing action"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model,name:base_report_to_printer.model_printing_server
msgid "Printing server"
Expand Down Expand Up @@ -553,7 +592,6 @@ msgstr ""
#. openerp-web
#: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.js:32
#: code:addons/base_report_to_printer/static/src/js/qweb_action_manager.js:35
#: model:ir.model,name:base_report_to_printer.model_report
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_report_xml_action_report_id
#, python-format
msgid "Report"
Expand Down Expand Up @@ -637,12 +675,13 @@ msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_status_message
msgid "Status message"
msgid "Status Message"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_printer_system_name
msgid "System name"
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_tray_system_name
msgid "System Name"
msgstr ""

#. module: base_report_to_printer
Expand All @@ -668,17 +707,22 @@ msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_job_time_at_completed
msgid "Time at completed"
msgid "Time At Completed"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_job_time_at_creation
msgid "Time at creation"
msgid "Time At Creation"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model.fields,field_description:base_report_to_printer.field_printing_job_time_at_processing
msgid "Time at processing"
msgid "Time At Processing"
msgstr ""

#. module: base_report_to_printer
#: model:ir.ui.view,arch_db:base_report_to_printer.printing_printer_view_form
msgid "Trays"
msgstr ""

#. module: base_report_to_printer
Expand Down Expand Up @@ -706,6 +750,11 @@ msgstr ""
msgid "Unknown"
msgstr ""

#. module: base_report_to_printer
#: model:ir.ui.view,arch_db:base_report_to_printer.printing_printer_view_form
msgid "Unset Default"
msgstr ""

#. module: base_report_to_printer
#: selection:printing.job,job_state_reason:0
msgid "Unsupported format"
Expand All @@ -721,6 +770,13 @@ msgstr ""
msgid "Update Printers"
msgstr ""

#. module: base_report_to_printer
#: model:ir.actions.server,name:base_report_to_printer.ir_cron_update_printers_ir_actions_server
#: model:ir.cron,cron_name:base_report_to_printer.ir_cron_update_printers
#: model:ir.cron,name:base_report_to_printer.ir_cron_update_printers
msgid "Update Printers Jobs"
msgstr ""

#. module: base_report_to_printer
#: model:ir.actions.act_window,name:base_report_to_printer.action_printer_update_wizard
#: model:ir.ui.menu,name:base_report_to_printer.menu_printer_update_wizard
Expand All @@ -739,8 +795,8 @@ msgid "Users"
msgstr ""

#. module: base_report_to_printer
#: model:ir.model,name:base_report_to_printer.model_ir_actions_report_xml
msgid "ir.actions.report.xml"
#: model:ir.model,name:base_report_to_printer.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""

#. module: base_report_to_printer
Expand Down

0 comments on commit a0a2f6f

Please sign in to comment.