Skip to content

Commit

Permalink
[MIG] server_environment: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qgroulard authored and sbidoul committed Sep 30, 2024
1 parent 6260e87 commit 88522fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server_environment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "server configuration environment files",
"version": "17.0.1.1.0",
"version": "18.0.1.0.0",
"depends": ["base", "base_sparse_field"],
"author": "Camptocamp,Odoo Community Association (OCA)",
"summary": "move some configurations out of the database",
Expand Down
7 changes: 2 additions & 5 deletions server_environment/models/server_env_tech_name_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from odoo import api, fields, models

from odoo.addons.http_routing.models.ir_http import slugify


class ServerEnvTechNameMixin(models.AbstractModel):
"""Provides a tech_name field to be used in server env vars as unique key.
Expand Down Expand Up @@ -72,6 +70,5 @@ def _handle_tech_name(self, vals):
if not vals.get("tech_name") and vals.get("name"):
vals["tech_name"] = self._normalize_tech_name(vals["name"])

@staticmethod
def _normalize_tech_name(name):
return slugify(name).replace("-", "_")
def _normalize_tech_name(self, name):
return self.env["ir.http"]._slugify(name).replace("-", "_")

0 comments on commit 88522fd

Please sign in to comment.