mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_m2x_options: Efficiency
Improved the efficiency of code: With this improvement we achieve to just do an rpc call when the js file is called instead of do the call for each field.
This commit is contained in:
@@ -13,4 +13,7 @@ class IrConfigParameter(models.Model):
|
||||
"web_m2x_options.search_more",
|
||||
"web_m2x_options.m2o_dialog",
|
||||
]
|
||||
return self.sudo().search_read([["key", "in", opts]], ["key", "value"])
|
||||
return {
|
||||
res["key"]: res["value"]
|
||||
for res in self.sudo().search_read([["key", "in", opts]], ["key", "value"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user