Daily updates from Odoo
Thursday, May 24, 2018
1 change · master
Code cleanup and technical improvements
This change improves how Odoo prepares record names shown in relationship fields across views. It reuses already available data when possible and avoids loading unnecessary information, which can make common screens more responsive.
Original PR description
name_get method is a critical one to performance issues since that is used in all views for m2* fields. Then avoid get all fields if the view just is showing one field. But if previously the cache is prefetch was filled then re-use it if not then don't read all other fields. Avoid access to `if name in self._fields: self._fields[name]` 2 times Better use `field_name = self._fields.get(name) if field_name` used just one time.