From 3a43ba3ee0fdc4b16dfa1f05da74aff7b354f3c9 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Fri, 4 Mar 2022 15:26:10 +0000 Subject: [PATCH] [FIX] core: Method should have "self" as first argument (E0213) Part-of: odoo/odoo#86332 --- odoo/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/odoo/models.py b/odoo/models.py index 12d01dc4206..7f470c29dbc 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -4860,13 +4860,14 @@ Fields: return [default] - def copy_translations(old, new, excluded=()): + def copy_translations(self, new, excluded=()): """ Recursively copy the translations from original to new record - :param old: the original record + :param self: the original record :param new: the new record (copy of the original one) :param excluded: a container of user-provided field names """ + old = self # avoid recursion through already copied records in case of circular relationship if '__copy_translations_seen' not in old._context: old = old.with_context(__copy_translations_seen=defaultdict(set))