Skip to content

Commit

Permalink
[IMP] IoT: clear printer cache
Browse files Browse the repository at this point in the history
closes #10128

X-original-commit: 6e18b6f
Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
Signed-off-by: Jessica Rogers (jero) <jero@odoo.com>
Co-authored-by: ksc-odoo <73958186+ksc-odoo@users.noreply.github.com>
  • Loading branch information
jero-odoo and ksc-odoo committed Jul 8, 2024
1 parent d55739b commit ce069df
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 27 deletions.
80 changes: 53 additions & 27 deletions content/applications/general/iot/devices/printer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Connect a printer
=================

.. |iot| replace:: :abbr:`IoT (Internet of Things)`
.. |usb| replace:: :abbr:`USB (Universal Serial Bus)`

Printer installation can be done in a few easy steps. The printer can be used to print receipts,
labels, orders, or even reports from the different Odoo apps. In addition, printer actions can be
assigned as an *action on a trigger* during the manufacturing process, or added onto a quality
Expand All @@ -10,17 +13,16 @@ control point or a quality check.
Connection
==========

The :abbr:`IoT (Internet of Things)` box supports printers connected through :abbr:`USB (Universal
Serial Bus)`, network connection, or Bluetooth. `Supported printers
<https://www.odoo.com/page/iot-hardware>`__ are detected automatically, and appear in the
:guilabel:`Devices` list of the *IoT app*.
The |iot| box supports printers connected through |usb|, network connection, or Bluetooth.
`Supported printers <https://www.odoo.com/page/iot-hardware>`__ are detected automatically, and
appear in the :guilabel:`Devices` list of the *IoT* app.

.. image:: printer/printer-detected.png
:align: center
:alt: The printer as it would appear in the IoT app devices list.

.. note::
The printer can take up to two minutes to appear in the *IoT app* devices list.
Printers can take up to two minutes to appear in the *IoT* app :guilabel:`Devices` list.

Link printer
============
Expand Down Expand Up @@ -63,15 +65,16 @@ specific product.

.. note::
On a quality check detail form, the :guilabel:`Type` of check can also be specified to
:guilabel:`Print Label`. To create new quality checks, navigate to :menuselection:`Quality app
--> Quality Control --> Quality Checks --> New`.
:guilabel:`Print Label`. To create :doc:`new quality checks
<../../../inventory_and_mrp/quality/quality_management/quality_checks>`, navigate to
:menuselection:`Quality app --> Quality Control --> Quality Checks --> New`.

.. seealso::
- :doc:`/applications/inventory_and_mrp/quality/quality_management/quality_control_points`
- :doc:`/applications/inventory_and_mrp/quality/quality_management/quality_alerts`
- :doc:`../../../inventory_and_mrp/quality/quality_management/quality_control_points`
- :doc:`../../../inventory_and_mrp/quality/quality_management/quality_alerts`

Link a printer to a work center in the Manufacturing app
--------------------------------------------------------
Link a printer to a work center
-------------------------------

To link a printer to an action, it first needs to be configured on a work center. To do that,
navigate to :menuselection:`Manufacturing app --> Configuration --> Work Centers`. From here, select
Expand All @@ -94,29 +97,52 @@ Slip`. A key can also be added to trigger the action.
.. seealso::
:ref:`workcenter_iot`

.. _iot/link-printer:

Link printer to reports
-----------------------

It's also possible to link a type of report to a certain printer. In the *IoT app*, go to the
:guilabel:`Devices` menu, and select the desired printer that needs to be configured.
It is possible to link report types to a specific printer. In the *IoT* app, go to the
:guilabel:`Devices` menu, and select the desired printer to be configured.

From here, click :guilabel:`Edit`, go to the :guilabel:`Printer Reports` tab, and select
:guilabel:`Add a line`. In the window that appears, check all the types of :guilabel:`Reports` that
should be linked to this printer.
From here, go to the :guilabel:`Printer Reports` tab, and click :guilabel:`Add a line`. In the
window that appears, check all the types of :guilabel:`Reports` that should be linked to this
printer.

.. image:: printer/printers-listed.png
.. image:: printer/printer-reports.png
:align: center
:alt: The printer devices listed in the IoT Devices menu.
:alt: The list of reports assigned to a printer in the IoT app.

.. tip::
Reports can also be configured in the *Technical* menu of the *Settings* app, while in
:ref:`debug mode <developer-mode>`. To do that, navigate to :menuselection:`Settings App -->
Technical --> Actions: Reports`. From here, select the desired report from the list. Then, an
:guilabel:`IoT Device` can be set on the report.

The first time a linked report is selected to print, a :guilabel:`Select Printers` pop-up window
appears. Tick the checkbox next to the correct printer for the report, and click :guilabel:`Print`.
At that point, the report is linked to the printer.

Clear device printer cache
~~~~~~~~~~~~~~~~~~~~~~~~~~

After a printer is linked to print a report, the setting is saved in a browser's cache. This means
a user can have different devices saved in their cache for different reports, based on the device
they use to access Odoo. It also means different users can have a report automatically printed from
different printers, based on their preferences.

Now, each time :guilabel:`Print` is selected in the control panel, instead of downloading a PDF, a
pop-up appears which displays all the printer(s) linked to the report. Then Odoo sends the report to
the selected printer(s), and automatically prints it.
To unlink a report from a printer, navigate to :menuselection:`IoT app --> Clear Selected Devices`.
This generates a list of reports that are linked to a printer on the current device. Click the
:guilabel:`Unlink` button next to each report to remove the link.

.. important::
This step **only** prevents the report from automatically printing to the listed printer from
the current browser. The report is still :ref:`linked <iot/link-printer>` on the device, under
the :guilabel:`Printer Reports` tab.

.. image:: printer/clear-reports.png
:align: center
:alt: A list of reports currently linked to a printer in the IoT app.

.. seealso::
:doc:`POS Order Printing <../../../sales/point_of_sale/restaurant/kitchen_printing>`

.. tip::
Reports can also be configured in the :guilabel:`Technical Menu` while in :ref:`debug mode
<developer-mode>`. To do that, navigate to :menuselection:`Settings App --> Technical Menu -->
Actions --> Reports`. From here, the individual report can be found in this list, where the
:guilabel:`IoT Device` can be set on the report.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit ce069df

Please sign in to comment.