From 019cde4767a000244b19bde65acef5ebb0fbf671 Mon Sep 17 00:00:00 2001 From: Antoni Marroig Campomar Date: Tue, 23 Apr 2024 08:46:56 +0200 Subject: [PATCH] [MIG] l10n_es_pos: Migration to 17.0 --- l10n_es_pos/README.rst | 4 ++ l10n_es_pos/__manifest__.py | 2 +- l10n_es_pos/hooks.py | 8 +-- l10n_es_pos/readme/CONTRIBUTORS.md | 2 + l10n_es_pos/static/description/index.html | 4 ++ .../OrderManagementScreen/TicketScreen.xml | 1 - l10n_es_pos/static/src/xml/pos.xml | 1 - .../views/res_config_settings_views.xml | 65 +++++++------------ 8 files changed, 38 insertions(+), 49 deletions(-) diff --git a/l10n_es_pos/README.rst b/l10n_es_pos/README.rst index fbdcdb323e7..ff057a6c87b 100644 --- a/l10n_es_pos/README.rst +++ b/l10n_es_pos/README.rst @@ -137,6 +137,10 @@ Contributors - Daniel Duque +- `APSL `__: + + - Antoni Marroig + Maintainers ----------- diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index fe643765177..175c2d40583 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -9,7 +9,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", - "version": "16.0.1.0.2", + "version": "17.0.1.0.0", "depends": ["point_of_sale"], "data": ["views/pos_views.xml", "views/res_config_settings_views.xml"], "assets": { diff --git a/l10n_es_pos/hooks.py b/l10n_es_pos/hooks.py index 93b97984a5d..85f78cd339c 100644 --- a/l10n_es_pos/hooks.py +++ b/l10n_es_pos/hooks.py @@ -1,12 +1,9 @@ # Copyright 2018 David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import SUPERUSER_ID, api - -def post_init_hook(cr, registry, vals=None): +def post_init_hook(env, vals=None): """For brand new installations""" - env = api.Environment(cr, SUPERUSER_ID, {}) IrSequence = env["ir.sequence"] pos_config = env["pos.config"].search( [("l10n_es_simplified_invoice_sequence_id", "=", False)] @@ -47,6 +44,5 @@ def post_init_hook(cr, registry, vals=None): ) -def uninstall_hook(cr, registry): - env = api.Environment(cr, SUPERUSER_ID, {}) +def uninstall_hook(env): env["ir.sequence"].search([("code", "=", "pos.config.simplified_invoice")]).unlink() diff --git a/l10n_es_pos/readme/CONTRIBUTORS.md b/l10n_es_pos/readme/CONTRIBUTORS.md index ef8104ff8ac..8e1dd54a9bd 100644 --- a/l10n_es_pos/readme/CONTRIBUTORS.md +++ b/l10n_es_pos/readme/CONTRIBUTORS.md @@ -16,3 +16,5 @@ - Manuel Regidor - [Factor Libre](https://factorlibre.com/): - Daniel Duque \<\> +- [APSL](https://apsl.tech): + - Antoni Marroig \<\> diff --git a/l10n_es_pos/static/description/index.html b/l10n_es_pos/static/description/index.html index 161f04b7745..4699ba0afb9 100644 --- a/l10n_es_pos/static/description/index.html +++ b/l10n_es_pos/static/description/index.html @@ -484,6 +484,10 @@

Contributors

  • Daniel Duque <daniel.duque@factorlibre.com>
  • +
  • APSL: +
  • diff --git a/l10n_es_pos/static/src/xml/Screens/OrderManagementScreen/TicketScreen.xml b/l10n_es_pos/static/src/xml/Screens/OrderManagementScreen/TicketScreen.xml index aede32d3455..7350c4e8a55 100644 --- a/l10n_es_pos/static/src/xml/Screens/OrderManagementScreen/TicketScreen.xml +++ b/l10n_es_pos/static/src/xml/Screens/OrderManagementScreen/TicketScreen.xml @@ -5,7 +5,6 @@ t-name="TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension" - owl="1" >
    Simplified Invoice
    diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index 0d0a2e23d13..6d42c995d42 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -4,7 +4,6 @@ t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" - owl="1" > diff --git a/l10n_es_pos/views/res_config_settings_views.xml b/l10n_es_pos/views/res_config_settings_views.xml index 5819a00a56b..25be62420c5 100644 --- a/l10n_es_pos/views/res_config_settings_views.xml +++ b/l10n_es_pos/views/res_config_settings_views.xml @@ -5,55 +5,40 @@ res.config.settings - -
    -
    - -
    -
    -
    -
    + + -
    -
    -
    + {'required': ['|', ('pos_company_has_template', '=', True), ('pos_l10n_es_simplified_invoice_sequence_id', '=', True)]} + name="required" + >pos_company_has_template and pos_l10n_es_simplified_invoice_sequence_id