From fe21ceb425757d70fd061eff46b1b0aafaa79227 Mon Sep 17 00:00:00 2001 From: Nils Coenen <74965194+NICO-SOLUTIONS@users.noreply.github.com> Date: Mon, 25 Mar 2024 08:49:07 +0100 Subject: [PATCH] [MIG] account_invoice_overdue_reminder: Migration to 17.0 --- account_invoice_overdue_reminder/README.rst | 1 + .../__manifest__.py | 2 +- account_invoice_overdue_reminder/hooks.py | 8 +- .../readme/CONTRIBUTORS.md | 1 + .../static/description/index.html | 1 + .../account_invoice_overdue_reminder.xml | 21 ++--- .../views/account_move.xml | 10 +-- .../views/overdue_reminder_action.xml | 15 +--- .../views/overdue_reminder_result.xml | 2 +- .../views/res_partner.xml | 4 +- .../wizard/overdue_reminder_wizard.py | 45 ++++------ .../wizard/overdue_reminder_wizard_view.xml | 43 ++++----- .../wizard/res_config_settings_view.xml | 90 ++++++++----------- 13 files changed, 93 insertions(+), 150 deletions(-) diff --git a/account_invoice_overdue_reminder/README.rst b/account_invoice_overdue_reminder/README.rst index fee5294fd..035391017 100644 --- a/account_invoice_overdue_reminder/README.rst +++ b/account_invoice_overdue_reminder/README.rst @@ -160,6 +160,7 @@ Contributors ------------ - Alexis de Lattre +- Nils Coenen Maintainers ----------- diff --git a/account_invoice_overdue_reminder/__manifest__.py b/account_invoice_overdue_reminder/__manifest__.py index 693da16d6..54df81198 100644 --- a/account_invoice_overdue_reminder/__manifest__.py +++ b/account_invoice_overdue_reminder/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Overdue Invoice Reminder", - "version": "16.0.1.3.0", + "version": "17.0.1.0.0", "category": "Accounting", "license": "AGPL-3", "summary": "Simple mail/letter/phone overdue customer invoice reminder ", diff --git a/account_invoice_overdue_reminder/hooks.py b/account_invoice_overdue_reminder/hooks.py index d56d429b6..150857957 100644 --- a/account_invoice_overdue_reminder/hooks.py +++ b/account_invoice_overdue_reminder/hooks.py @@ -5,18 +5,18 @@ _logger = logging.getLogger(__name__) -def pre_init_hook(cr): +def pre_init_hook(env): _logger.info( "Pre-creating column overdue_reminder_last_date for table account_move" ) - cr.execute( + env.cr.execute( """ ALTER TABLE account_move ADD COLUMN IF NOT EXISTS overdue_reminder_last_date Date; """ ) _logger.info("Pre-creating column overdue_reminder_counter for table account_move") - cr.execute( + env.cr.execute( """ ALTER TABLE account_move ADD COLUMN IF NOT EXISTS overdue_reminder_counter INTEGER DEFAULT 0; @@ -24,7 +24,7 @@ def pre_init_hook(cr): """ ) _logger.info("Pre-creating column no_overdue_reminder for table account_move") - cr.execute( + env.cr.execute( """ ALTER TABLE account_move ADD COLUMN IF NOT EXISTS no_overdue_reminder BOOL DEFAULT False; diff --git a/account_invoice_overdue_reminder/readme/CONTRIBUTORS.md b/account_invoice_overdue_reminder/readme/CONTRIBUTORS.md index b61afe5d0..bc00956c8 100644 --- a/account_invoice_overdue_reminder/readme/CONTRIBUTORS.md +++ b/account_invoice_overdue_reminder/readme/CONTRIBUTORS.md @@ -1 +1,2 @@ - Alexis de Lattre \<\> +- Nils Coenen \<\> diff --git a/account_invoice_overdue_reminder/static/description/index.html b/account_invoice_overdue_reminder/static/description/index.html index 1de22660b..62bf2b196 100644 --- a/account_invoice_overdue_reminder/static/description/index.html +++ b/account_invoice_overdue_reminder/static/description/index.html @@ -503,6 +503,7 @@

Authors

Contributors

diff --git a/account_invoice_overdue_reminder/views/account_invoice_overdue_reminder.xml b/account_invoice_overdue_reminder/views/account_invoice_overdue_reminder.xml index 5fa5bb409..4bb5a5174 100644 --- a/account_invoice_overdue_reminder/views/account_invoice_overdue_reminder.xml +++ b/account_invoice_overdue_reminder/views/account_invoice_overdue_reminder.xml @@ -13,10 +13,7 @@
- + @@ -59,10 +56,7 @@ - +
@@ -73,10 +67,7 @@ account.invoice.overdue.reminder - +
-