From c524ef4ddcdfc506c7c87d340db53fc6839faa12 Mon Sep 17 00:00:00 2001
From: Nguyen Minh Chien
Date: Wed, 9 Oct 2024 17:44:21 +0700
Subject: [PATCH] [MIG] crm_partner_company_group: Migration to 18.0
---
crm_partner_company_group/README.rst | 16 +++++++++++-----
crm_partner_company_group/__init__.py | 1 -
crm_partner_company_group/__manifest__.py | 2 +-
crm_partner_company_group/hooks.py | 15 ---------------
crm_partner_company_group/readme/CREDITS.md | 1 +
.../static/description/index.html | 16 +++++++++++-----
6 files changed, 24 insertions(+), 27 deletions(-)
delete mode 100644 crm_partner_company_group/hooks.py
create mode 100644 crm_partner_company_group/readme/CREDITS.md
diff --git a/crm_partner_company_group/README.rst b/crm_partner_company_group/README.rst
index 802f77c69f4..0fb96a9d2c0 100644
--- a/crm_partner_company_group/README.rst
+++ b/crm_partner_company_group/README.rst
@@ -17,13 +17,13 @@ CRM Partner Company Group
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
- :target: https://github.com/OCA/partner-contact/tree/17.0/crm_partner_company_group
+ :target: https://github.com/OCA/partner-contact/tree/18.0/crm_partner_company_group
:alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-crm_partner_company_group
+ :target: https://translation.odoo-community.org/projects/partner-contact-18-0/partner-contact-18-0-crm_partner_company_group
: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/partner-contact&target_branch=17.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/partner-contact&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -42,7 +42,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -65,6 +65,12 @@ Contributors
- Tharathip Chaweewongphan
+Other credits
+-------------
+
+The migration of this module from 17.0 to 18.0 was financially supported
+by Camptocamp.
+
Maintainers
-----------
@@ -78,6 +84,6 @@ 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/partner-contact `_ project on GitHub.
+This module is part of the `OCA/partner-contact `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/crm_partner_company_group/__init__.py b/crm_partner_company_group/__init__.py
index 6d58305f5dd..0650744f6bc 100644
--- a/crm_partner_company_group/__init__.py
+++ b/crm_partner_company_group/__init__.py
@@ -1,2 +1 @@
from . import models
-from .hooks import pre_init_hook
diff --git a/crm_partner_company_group/__manifest__.py b/crm_partner_company_group/__manifest__.py
index 30b836fb7e3..45b79eabc83 100644
--- a/crm_partner_company_group/__manifest__.py
+++ b/crm_partner_company_group/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "CRM Partner Company Group",
"summary": "Adds the possibility to add a company group to a company",
- "version": "17.0.1.0.0",
+ "version": "18.0.1.0.0",
"category": "Sales",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
diff --git a/crm_partner_company_group/hooks.py b/crm_partner_company_group/hooks.py
deleted file mode 100644
index c6c1d846544..00000000000
--- a/crm_partner_company_group/hooks.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2022 Tecnativa - Víctor Martínez
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-import logging
-
-
-def pre_init_hook(env):
- """Prepopulate stored related fields for faster installation"""
- logger = logging.getLogger(__name__)
- logger.info("Prepopulating stored related fields")
- env.execute(
- """
- ALTER TABLE crm_lead
- ADD COLUMN IF NOT EXISTS company_group_id integer;
- """
- )
diff --git a/crm_partner_company_group/readme/CREDITS.md b/crm_partner_company_group/readme/CREDITS.md
new file mode 100644
index 00000000000..83b3ec91f7d
--- /dev/null
+++ b/crm_partner_company_group/readme/CREDITS.md
@@ -0,0 +1 @@
+The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp.
diff --git a/crm_partner_company_group/static/description/index.html b/crm_partner_company_group/static/description/index.html
index dd7d8d40c70..8c7dd548fad 100644
--- a/crm_partner_company_group/static/description/index.html
+++ b/crm_partner_company_group/static/description/index.html
@@ -369,7 +369,7 @@ CRM Partner Company Group
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b187650350db691ed92176edf560bd584434beed33ae4609018dabb82bcd59ba
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This Module adds a company group field to leads. For more details
investigate in base_partner_company_group.
Table of contents
@@ -379,7 +379,8 @@ CRM Partner Company Group
Credits
@@ -389,7 +390,7 @@
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
+
+
+
The migration of this module from 17.0 to 18.0 was financially supported
+by Camptocamp.
+