Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
165 changes: 165 additions & 0 deletions report_label/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
=============
Report Labels
=============

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

.. |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%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/18.0/report_label
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_label
: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/reporting-engine&target_branch=18.0
:alt: Try me on Runboat

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

This module allows you to create self-adhesive label printing actions on
any model.

**Table of contents**

.. contents::
:local:

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

**Configure your Report Label Paperformat**

- Go to "Settings > Technical > Reporting > Label Paper Format"
- Create your self-adhesive label paper formats.

You should reuse or create a Paperformat.

|conf_image_1|

**Configure your Server action**

- Go to "Settings > Technical > Actions > Server Actions"

Create your label report :

- In the 'Action to do' field, select 'Print Self-adhesive Labels'
- In the 'Label Paper Format' field, select your label paper format
previously created
- In the 'Label Qweb Template' create or reuse a QWeb template for your
label.

|conf_image_2|

**Importante Note**

`By
design <https://github.com/OCA/reporting-engine/blob/14.0/report_label/reports/report_label.xml#L34>`__,
the variable used in this QWeb template must be named record.

.. |conf_image_1| image:: https://raw.githubusercontent.com/OCA/reporting-engine/18.0/report_label/static/description/report_paperformat_label_form.png
.. |conf_image_2| image:: https://raw.githubusercontent.com/OCA/reporting-engine/18.0/report_label/static/description/ir_actions_server.png

Usage
=====

- In the target model's list view, select the records to print.
- Click *Action* and your label report action name.
- Select the number of labels per record to print, and click Print.

you can optionaly define an offset

|usage_image_1|

The items will be printed in a pdf document.

|usage_image_2"|

.. |usage_image_1| image:: https://raw.githubusercontent.com/OCA/reporting-engine/18.0/report_label/static/description/report_label_wizard_form.png
.. |usage_image_2"| image:: https://raw.githubusercontent.com/OCA/reporting-engine/18.0/report_label/static/description/report_result.png

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

Known issues:

- This module depends on base_automation only because this module
extends ir.actions.server with a new kind of action, and
base.automation inherits from ir.actions.server by delegation in such
a way that the modules cannot be loaded in another order. To do when
migrating in version > 16 :

1. remove ``base_automation`` dependency
2. install ``report_label``

3. install then ``base_automation``. If the installation of
``base_automation`` works, the dependency can be replaced by ``base``.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/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/reporting-engine/issues/new?body=module:%20report_label%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
-------

* Iván Todorovich
* Moka Tourisme

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

- Iván Todorovich <[email protected]>

- `Moka Tourisme <https://www.mokatourisme.fr>`__:

- Grégory Schreiner

- Sylvain LE GAL
<`https://twitter.com/legalsylvain\\> <https://twitter.com/legalsylvain\>>`__

- Stefan Rijnhart <[email protected]>

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.

.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
:target: https://github.com/ivantodorovich
:alt: ivantodorovich

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/report_label>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions report_label/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
24 changes: 24 additions & 0 deletions report_label/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Report Labels",
"version": "18.0.1.0.0",
"summary": "Print configurable self-adhesive labels reports",
"author": "Iván Todorovich, Moka Tourisme, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"category": "Reporting",
"maintainers": ["ivantodorovich"],
"depends": [
"base_automation",
],
"data": [
"security/ir.model.access.csv",
"views/ir_actions_server.xml",
"views/report_paperformat_label.xml",
"reports/report_label.xml",
"wizards/report_label_wizard.xml",
],
"demo": [
"demo/demo.xml",
],
}
62 changes: 62 additions & 0 deletions report_label/demo/demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="label_template_partner_address" name="Partner Label: Address">
<address
t-field="record.self"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
/>
</template>

<record id="report_paperformat_partner_address" model="report.paperformat">
<field name="name">Paperformat for labels (A4: 210mm x 297mm)</field>
<field name="format">A4</field>
<field name="dpi">96</field>
<field name="orientation">Portrait</field>
<field name="margin_top">0</field>
<field name="margin_bottom">0</field>
<field name="margin_right">0</field>
<field name="margin_left">0</field>
<field name="header_spacing">0</field>
<field name="disable_shrinking" eval="True" />
</record>

<record
id="report_paperformat_label_partner_address"
model="report.paperformat.label"
>
<field name="name">Partner Labels (3 x 6 = 18 labels per sheet)</field>
<field name="paperformat_id" ref="report_paperformat_partner_address" />
<field name="label_height" eval="49.5" />
<field name="label_width" eval="70" />
<field name="label_padding_top" eval="5" />
<field name="label_padding_right" eval="5" />
<field name="label_padding_bottom" eval="5" />
<field name="label_padding_left" eval="5" />
<field name="label_margin_top" eval="0" />
<field name="label_margin_right" eval="0" />
<field name="label_margin_bottom" eval="0" />
<field name="label_margin_left" eval="0" />
<field name="label_background_color">#729fcf</field>
</record>

<record id="actions_server_label_partner_address" model="ir.actions.server">
<field name="name">Print Address Labels</field>
<field name="state">report_label</field>
<field name="model_id" ref="base.model_res_partner" />
<field
name="label_paperformat_id"
ref="report_paperformat_label_partner_address"
/>
<field
name="label_template_view_id"
ref="report_label.label_template_partner_address"
/>
</record>

<!-- Create context action -->
<function
model="ir.actions.server"
eval="[ref('actions_server_label_partner_address')]"
name="create_action"
/>
</odoo>
Loading