[IMP] Server env default fields string

Not all fields have their string in the args, but '.string' returns the computed (based on field name) string if not set in the args.
This commit is contained in:
Quentin Groulard 2023-06-19 13:26:11 +02:00 committed by Marcos Oitaben
parent 8df08c4ecc
commit e90a7555fb
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
{ {
"name": "server configuration environment files", "name": "server configuration environment files",
"version": "16.0.1.0.1", "version": "16.0.1.0.2",
"depends": ["base", "base_sparse_field"], "depends": ["base", "base_sparse_field"],
"author": "Camptocamp,Odoo Community Association (OCA)", "author": "Camptocamp,Odoo Community Association (OCA)",
"summary": "move some configurations out of the database", "summary": "move some configurations out of the database",

View File

@ -401,7 +401,7 @@ class ServerEnvMixin(models.AbstractModel):
base_field_cls = base_field.__class__ base_field_cls = base_field.__class__
field_args = base_field.args.copy() if base_field.args else {} field_args = base_field.args.copy() if base_field.args else {}
field_args.pop("_sequence", None) field_args.pop("_sequence", None)
fieldlabel = "{} {}".format(field_args.get("string", ""), "Env Default") fieldlabel = "{} {}".format(base_field.string or "", "Env Default")
field_args.update( field_args.update(
{ {
"sparse": "server_env_defaults", "sparse": "server_env_defaults",