[IMP] odoo: models: add field name in field descr

The fields dict maps field names to their description. Before this
commit, the field name wasn't specified in the description, meaning
that we could never manipulate the field description without its
key, which would often be convenient.

closes odoo/odoo#75121

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
Aaron Bohy
2021-08-16 09:02:47 +00:00
committed by Mathieu Duckerts-Antoine
parent 61bd712459
commit 436c5023d7
+1
View File
@@ -3079,6 +3079,7 @@ class BaseModel(metaclass=MetaModel):
continue
description = field.get_description(self.env)
description['name'] = fname
if readonly:
description['readonly'] = True
description['states'] = {}