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

[18.0][MIG] base_report_to_printer: Migration to 18.0 #2

Closed
wants to merge 124 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
3136191
base_calendar passed away
guewen Nov 12, 2014
9791680
[FIX] Bug #19 avoid crash when using 'raw' option
Dec 28, 2014
358088b
Do no longer returns a PDF when a report is printed
guewen Jan 21, 2015
c968343
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
2f82f63
Compatibility fix for report with custom parser
nbessi Jan 30, 2015
67f50b5
The alteration of the context has no effect
guewen Jan 30, 2015
7ffdfbf
Improve bloated condition test
nbessi Feb 6, 2015
213f495
[FIX] base_report_to_printer: make get_pdf callable from 8.0 api
anthony-muschang May 19, 2015
6066cdf
[FIX] test if the module is installed before monkey patching
vrenaville Jun 15, 2015
2976381
[PEP8]
yvaucher Aug 18, 2015
258e66b
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
a01302f
pass context to printer to use it for example in print_options()
intero-chz Oct 25, 2015
670b7ea
Add support for multiple copies
alexis-via Nov 2, 2015
66b0b57
[IMP] Soft fail on missing cups import
Dec 10, 2015
96fe127
[MIG] base_report_to_printer: Upgrade to v9
lasley Jul 4, 2016
f506255
Fix placeholder for repo in readme.rst
yvaucher Oct 5, 2016
36420e7
[10.0][MIG] base_report_to_printer (#68)
Apr 5, 2017
eb330cd
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
73fff82
[10] FIX format parameter (#84)
angelmoya Apr 11, 2017
dad62eb
Update README.rst
blutecsolutions May 1, 2017
d569a89
[FIX] base_report_to_printer: A button method should be @api.multi
Jun 23, 2017
7e16f3f
[FIX] Minor bugfixes
gdgellatly Aug 9, 2017
0597774
[MIG] base_report_to_printer: Migrate to v11.0
Oct 3, 2017
bd850eb
[WIP] Commit before rebase on latest #109 for user and view updates
gdgellatly Oct 5, 2017
6146613
FIX view
fmdl Jan 14, 2018
891841b
[FIX] base_report_to_printer: Stateless tests (#123)
yajo Jan 19, 2018
c3f7a05
Bump base_report_to_printer version to 11.0.2.1.0
yvaucher Feb 2, 2018
3842374
[FIX] Allow to generate printing options without a report
Feb 13, 2018
91c59e8
[FIX] Permission issue
May 7, 2018
eac626b
[FIX] missing super declaration
etobella Jun 20, 2018
f749bde
[FIX][base_report_to_printer] - behaviour to print the report succesf…
Jun 22, 2018
86e1060
[FIX] Group inheritance
max3903 Jun 28, 2018
c4e0cdd
Translated using Weblate (Spanish)
etobella Nov 13, 2018
f2bc715
[WIP] Migrate base_report_to_printer to V12
gdgellatly Jan 30, 2019
8e8bd28
[MIG] base_report_to_printer: Migration to 13.0
schout-it Sep 30, 2019
93aac97
[FIX] .travis.yml: Update definition
pedrobaeza Oct 1, 2019
a107314
Update base_report_to_printer/__manifest__.py
schout-it Oct 18, 2019
4d1eef0
Added job state 'cups-filter-crashed'.
igh-fp Aug 18, 2020
8be52cd
Added translation using Weblate (Spanish (Argentina))
ibuioli Oct 18, 2020
05306e7
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 18, 2020
f4b46df
[IMP] base_report_to_printer: archive printers
Oct 6, 2020
f79fa1f
[IMP] base_report_to_printer: black, isort, prettier
CarlosRoca13 Jan 12, 2021
60d9dbf
[MIG] base_report_to_printer: Migration to v14
Jan 12, 2021
776662b
[FIX] base_report_to_printer: Fixed tests
CarlosRoca13 Jan 12, 2021
6b2bf0f
[UPD] Update base_report_to_printer.pot
oca-travis Jan 13, 2021
780efd7
[UPD] README.rst
OCA-git-bot Jan 13, 2021
b3e1c84
[IMP] base_report_to_printer: Avoid writing on printing printers/jobs…
guewen Feb 4, 2021
3b16af3
[IMP] 14.0 base_report_to_printer: improve job title
gurneyalex Nov 9, 2021
26f3935
[FIX] base_report_to_printer: error printing in external network.
LoisRForgeFlow Nov 16, 2021
3a045a9
[UPD] README.rst
OCA-git-bot Dec 2, 2021
be6e4c0
base_report_to_printer 14.0.1.1.0
OCA-git-bot Dec 2, 2021
629ea3f
[14.0][IMP] base_report_to_printer: Add test page printing
rousseldenis Dec 9, 2021
a08bdf0
[14.0][IMP] base_report_to_printer: Remove deprecated Warning
rousseldenis Dec 9, 2021
986c421
base_report_to_printer 14.0.1.1.1
OCA-git-bot Dec 11, 2021
888ee54
[14.0][IMP] base_report_to_printer: Add Raw test page printing
rousseldenis Dec 20, 2021
3017474
Added translation using Weblate (Swedish)
simonstromb Jan 10, 2022
ef07cca
Translated using Weblate (Swedish)
simonstromb Jan 10, 2022
512b342
[UPD] Update base_report_to_printer.pot
oca-travis Feb 17, 2022
0edd6e3
base_report_to_printer 14.0.1.2.0
OCA-git-bot Feb 17, 2022
478efdc
Update translation files
oca-transbot Feb 17, 2022
c1cceef
[IMP] base_report_to_printer: allow connect to protected server
fmdl Dec 10, 2021
af0071a
[UPD] Update base_report_to_printer.pot
oca-travis Feb 22, 2022
11a2635
base_report_to_printer 14.0.2.0.0
OCA-git-bot Feb 22, 2022
cd50088
Update translation files
oca-transbot Feb 22, 2022
4d1ca5b
[IMP] base_report_to_printer: black, isort, prettier
BT-dmontull Mar 3, 2022
fe36083
[15.0][MIG] base_report_to_printer: Migration to 15.0
BT-dmontull Mar 4, 2022
5831ebe
[MIG] base_report_to_printer: Finish migration to 15.0
matiasperalta1 Aug 25, 2022
acdaba1
[UPD] Update base_report_to_printer.pot
Oct 25, 2022
87f68ed
[UPD] README.rst
OCA-git-bot Oct 25, 2022
56be8cf
Update translation files
weblate Oct 25, 2022
ccbebe9
[MIG] base_report_to_printer: Migration to 16.0
glitchov Dec 7, 2022
9560f02
[UPD] Update base_report_to_printer.pot
Dec 14, 2022
406a6f1
[UPD] README.rst
OCA-git-bot Dec 14, 2022
7ba637a
Update translation files
weblate Dec 14, 2022
17eb565
[14.0][IMP] base_report_to_printer: Add Text render document to printer
rousseldenis Dec 20, 2021
46e12c9
[14.0][FIX] base_report_to_printer: Manage text print_document()
rousseldenis Dec 29, 2021
a5ae0e1
[14.0][IMP] base_report_to_printer: Add tests for text documents
rousseldenis Dec 29, 2021
ca89c62
[ADD] base_report_to_printer: Print attachments wizard
grindtildeath Apr 27, 2020
08e9c50
[MIG] base_report_to_printer: Print attachments wizard
sebalix Aug 6, 2020
5b96d16
fix(#259): handle case of print attachment wizard
gurneyalex Mar 9, 2022
7fd8723
[ADD] access right for wizrard print attachment and fix trans format
Jan 21, 2022
139c053
FIX bad field used for labeling at print
StephaneMangin Jul 12, 2022
ea732aa
base_report_to_printer: fix translation-positional-used
sebalix Dec 15, 2022
7424b6c
[UPD] Update base_report_to_printer.pot
Dec 21, 2022
6789e52
[UPD] README.rst
OCA-git-bot Dec 21, 2022
168b131
base_report_to_printer 16.0.1.1.0
OCA-git-bot Dec 21, 2022
21aacc9
Update translation files
weblate Dec 21, 2022
6cfc50c
[16.0][FIX] base_report_to_printer: Expected singleton
willer-mo Mar 3, 2023
cdf82b7
base_report_to_printer 16.0.1.1.1
OCA-git-bot Mar 3, 2023
17f5c19
base_report_to_printer: fix views
alexis-via Mar 17, 2023
409e3c7
base_report_to_printer 16.0.1.1.2
OCA-git-bot Apr 20, 2023
8bb0872
Translated using Weblate (Italian)
francesco-ooops Jun 22, 2023
cd4ea56
Translated using Weblate (Italian)
francesco-ooops Jul 12, 2023
dedb47d
Translated using Weblate (Italian)
mymage Jul 13, 2023
bab76b9
Translated using Weblate (Spanish)
Ivorra78 Jul 23, 2023
6693ded
Fix for unexpected 'nombre' on base_report_to_printer/i18n/es.po
micheledic Jul 27, 2023
cd6458e
base_report_to_printer 16.0.1.1.3
OCA-git-bot Jul 27, 2023
e65a96f
[IMP] base_report_to_printer: Add neutralization queries
micheledic Jul 28, 2023
d1c7780
base_report_to_printer 16.0.1.1.4
OCA-git-bot Jul 28, 2023
c777ee5
[UPD] README.rst
OCA-git-bot Sep 3, 2023
9b60542
Translated using Weblate (French)
Nov 3, 2023
0ae11d4
[FIX] base_report_to_printer: fix encoding
jbaudoux Dec 6, 2023
e021d4b
[BOT] post-merge updates
OCA-git-bot Dec 6, 2023
7659f53
Translated using Weblate (Italian)
mymage Jan 15, 2024
53d3a06
Translated using Weblate (Italian)
mymage Jan 15, 2024
94a95dd
Translated using Weblate (Italian)
mymage Jan 17, 2024
25a50cf
[IMP] base_report_to_printer: pre-commit auto fixes
john-herholz-dt Mar 8, 2024
f0c17f3
[MIG] base_report_to_printer: Migration to 17.0
john-herholz-dt Mar 8, 2024
98a4861
[UPD] Update base_report_to_printer.pot
Mar 8, 2024
b7019ac
[BOT] post-merge updates
OCA-git-bot Mar 8, 2024
1f8869a
Update translation files
weblate Mar 8, 2024
78d17b9
[FIX] line too long
sbidoul May 1, 2024
55cdfc0
[BOT] post-merge updates
OCA-git-bot May 1, 2024
fb23526
Translated using Weblate (Italian)
mymage May 23, 2024
9681a24
Translated using Weblate (Italian)
mymage Jun 6, 2024
bc5d9a2
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
4b8c213
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 13, 2024
71958aa
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 14, 2024
c8c5bfd
[14.0][FIX] base_report_to_printer: Don't use safe_eval as module
rousseldenis Dec 20, 2021
d6510c1
Add Module base_report_to_label_printer
ne1800 Jun 9, 2022
0078dce
oca-port: blacklist PR(s) 242 for base_report_to_printer
trisdoan Oct 3, 2024
c04e21b
[FIX] base_report_to_printer: access error and wrong translated terms
trisdoan Oct 9, 2024
0ed4ffc
[IMP] base_report_to_printer: pre-commit execution
trisdoan Oct 14, 2024
a5aae19
[MIG] base_report_to_printer: Migration to 18.0
trisdoan Oct 14, 2024
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
5 changes: 5 additions & 0 deletions .oca/oca-port/blacklist/base_report_to_printer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"pull_requests": {
"242": "(auto) Nothing to port from PR #242"
}
}
194 changes: 194 additions & 0 deletions base_report_to_printer/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
=================
Report to printer
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3d37f5e02c22560d293e60d6fb565eea3a6657926defd87d4a6ca71cc229ab60
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freport--print--send-lightgray.png?logo=github
:target: https://github.com/OCA/report-print-send/tree/18.0/base_report_to_printer
:alt: OCA/report-print-send
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/report-print-send-18-0/report-print-send-18-0-base_report_to_printer
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/report-print-send&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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:

- globally
- per user
- per report
- per user and report

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

1. Install PyCups - https://pypi.python.org/pypi/pycups

.. code:: bash

sudo apt-get install cups
sudo apt-get install libcups2-dev
sudo apt-get install python3-dev
sudo pip install pycups

Configuration
=============

To configure this module, you need to:

1. Enable the "Printing / Print User" option under access rights to give
users the ability to view the print menu.

The jobs will be sent to the printer with a name matching the
print_report_name of the report (truncated at 80 characters). By default
this will not be displayed by CUPS web interface or in Odoo. To see this
information, you need to change the configuration of your CUPS server
and set the JobPrivateValue directive to "none" (or some other list of
values which does not include "job-name") , and reload the server. See
cupsd.conf(5)
<`https://www.cups.org/doc/man-cupsd.conf.html\\> <https://www.cups.org/doc/man-cupsd.conf.html\>>`__
for details.

Usage
=====

Guidelines for use:

- To update the CUPS printers in *Settings > Printing > Update
Printers from CUPS*
- To print a report on a specific printer or tray, you can change
these in *Settings > Printing > Reports* to define default
behaviour.
- 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.

When no tray is configured for a report and a user, the default tray
setup on the CUPS server is used.

Changelog
=========

13.0.1.0.0 (2019-09-30)
-----------------------

- [RELEASE] Port from V12.

12.0.1.0.0 (2018-02-04)
-----------------------

- [RELEASE] Port from V11.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/report-print-send/issues/new?body=module:%20base_report_to_printer%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Agile Business Group & Domsense
* Pegueroles SCP
* NaN
* LasLabs
* Camptocamp
* Open for Small Business Ltd

Contributors
------------

- Ferran Pegueroles <[email protected]>
- Albert Cervera i Areny <[email protected]>
- Davide Corio <[email protected]>
- Lorenzo Battistini <[email protected]>
- Yannick Vaucher <[email protected]>
- Lionel Sausin <[email protected]>
- Guewen Baconnier <[email protected]>
- Dave Lasley <[email protected]>
- Sylvain Garancher <[email protected]>
- Jairo Llopis <[email protected]>
- Graeme Gellatly <[email protected]>
- Rod Schouteden <[email protected]>
- Alexandre Fayolle <[email protected]>
- Matias Peralta <[email protected]>
- Hughes Damry <[email protected]>
- Akim Juillerat <[email protected]>
- Jacques-Etienne Baudoux (BCIM) <[email protected]>
- Tris Doan <[email protected]>

Other credits
-------------

The migration of this module from 17.0 to 18.0 was financially supported
by Camptocamp.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/report-print-send <https://github.com/OCA/report-print-send/tree/18.0/base_report_to_printer>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
9 changes: 9 additions & 0 deletions base_report_to_printer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2007 Ferran Pegueroles <[email protected]>
# Copyright (c) 2009 Albert Cervera i Areny <[email protected]>
# 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
38 changes: 38 additions & 0 deletions base_report_to_printer/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) 2007 Ferran Pegueroles <[email protected]>
# Copyright (c) 2009 Albert Cervera i Areny <[email protected]>
# 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": "18.0.1.0.0",
"category": "Generic Modules/Base",
"author": "Agile Business Group & Domsense, Pegueroles SCP, NaN,"
" LasLabs, Camptocamp, Odoo Community Association (OCA),"
" Open for Small Business Ltd",
"website": "https://github.com/OCA/report-print-send",
"license": "AGPL-3",
"depends": ["web"],
"data": [
"data/printing_data.xml",
"security/security.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/print_attachment_report.xml",
"wizards/printing_printer_update_wizard_view.xml",
],
"assets": {
"web.assets_backend": [
"/base_report_to_printer/static/src/js/qweb_action_manager.esm.js",
],
},
"installable": True,
"application": False,
"external_dependencies": {"python": ["pycups"]},
}
2 changes: 2 additions & 0 deletions base_report_to_printer/data/neutralize.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
update printing_server set active=false;
update printing_printer set active=false;
27 changes: 27 additions & 0 deletions base_report_to_printer/data/printing_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>
<record forcecreate="True" id="ir_cron_update_printers" model="ir.cron">
<field name="name">Update Printers Jobs</field>
<field name="active" eval="True" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">minutes</field>
<field name="model_id" ref="base_report_to_printer.model_printing_server" />
<field name="state">code</field>
<field name="code">model.action_update_jobs()</field>
</record>
<function
model="ir.default"
name="set"
eval="('ir.actions.report', 'property_printing_action_id', obj().env.ref('base_report_to_printer.printing_action_2').id)"
/>
</odoo>
Loading
Loading