[FIX] core: Method should have "self" as first argument (E0213)

Part-of: odoo/odoo#86332
This commit is contained in:
Victor Feyens
2022-04-27 07:51:23 +02:00
parent 7d422a2cd4
commit 3a43ba3ee0
+3 -2
View File
@@ -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))