Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions base_country_active_flag/README.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/OCA/partner-contact/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 <https://github.com/OCA/partner-contact/issues/new?body=module:%20base_country_active_flag%0Aversion:%2015.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.

Credits
=======

Authors
-------

* Hunki Enterprises BV

Contributors
------------

- Holger Brunn <mail@hunki-enterprises.com>
(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 <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-hbrunn|

This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/15.0/base_country_active_flag>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions base_country_active_flag/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions base_country_active_flag/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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",
],
}
1 change: 1 addition & 0 deletions base_country_active_flag/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_country
10 changes: 10 additions & 0 deletions base_country_active_flag/models/res_country.py
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions base_country_active_flag/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Holger Brunn \<mail@hunki-enterprises.com> (https://hunki-enterprises.com)
3 changes: 3 additions & 0 deletions base_country_active_flag/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -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).
7 changes: 7 additions & 0 deletions base_country_active_flag/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -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`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading