[IMP] server.env.techname.mixin: Inherit from server.env.mixin.

This commit is contained in:
Ivàn Todorovich 2021-07-05 11:30:15 -03:00
parent 314d16d37c
commit 154090abb7
2 changed files with 3 additions and 8 deletions

View File

@ -16,17 +16,11 @@ class ServerEnvTechNameMixin(models.AbstractModel):
This mixin helps solve the problem by providing a tech name field This mixin helps solve the problem by providing a tech name field
and a cleanup machinery as well as a unique constrain. and a cleanup machinery as well as a unique constrain.
To use this mixin add it to the _inherit attr of your module like: Use it in place of "server.env.mixin".
_inherit = [
"my.model",
"server.env.techname.mixin",
"server.env.mixin",
]
""" """
_name = "server.env.techname.mixin" _name = "server.env.techname.mixin"
_inherit = "server.env.mixin"
_description = "Server environment technical name" _description = "Server environment technical name"
_sql_constraints = [ _sql_constraints = [
("tech_name_uniq", "unique(tech_name)", "`tech_name` must be unique!",) ("tech_name_uniq", "unique(tech_name)", "`tech_name` must be unique!",)

View File

@ -10,3 +10,4 @@
* Thomas Binfeld <thomas.binsfeld@acsone.eu> * Thomas Binfeld <thomas.binsfeld@acsone.eu>
* Stéphane Bidoul <stefane.bidoul@acsone.com> * Stéphane Bidoul <stefane.bidoul@acsone.com>
* Simone Orsi <simahawk@gmail.com> * Simone Orsi <simahawk@gmail.com>
* Iván Todorovich <ivan.todorovich@gmail.com>