-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
18,187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
================= | ||
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 | ||
|
||
Report behaviour is defined by settings. | ||
|
||
|
||
Settings can be configured: | ||
|
||
* globaly | ||
* per user | ||
* per report | ||
* per user and report | ||
|
||
Installation | ||
============ | ||
|
||
* Install PyCups - https://pypi.python.org/pypi/pycups | ||
|
||
.. code-block:: bash | ||
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 | ||
Configuration | ||
============= | ||
|
||
After installing enable the "Printing / Print User" option under access | ||
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. | ||
|
||
|
||
Then go to the user profile and set the users printing action and default | ||
printer. | ||
|
||
Caveat | ||
------ | ||
|
||
The notification when a report is sent to a printer will not be | ||
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 | ||
====================== | ||
|
||
|
||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/report-print-send/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Ferran Pegueroles <ferran@pegueroles.com> | ||
* Albert Cervera i Areny <albert@nan-tic.com> | ||
* Davide Corio <davide.corio@agilebg.com> | ||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com> | ||
* Yannick Vaucher <yannick.vaucher@camptocamp.com> | ||
* Lionel Sausin <ls@numerigraphe.com> | ||
* Guewen Baconnier <guewen.baconnier@camptocamp.com> | ||
* Dave Lasley <dave@laslabs.com> | ||
* Sylvain Garancher <sylvain.garancher@syleam.fr> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com> | ||
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com> | ||
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) | ||
# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) | ||
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import models | ||
from . import wizards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com> | ||
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com> | ||
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) | ||
# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) | ||
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': "Report to printer", | ||
'version': '11.0.1.0.1', | ||
'category': 'Generic Modules/Base', | ||
'author': "Agile Business Group & Domsense, Pegueroles SCP, NaN," | ||
" LasLabs, Odoo Community Association (OCA)", | ||
'website': 'http://www.agilebg.com', | ||
'license': 'AGPL-3', | ||
"depends": ['web'], | ||
'data': [ | ||
'data/printing_data.xml', | ||
'security/security.xml', | ||
'views/assets.xml', | ||
'views/printing_printer.xml', | ||
'views/printing_server.xml', | ||
'views/printing_job.xml', | ||
'views/printing_report.xml', | ||
'views/res_users.xml', | ||
'views/ir_actions_report.xml', | ||
'wizards/printing_printer_update_wizard_view.xml', | ||
], | ||
'installable': True, | ||
'application': True, | ||
'external_dependencies': { | ||
'python': ['cups'], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0"?> | ||
<odoo noupdate="1"> | ||
|
||
<!-- printing.action --> | ||
<record model="printing.action" id="printing_action_1"> | ||
<field name="name">Send to Printer</field> | ||
<field name="action_type">server</field> | ||
</record> | ||
<record model="printing.action" id="printing_action_2"> | ||
<field name="name">Send to Client</field> | ||
<field name="action_type">client</field> | ||
</record> | ||
<!-- properties --> | ||
<record forcecreate="True" id="property_printing_action_id" model="ir.property"> | ||
<field name="name">property_printing_action_id</field> | ||
<field name="fields_id" search="[('model', '=', 'ir.actions.report'), ('name', '=', 'property_printing_action_id')]"/> | ||
<field name="value" eval="'printing.action,' + str(printing_action_2)"/> | ||
</record> | ||
|
||
<record forcecreate="True" id="ir_cron_update_printers" model="ir.cron"> | ||
<field name="name">Update Printers Jobs</field> | ||
<field eval="True" name="active"/> | ||
<field name="user_id" ref="base.user_root"/> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">minutes</field> | ||
<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"/> | ||
</record> | ||
|
||
</odoo> |
Oops, something went wrong.