Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2021-10-27 22:21:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Wed Oct 27 22:21:23 2021 rev:63 rq:927822 version:5.0.36 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2021-07-28 19:20:47.887575849 +0200 +++ /work/SRC/openSUSE:Factory/.trytond.new.1890/trytond.changes 2021-10-27 22:21:44.359215072 +0200 @@ -1,0 +2,5 @@ +Wed Oct 27 16:15:35 UTC 2021 - Axel Braun <[email protected]> + +- Update_changed_fields.diff added to force update of XML files + +------------------------------------------------------------------- New: ---- Update_changed_fields.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.K3qQdX/_old 2021-10-27 22:21:44.855215326 +0200 +++ /var/tmp/diff_new_pack.K3qQdX/_new 2021-10-27 22:21:44.859215328 +0200 @@ -37,6 +37,7 @@ Patch0: fix_werkzeug.patch Patch1: revert_werkzeug_setup.patch Patch2: fix_werkzeug_2.x.patch +Patch3: Update_changed_fields.diff BuildRequires: fdupes BuildRequires: python3-Werkzeug BuildRequires: python3-bcrypt @@ -84,6 +85,7 @@ cp %{SOURCE2} . %patch0 -p1 %patch1 -p1 +%patch3 -p1 #Werkzeug2 is not compatible with Werkzeug 1.x, so we need a conditional patch echo 0%{?suse_version} ++++++ Update_changed_fields.diff ++++++ diff --git a/trytond/convert.py b/trytond/convert.py index c1dde99f19ae579d3d84d0e9f75272ea857f86f1..b57f1c710aefb7579d4edd9d07baad30df23ba8b 100644 --- a/trytond/convert.py +++ b/trytond/convert.py @@ -9,6 +9,8 @@ import re from collections import defaultdict from decimal import Decimal +from trytond.config import config + from . import __version__ from .tools import grouped_slice from .transaction import Transaction @@ -19,6 +21,9 @@ logger = logging.getLogger(__name__) CDATA_START = re.compile('^\s*\<\!\[cdata\[', re.IGNORECASE) CDATA_END = re.compile('\]\]\>\s*$', re.IGNORECASE) +_update_changed_fields = config.getboolean('optional', + 'update_changed_fields', default=True) + class DummyTagHandler: """Dubhandler implementing empty methods. Will be used when whe @@ -668,11 +673,18 @@ class TrytondXmlHandler(sax.handler.ContentHandler): # if they are not false in a boolean context (ie None, # False, {} or []) if db_field != expected_value and (db_field or expected_value): - logger.warning( - "Field %s of %s@%s not updated (id: %s), because " - "it has changed since the last update", - key, record.id, model, fs_id) - continue + if _update_changed_fields: + logger.warning( + "Field %s of %s@%s (id: %s) " + "has changed since the last update\n" + "It will be nevertheless updated", + key, record.id, model, fs_id) + else: + logger.warning( + "Field %s of %s@%s not updated (id: %s), because " + "it has changed since the last update", + key, record.id, model, fs_id) + continue # so, the field in the fs and in the db are different, # and no user changed the value in the db:
