[MIG] report_label: Migration to 14.0

This commit is contained in:
Stefan Rijnhart
2021-04-20 17:28:12 +02:00
parent c6c0ef3fd4
commit c55eea9714
10 changed files with 58 additions and 46 deletions

View File

@@ -14,13 +14,13 @@ Report Labels
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/12.0/report_label :target: https://github.com/OCA/reporting-engine/tree/14.0/report_label
:alt: OCA/reporting-engine :alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-report_label :target: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_label
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/143/12.0 :target: https://runbot.odoo-community.org/runbot/143/14.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -38,13 +38,13 @@ Configuration
Go to **Settings > Technical > Analysis > Label Paper Format** and create Go to **Settings > Technical > Analysis > Label Paper Format** and create
your self-adhesive label paper formats. your self-adhesive label paper formats.
.. image:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/configure_paperformat.png .. image:: https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/configure_paperformat.png
Go to **Settings > Technical > Analysis > Label Report** and create your label Go to **Settings > Technical > Analysis > Label Report** and create your label
report, and its context action. You'll also need to create or reuse a report, and its context action. You'll also need to create or reuse a
QWeb template for you label. QWeb template for you label.
.. image:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/configure_report_label.png .. image:: https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/configure_report_label.png
Usage Usage
===== =====
@@ -53,7 +53,7 @@ Usage
2. Click *Action* and your label report action name. 2. Click *Action* and your label report action name.
3. Select the number of labels per record to print, and click Print. 3. Select the number of labels per record to print, and click Print.
.. image:: https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/label_wizard.png .. image:: https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/label_wizard.png
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@@ -68,7 +68,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_. 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. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_label%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_label%0Aversion:%2014.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. Do not contact contributors directly about support or help with technical issues.
@@ -85,11 +85,12 @@ Contributors
~~~~~~~~~~~~ ~~~~~~~~~~~~
* Iván Todorovich <ivan.todorovich@gmail.com> * Iván Todorovich <ivan.todorovich@gmail.com>
* `Moka Tourisme <https://www.mokatourisme.fr>`_: * `Moka Tourisme <https://www.mokatourisme.fr>`_:
* Grégory Schreiner * Grégory Schreiner
* Sylvain LE GAL <https://twitter.com/legalsylvain> * Sylvain LE GAL <https://twitter.com/legalsylvain>
* Stefan Rijnhart <stefan@opener.amsterdam>
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@@ -112,6 +113,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-ivantodorovich| |maintainer-ivantodorovich|
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/report_label>`_ project on GitHub. This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/14.0/report_label>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -1,6 +1,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
"name": "Report Labels", "name": "Report Labels",
"version": "12.0.1.0.0", "version": "14.0.1.0.0",
"summary": "Print configurable self-adhesive labels reports", "summary": "Print configurable self-adhesive labels reports",
"author": "Iván Todorovich, Moka Tourisme, Odoo Community Association (OCA)", "author": "Iván Todorovich, Moka Tourisme, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine", "website": "https://github.com/OCA/reporting-engine",

View File

@@ -1,11 +1,13 @@
from odoo import api, fields, models # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class IrActionsServer(models.Model): class IrActionsServer(models.Model):
_inherit = "ir.actions.server" _inherit = "ir.actions.server"
state = fields.Selection( state = fields.Selection(
selection_add=[("report_label", "Print self-adhesive labels")] selection_add=[("report_label", "Print self-adhesive labels")],
ondelete={"report_label": "cascade"},
) )
label_template = fields.Char( label_template = fields.Char(
"Label QWeb Template", "Label QWeb Template",
@@ -18,7 +20,6 @@ class IrActionsServer(models.Model):
states={"report_label": [("required", True)]}, states={"report_label": [("required", True)]},
) )
@api.multi
def report_label_associated_view(self): def report_label_associated_view(self):
"""View the associated qweb templates""" """View the associated qweb templates"""
self.ensure_one() self.ensure_one()
@@ -34,22 +35,21 @@ class IrActionsServer(models.Model):
] ]
return res return res
@api.model def _run_action_report_label_multi(self, eval_context=None):
def run_action_report_label_multi(self, action, eval_context=None):
"""Show report label wizard""" """Show report label wizard"""
context = dict(self.env.context) context = dict(self.env.context)
context.update( context.update(
{ {
"label_template": action.label_template, "label_template": self.label_template,
"label_paperformat_id": action.label_paperformat_id.id, "label_paperformat_id": self.label_paperformat_id.id,
"res_model_id": action.model_id.id, "res_model_id": self.model_id.id,
} }
) )
return { return {
"name": action.name, "name": self.name,
"type": "ir.actions.act_window", "type": "ir.actions.act_window",
"res_model": "report.label.wizard", "res_model": "report.label.wizard",
"context": str(context), "context": context,
"view_mode": "form", "view_mode": "form",
"target": "new", "target": "new",
} }

View File

@@ -1,6 +1,7 @@
* Iván Todorovich <ivan.todorovich@gmail.com> * Iván Todorovich <ivan.todorovich@gmail.com>
* `Moka Tourisme <https://www.mokatourisme.fr>`_: * `Moka Tourisme <https://www.mokatourisme.fr>`_:
* Grégory Schreiner * Grégory Schreiner
* Sylvain LE GAL <https://twitter.com/legalsylvain> * Sylvain LE GAL <https://twitter.com/legalsylvain>
* Stefan Rijnhart <stefan@opener.amsterdam>

View File

@@ -1,3 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_report_paperformat_label_all,report.paperformat.label all,model_report_paperformat_label,,1,,, access_report_paperformat_label_all,report.paperformat.label all,model_report_paperformat_label,base.group_user,1,0,0,0
access_report_label_layout_admin,report.paperformat.label admin,model_report_paperformat_label,base.group_system,1,1,1,1 access_report_label_layout_admin,report.paperformat.label admin,model_report_paperformat_label,base.group_system,1,1,1,1
access_report_label_wizard,report.label.wizard,model_report_label_wizard,base.group_user,1,1,1,1
access_report_label_wizard_line,report.label.wizard.line,model_report_label_wizard_line,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_report_paperformat_label_all report.paperformat.label all model_report_paperformat_label base.group_user 1 0 0 0
3 access_report_label_layout_admin report.paperformat.label admin model_report_paperformat_label base.group_system 1 1 1 1
4 access_report_label_wizard report.label.wizard model_report_label_wizard base.group_user 1 1 1 1
5 access_report_label_wizard_line report.label.wizard.line model_report_label_wizard_line base.group_user 1 1 1 1

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Report Labels</title> <title>Report Labels</title>
<style type="text/css"> <style type="text/css">
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/report_label"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-report_label"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/14.0/report_label"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_label"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows you to create self-adhesive label printing actions on any model.</p> <p>This module allows you to create self-adhesive label printing actions on any model.</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
@@ -388,11 +388,11 @@ ul.auto-toc {
<h1><a class="toc-backref" href="#id1">Configuration</a></h1> <h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<p>Go to <strong>Settings &gt; Technical &gt; Analysis &gt; Label Paper Format</strong> and create <p>Go to <strong>Settings &gt; Technical &gt; Analysis &gt; Label Paper Format</strong> and create
your self-adhesive label paper formats.</p> your self-adhesive label paper formats.</p>
<img alt="https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/configure_paperformat.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/configure_paperformat.png" /> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/configure_paperformat.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/configure_paperformat.png" />
<p>Go to <strong>Settings &gt; Technical &gt; Analysis &gt; Label Report</strong> and create your label <p>Go to <strong>Settings &gt; Technical &gt; Analysis &gt; Label Report</strong> and create your label
report, and its context action. Youll also need to create or reuse a report, and its context action. Youll also need to create or reuse a
QWeb template for you label.</p> QWeb template for you label.</p>
<img alt="https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/configure_report_label.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/configure_report_label.png" /> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/configure_report_label.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/configure_report_label.png" />
</div> </div>
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1> <h1><a class="toc-backref" href="#id2">Usage</a></h1>
@@ -401,7 +401,7 @@ QWeb template for you label.</p>
<li>Click <em>Action</em> and your label report action name.</li> <li>Click <em>Action</em> and your label report action name.</li>
<li>Select the number of labels per record to print, and click Print.</li> <li>Select the number of labels per record to print, and click Print.</li>
</ol> </ol>
<img alt="https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/label_wizard.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/12.0/report_label/static/description/label_wizard.png" /> <img alt="https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/label_wizard.png" src="https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_label/static/description/label_wizard.png" />
</div> </div>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1> <h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1>
@@ -416,7 +416,7 @@ this matter, its recommended to use this module along with
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_label%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_label%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@@ -430,17 +430,20 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
</div> </div>
<div class="section" id="contributors"> <div class="section" id="contributors">
<h2><a class="toc-backref" href="#id7">Contributors</a></h2> <h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<ul>
<li><p class="first">Iván Todorovich &lt;<a class="reference external" href="mailto:ivan.todorovich&#64;gmail.com">ivan.todorovich&#64;gmail.com</a>&gt;</p>
</li>
<li><p class="first"><a class="reference external" href="https://www.mokatourisme.fr">Moka Tourisme</a>:</p>
<blockquote>
<ul class="simple"> <ul class="simple">
<li>Iván Todorovich &lt;<a class="reference external" href="mailto:ivan.todorovich&#64;gmail.com">ivan.todorovich&#64;gmail.com</a>&gt;</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://www.mokatourisme.fr">Moka Tourisme</a>:</dt>
<dd><ul class="first last">
<li>Grégory Schreiner</li> <li>Grégory Schreiner</li>
</ul> </ul>
</dd> </blockquote>
</dl> </li>
<li><p class="first">Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</p>
</li>
<li><p class="first">Stefan Rijnhart &lt;<a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a>&gt;</p>
</li> </li>
<li>Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
@@ -452,7 +455,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/ivantodorovich"><img alt="ivantodorovich" src="https://github.com/ivantodorovich.png?size=40px" /></a></p> <p><a class="reference external" href="https://github.com/ivantodorovich"><img alt="ivantodorovich" src="https://github.com/ivantodorovich.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/report_label">OCA/reporting-engine</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/14.0/report_label">OCA/reporting-engine</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

View File

@@ -1,4 +1,4 @@
from ast import literal_eval # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common from odoo.tests import common
@@ -14,9 +14,14 @@ class TestReportLabel(common.TransactionCase):
self.partner_label.create_action() self.partner_label.create_action()
action = self.partner_label.run() action = self.partner_label.run()
model = action["res_model"] model = action["res_model"]
context = literal_eval(action["context"]) context = action["context"]
context["active_model"] = "res.partner" context.update(
context["active_ids"] = self.env["res.partner"].search([]).ids {
"active_model": "res.partner",
"active_ids": self.env["res.partner"].search([]).ids,
"discard_logo_check": True,
}
)
wizard = self.env[model].with_context(context).create({}) wizard = self.env[model].with_context(context).create({})
report_action = wizard.print_report() report_action = wizard.print_report()
self.assertEquals(report_action["type"], "ir.actions.report") self.assertEquals(report_action["type"], "ir.actions.report")

View File

@@ -30,7 +30,6 @@
<record id="report_label_action" model="ir.actions.act_window"> <record id="report_label_action" model="ir.actions.act_window">
<field name="name">Label Reports</field> <field name="name">Label Reports</field>
<field name="res_model">ir.actions.server</field> <field name="res_model">ir.actions.server</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="domain">[("state", "=", "report_label")]</field> <field name="domain">[("state", "=", "report_label")]</field>
<field name="context">{"default_state": "report_label"}</field> <field name="context">{"default_state": "report_label"}</field>

View File

@@ -17,7 +17,7 @@
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</field> </field>
<!-- Add label paper format fields --> <!-- Add label paper format fields -->
<form position="inside"> <sheet position="inside">
<group name="label"> <group name="label">
<group name="label_size" string="Label Size" colspan="2"> <group name="label_size" string="Label Size" colspan="2">
<field name="label_height" /> <field name="label_height" />
@@ -36,7 +36,7 @@
<field string="Left (mm)" name="label_margin_left" /> <field string="Left (mm)" name="label_margin_left" />
</group> </group>
</group> </group>
</form> </sheet>
</field> </field>
</record> </record>
@@ -54,7 +54,6 @@
<record id="paperformat_label_action" model="ir.actions.act_window"> <record id="paperformat_label_action" model="ir.actions.act_window">
<field name="name">Label paper format configuration</field> <field name="name">Label paper format configuration</field>
<field name="res_model">report.paperformat.label</field> <field name="res_model">report.paperformat.label</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="domain">[]</field> <field name="domain">[]</field>
<field name="context">{}</field> <field name="context">{}</field>

View File

@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models from odoo import api, fields, models