diff --git a/base_country_active_flag/README.rst b/base_country_active_flag/README.rst new file mode 100644 index 00000000000..009292b23c1 --- /dev/null +++ b/base_country_active_flag/README.rst @@ -0,0 +1,101 @@ +========================= +Active flag for countries +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:82ef477a69343e6580db494ed4421e268fdc6063c7d57d438dd2f9eb0a74487f + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |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%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/15.0/base_country_active_flag + :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-15-0/partner-contact-15-0-base_country_active_flag + :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=15.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to deactivate countries not relevant for an Odoo +installation. + +Deactivated countries will neither be selectable in the backend (ie as +partner country) nor in the frontend (ie as checkout address country). + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +1. Go to Contacts/Configuration/Countries +2. Select countries you want to deactivate +3. Click Action/Archive + +If you want to unarchive a country, you need to add a custom filter to +search for ``active is false`` + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Hunki Enterprises BV + +Contributors +------------ + +- Holger Brunn + (https://hunki-enterprises.com) + +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-hbrunn| image:: https://github.com/hbrunn.png?size=40px + :target: https://github.com/hbrunn + :alt: hbrunn + +Current `maintainer `__: + +|maintainer-hbrunn| + +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/base_country_active_flag/__init__.py b/base_country_active_flag/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/base_country_active_flag/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/base_country_active_flag/__manifest__.py b/base_country_active_flag/__manifest__.py new file mode 100644 index 00000000000..7b2741d7205 --- /dev/null +++ b/base_country_active_flag/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2026 Hunki Enterprises BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) + +{ + "name": "Active flag for countries", + "summary": "Deactivate countries in backend and frontend", + "version": "15.0.1.0.0", + "development_status": "Production/Stable", + "category": "Localization", + "website": "https://github.com/OCA/partner-contact", + "author": "Hunki Enterprises BV, Odoo Community Association (OCA)", + "maintainers": ["hbrunn"], + "license": "AGPL-3", + "depends": [ + "base", + ], + "data": [ + "views/res_country.xml", + ], +} diff --git a/base_country_active_flag/models/__init__.py b/base_country_active_flag/models/__init__.py new file mode 100644 index 00000000000..11573766f26 --- /dev/null +++ b/base_country_active_flag/models/__init__.py @@ -0,0 +1 @@ +from . import res_country diff --git a/base_country_active_flag/models/res_country.py b/base_country_active_flag/models/res_country.py new file mode 100644 index 00000000000..5f928461414 --- /dev/null +++ b/base_country_active_flag/models/res_country.py @@ -0,0 +1,10 @@ +# Copyright 2026 Hunki Enterprises BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) + +from odoo import fields, models + + +class ResCountry(models.Model): + _inherit = "res.country" + + active = fields.Boolean(default=True, copy=False) diff --git a/base_country_active_flag/readme/CONTRIBUTORS.md b/base_country_active_flag/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..b28199e1f41 --- /dev/null +++ b/base_country_active_flag/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Holger Brunn \ (https://hunki-enterprises.com) diff --git a/base_country_active_flag/readme/DESCRIPTION.md b/base_country_active_flag/readme/DESCRIPTION.md new file mode 100644 index 00000000000..1b0647b2e47 --- /dev/null +++ b/base_country_active_flag/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module allows to deactivate countries not relevant for an Odoo installation. + +Deactivated countries will neither be selectable in the backend (ie as partner country) nor in the frontend (ie as checkout address country). diff --git a/base_country_active_flag/readme/USAGE.md b/base_country_active_flag/readme/USAGE.md new file mode 100644 index 00000000000..207a0f213f2 --- /dev/null +++ b/base_country_active_flag/readme/USAGE.md @@ -0,0 +1,7 @@ +To use this module, you need to: + +1. Go to Contacts/Configuration/Countries +2. Select countries you want to deactivate +3. Click Action/Archive + +If you want to unarchive a country, you need to add a custom filter to search for `active is false` diff --git a/base_country_active_flag/static/description/icon.png b/base_country_active_flag/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/base_country_active_flag/static/description/icon.png differ diff --git a/base_country_active_flag/static/description/index.html b/base_country_active_flag/static/description/index.html new file mode 100644 index 00000000000..0c5321cbe54 --- /dev/null +++ b/base_country_active_flag/static/description/index.html @@ -0,0 +1,441 @@ + + + + + +Active flag for countries + + + +
+

Active flag for countries

+ + +

Production/Stable License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runboat

+

This module allows to deactivate countries not relevant for an Odoo +installation.

+

Deactivated countries will neither be selectable in the backend (ie as +partner country) nor in the frontend (ie as checkout address country).

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to Contacts/Configuration/Countries
  2. +
  3. Select countries you want to deactivate
  4. +
  5. Click Action/Archive
  6. +
+

If you want to unarchive a country, you need to add a custom filter to +search for active is false

+
+
+

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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Hunki Enterprises BV
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

Current maintainer:

+

hbrunn

+

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/base_country_active_flag/views/res_country.xml b/base_country_active_flag/views/res_country.xml new file mode 100644 index 00000000000..488b29bf663 --- /dev/null +++ b/base_country_active_flag/views/res_country.xml @@ -0,0 +1,21 @@ + + + + + res.country + + + + + + + + + + diff --git a/setup/base_country_active_flag/odoo/addons/base_country_active_flag b/setup/base_country_active_flag/odoo/addons/base_country_active_flag new file mode 120000 index 00000000000..b5724a08e40 --- /dev/null +++ b/setup/base_country_active_flag/odoo/addons/base_country_active_flag @@ -0,0 +1 @@ +../../../../base_country_active_flag \ No newline at end of file diff --git a/setup/base_country_active_flag/setup.py b/setup/base_country_active_flag/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/base_country_active_flag/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)