From b80f1da93edc1aa8a4acf4bf6784291e25c43bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 14 Sep 2018 08:28:51 +0200 Subject: [PATCH] Remove migration before 3.0 in convert.py issue6470 review60341002 --- trytond/convert.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/trytond/convert.py b/trytond/convert.py index a6aae3c56a..438dfddadf 100644 --- a/trytond/convert.py +++ b/trytond/convert.py @@ -643,12 +643,8 @@ class TrytondXmlHandler(sax.handler.ContentHandler): db_field = self._clean_value(key, record) - # if the fs value is the same has in the db, whe ignore it - val = values[key] - if isinstance(values[key], bytes): - # Fix for migration to unicode - val = values[key].decode('utf-8') - if db_field == val: + # if the fs value is the same as in the db, we ignore it + if db_field == values[key]: continue # we cannot update a field if it was changed by a user... @@ -658,13 +654,6 @@ class TrytondXmlHandler(sax.handler.ContentHandler): else: expected_value = old_values[key] - # Migration from 2.0: Reference field change value - field_type = Model._fields[key]._type - if field_type == 'reference': - if (expected_value and expected_value.endswith(',0') - and not db_field): - db_field = expected_value - # ... and we consider that there is an update if the # expected value differs from the actual value, _and_ # if they are not false in a boolean context (ie None,