Define environments for server configurations.
For a detailed documentation have a look at https://www.odoo-wiki.org/server-config-environment.html
- Connect model to the server config environment:
class GitRepoBranch(models.Model):
_name = "git.repo.branch"
_description = "Git Repo Branch"
field environment_id = Many2one("server.config.environment")
- Define the server environment in the Odoo config:
[options]
environment = development
- Use the get active environment to filter records:
environment_id = self.env['server.config.environment'].get_active_environment()
branch = self.search(['environment_id', '=', environment_id.id)

This module is maintained by Mint System GmbH.
For support and more information, please visit our Website.