Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG][11.0] Migrate base_report_to_printer #109

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
feae5db
[ADD] base_report_to_printer
eLBati Nov 22, 2012
e9598f5
[IMP] base_report_to_printer - module description
eLBati Nov 30, 2012
c9adf1b
[imp] description with images
eLBati Nov 30, 2012
4498bce
[FIX] The close should be done in the finally: clause of a try: excep…
eLBati Dec 4, 2012
ced1d0c
[FIX] We better have to use the "with" syntax
eLBati Dec 6, 2012
6930c5c
[FIX] update method is accessible from XML/RPC and should return some…
eLBati Dec 6, 2012
b452b33
[FIX] print_direct return value
eLBati Dec 6, 2012
64f8a7f
[fix] get_default return value
eLBati Dec 6, 2012
5db700c
[FIX] context=None
eLBati Dec 6, 2012
576fbe4
[FIX] using logging
eLBati Dec 6, 2012
76f9704
[FIX] isinstance(printer, (str,unicode)):
eLBati Dec 6, 2012
d57fc8f
[FIX] base_report_to_printer description
eLBati Dec 7, 2012
04eb2b7
[FIX] base_report_to_printer - 'authors'
eLBati Jan 15, 2013
08db5a9
[MIGR] Set the 'installable' flags to False on addons. They should be…
guewen Mar 14, 2013
49d4e2e
base_report_to_printer V7 upgrade
aschrafel Mar 15, 2013
e9e16db
[FIX] base_report_to_printer - load security first
yvaucher Sep 30, 2013
bbe2142
[IMP] base_report_to_printer - retab and clean extra spaces
yvaucher Sep 30, 2013
10b5678
[IMP] base_report_to_printer - remove class calls and use orm.Model a…
yvaucher Sep 30, 2013
c336491
[IMP] base_report_to_printer - clean imports
yvaucher Sep 30, 2013
121865f
[IMP] base_report_to_printer - remove class call
yvaucher Sep 30, 2013
0dc248d
[IMP] base_report_to_printer - simplify calls on class
yvaucher Sep 30, 2013
ab4afa3
[TYPO]
yvaucher Sep 30, 2013
7d39b4d
[IMP] base_report_to_printer - replace lpr by use of pycups
yvaucher Sep 30, 2013
c7f1e0b
[IMP] base_report_to_printer - add report_id on print_direct
yvaucher Oct 1, 2013
60d01e0
[IMP] base_report_to_printer - use an action id in an action method i…
yvaucher Oct 1, 2013
ec028b3
[FIX] base_report_to_printer - using system_name of printer instead o…
yvaucher Oct 1, 2013
3878a86
[IMP] base_report_to_printer - remove uselsee context set
yvaucher Oct 1, 2013
63874cb
[IMP] base_report_to_printer - return browse record instead of string…
yvaucher Oct 1, 2013
42efe15
[IMP] base_report_to_printer - retab xml files
yvaucher Oct 1, 2013
083bc82
[IMP] base_report_to_printer - show field name in report and user views
yvaucher Oct 1, 2013
6af98d2
[IMP] base_report_to_printer - remove deprecated view type
yvaucher Oct 1, 2013
d1f3bd5
[FIX] base_report_to_printer - missing class call
yvaucher Oct 1, 2013
b00c963
[TYPO]
yvaucher Oct 1, 2013
a11af72
[IMP] base_report_to_printer - pass report id instead of report key
yvaucher Oct 1, 2013
448ceb3
[FIX] base_report_to_printer - mistake in params of print_direct
yvaucher Oct 1, 2013
78ef3fd
[FIX] base_report_to_printer - restore error message as osv + propaga…
yvaucher Oct 1, 2013
c51ba5d
[IMP] base_report_to_printer - remove osv.except_osv as it breaks the…
yvaucher Oct 2, 2013
2e4ebc8
[IMP] base_report_to_printer - split code in multiple files
yvaucher Oct 2, 2013
f876224
[IMP] add external_dependencies
yvaucher Nov 5, 2013
e080114
[IMP] update po files
yvaucher Nov 5, 2013
5d4581d
[IMP] module desciption and remove AUTHORS.txt file to write contribu…
yvaucher Dec 3, 2013
a69abe5
[IMP] description add comment on update printers wizard
yvaucher Dec 3, 2013
d0eb93e
[IMP] adding some explanation in description
yvaucher Dec 3, 2013
9f2c1df
[FIX] Use explicit kwargs: context=context
jgrandguillaume Dec 20, 2013
3e89077
Launchpad automatic translations update.
Feb 26, 2014
8f5b500
[FIX] user browse was incorrect and never returned records. Fix based…
Apr 16, 2014
7b22611
[FIX] the button 'set default' on printers did not work because the f…
Apr 16, 2014
b085116
[IMP] fix/improve printing preference UI
Apr 17, 2014
489d419
[IMP] Use short notation for browse and use pool[] instead of pool.ge…
Apr 17, 2014
cf0e670
Launchpad automatic translations update.
May 6, 2014
c5b44f3
set installable to false
yvaucher Jul 4, 2014
e49f662
move modules in __unported__ for 8.0
yvaucher Jul 4, 2014
0f7bb5f
Move base_report_to_printer to root from __unported__
guewen Nov 12, 2014
8bfbd12
Set module installable
guewen Nov 12, 2014
3f8838c
Extract description of the module in README.RST
guewen Nov 12, 2014
d02f5e6
base_calendar passed away
guewen Nov 12, 2014
f46ad66
Migrate ir_report.py to new API
guewen Nov 14, 2014
ce0876e
Migrate printing.py to new API
guewen Nov 14, 2014
2005273
Migrate res_users.py to new API
guewen Nov 14, 2014
fe3ab51
Migrate report_xml_action.py to new API
guewen Nov 14, 2014
05982df
Migrate wizard/update_printers.py to new API
guewen Nov 14, 2014
242146b
Better view for wizard
guewen Nov 17, 2014
fbe8630
Recursion when calling a method with old-style api signature from browse
guewen Nov 14, 2014
8a80de3
Remove the Lock because it is useless on multiprocess
guewen Nov 17, 2014
87ae352
browse is called often enough to call the update routine (even too much)
guewen Nov 17, 2014
9c4ea8c
Implements the print on the new 'report' model
guewen Nov 17, 2014
3d89e22
Restore the print capability on deprecated reports
guewen Nov 17, 2014
e15d267
Update copyrights
guewen Nov 17, 2014
aecc0a5
Improve form view, add search view for printers
guewen Nov 17, 2014
975afd7
Update translations, add a string to URI so it is uppercased
guewen Nov 17, 2014
ad5e8b6
missing api decorator
guewen Nov 17, 2014
39bd5e9
We need the report in print_document and print options (needed in
guewen Nov 17, 2014
7ac2564
Move the 'skip_update' right in the browse, it prevents a loop
guewen Nov 17, 2014
ebe52ef
Avoid to hits the database too many times to check if the list of
guewen Nov 17, 2014
9df6070
Refresh the list of printers every 15 seconds instead of 10
guewen Nov 17, 2014
916d974
Extract a method so it will be easier to override in printer_tray
guewen Nov 17, 2014
262a5db
Error on installation of the module
guewen Nov 18, 2014
b015085
Invalidate the cache when the table is created so the table_exists()
guewen Nov 18, 2014
254495f
Use a cron instead of threads to update printers status
guewen Nov 20, 2014
b4e9161
Do not write the printer status if it has not changed
guewen Nov 20, 2014
9dc3dd7
Clean the XML file (remove eval, reindent)
guewen Dec 19, 2014
354bade
Give access to models to all users for reading
guewen Dec 19, 2014
421bcda
[FIX] Bug #19 avoid crash when using 'raw' option
Dec 28, 2014
656939d
[Usability] Auto-add Administrator user to the Print group
Dec 28, 2014
35dff1b
base_report_to_printer: add support for remote CUPS server (not just …
Jan 8, 2015
77d817a
Add CUPS_HOST in more debug logs
Jan 14, 2015
8317010
Do no longer returns a PDF when a report is printed
guewen Jan 21, 2015
fe9c7a5
Raise an error if no printer is configured
guewen Jan 21, 2015
d814ab0
Updated translations
guewen Jan 21, 2015
c27499c
Add a limitation in the readme
guewen Jan 21, 2015
e8058b2
When get_pdf has no printer, just create the pdf file
guewen Jan 26, 2015
0863057
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
2a1e3da
Compatibility fix for report with custom parser
nbessi Jan 30, 2015
5095569
Fix set the skip directive in context
nbessi Jan 30, 2015
e6a8463
The alteration of the context has no effect
guewen Jan 30, 2015
55ed4e3
Past tense is confusing
guewen Jan 30, 2015
e991d88
Vague method name, put the predicate method closer to its caller
guewen Jan 30, 2015
679f21b
dict.copy() is more efficient than calling dict
guewen Jan 30, 2015
67ec48b
Improve bloated condition test
nbessi Feb 6, 2015
3fe4f72
[FIX] base_report_to_printer: make get_pdf callable from 8.0 api
anthony-muschang May 19, 2015
fb0bc40
[FIX] base_report_to_printer: make print_document callable from 8.0 api
anthony-muschang May 21, 2015
3bda066
[FIX] test if the module is installed before monkey patching
vrenaville Jun 15, 2015
bb3e856
[PEP8]
yvaucher Aug 18, 2015
c03f3c0
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
1580da4
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
3ae8fb2
pass context to printer to use it for example in print_options()
intero-chz Oct 25, 2015
9b5db10
Add support for multiple copies
alexis-via Nov 2, 2015
70d61f7
Merge branch '8.0' of https://github.com/intero-chz/report-print-send…
yvaucher Nov 24, 2015
2eac4d4
[IMP] Soft fail on missing cups import
Dec 10, 2015
9b3eddd
[MIG] base_report_to_printer: Upgrade to v9
lasley Jul 4, 2016
3dae851
[IMP] base_report_to_printer: Add test coverage
lasley Jul 6, 2016
bd6f63e
[FIX] base_report_to_printer: Minor fixes
lasley Jul 8, 2016
b655dd1
[FIX] base_report_to_printer: Unify logger import
lasley Jul 12, 2016
7281bad
[FIX] base_report_to_printer: Remove execute bit
lasley Jul 13, 2016
d533a2e
[FIX] base_report_to_printer: Switch error type
lasley Jul 13, 2016
18d0b76
Fix placeholder for repo in readme.rst
yvaucher Oct 5, 2016
f30d68a
[MIG] Make modules uninstallable
pedrobaeza Oct 6, 2016
cab8d0c
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
020d89b
[10.0][MIG] base_report_to_printer (#68)
Apr 5, 2017
382ed61
[10] FIX format parameter (#84)
angelmoya Apr 11, 2017
36476e1
Update README.rst
blutecsolutions May 1, 2017
a38e611
Update README.rst
May 1, 2017
d594b24
[FIX] base_report_to_printer: A button method should be @api.multi
Jun 23, 2017
b5365d1
OCA Transbot updated translations from Transifex
oca-transbot May 1, 2017
a327a8e
[REM] Removed dead code
Jul 11, 2017
d4eb0ae
[FIX] Use an HttpCase test class to avoid locking the registry for HT…
Aug 26, 2017
e10d4cc
[FIX] Minor bugfixes
gdgellatly Aug 9, 2017
49062b5
[MIG] base_report_to_printer: Migrate to v11.0
Oct 3, 2017
9b48d16
[FIX] Review fixes
Oct 4, 2017
ab8a687
[FIX] Forgot fixes
Oct 4, 2017
470c25a
[FIX] Views review fixes
Oct 4, 2017
61cf341
[IMP] Allow users to define their default behaviour and printer
Oct 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions base_report_to_printer/README.rst
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.
10 changes: 10 additions & 0 deletions base_report_to_printer/__init__.py
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
35 changes: 35 additions & 0 deletions base_report_to_printer/__manifest__.py
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'],
},
}
33 changes: 33 additions & 0 deletions base_report_to_printer/data/printing_data.xml
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>
Loading