The expression record.id relies on a Python descriptor that has some overhead, which is small but not negligible when used in a low-level method of the ORM. We simply factor out this expression in order to evaluate it once for the method. closes odoo/odoo#149624 Signed-off-by: Raphael Collet <rco@odoo.com>