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-12-07 00:00:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.31177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Tue Dec 7 00:00:28 2021 rev:64 rq:936101 version:5.0.42 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2021-10-27 22:21:44.359215072 +0200 +++ /work/SRC/openSUSE:Factory/.trytond.new.31177/trytond.changes 2021-12-07 00:02:15.295954826 +0100 @@ -1,0 +2,5 @@ +Mon Dec 6 17:50:11 UTC 2021 - Axel Braun <[email protected]> + +- Version 5.0.42 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-5.0.36.tar.gz trytond-5.0.36.tar.gz.asc New: ---- trytond-5.0.42.tar.gz trytond-5.0.42.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.AMYYss/_old 2021-12-07 00:02:16.495950582 +0100 +++ /var/tmp/diff_new_pack.AMYYss/_new 2021-12-07 00:02:16.499950568 +0100 @@ -20,7 +20,7 @@ %define majorver 5.0 %define base_name tryton Name: trytond -Version: %{majorver}.36 +Version: %{majorver}.42 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later ++++++ trytond-5.0.36.tar.gz -> trytond-5.0.42.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/.hgtags new/trytond-5.0.42/.hgtags --- old/trytond-5.0.36/.hgtags 2021-06-17 21:22:27.000000000 +0200 +++ new/trytond-5.0.42/.hgtags 2021-12-03 21:43:12.000000000 +0100 @@ -55,3 +55,9 @@ 91c52f70ccb84ffdd122b29888828a74aac04a83 5.0.34 fd34ad4f8fb3b09318a293dda21dfba2ce2c3fbc 5.0.35 c2bc265f69a9584b3efaeff9d758d4ecf8c74162 5.0.36 +4fc592093d2de3b485215a14baf86a84ccf6d4ef 5.0.37 +745fefee3c62ad50e21ffaa64094f83690a57610 5.0.38 +44881ebfed4487bab6fe4b3b95c141f565984b4a 5.0.39 +77e0de04c2e976b59e3810fc00df8307bc0c16f7 5.0.40 +95cdc17c7036fe7a0d89c3f02eabf5bbc43be8ea 5.0.41 +929208497bec8ab60d09693faf84c0c857c6e9d9 5.0.42 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/CHANGELOG new/trytond-5.0.42/CHANGELOG --- old/trytond-5.0.36/CHANGELOG 2021-06-17 21:22:26.000000000 +0200 +++ new/trytond-5.0.42/CHANGELOG 2021-12-03 21:43:11.000000000 +0100 @@ -1,3 +1,21 @@ +Version 5.0.42 - 2021-12-03 +* Bug fixes (see mercurial logs for details) + +Version 5.0.41 - 2021-11-04 +* Bug fixes (see mercurial logs for details) + +Version 5.0.40 - 2021-10-15 +* Bug fixes (see mercurial logs for details) + +Version 5.0.39 - 2021-10-01 +* Bug fixes (see mercurial logs for details) + +Version 5.0.38 - 2021-09-16 +* Bug fixes (see mercurial logs for details) + +Version 5.0.37 - 2021-09-01 +* Bug fixes (see mercurial logs for details) + Version 5.0.36 - 2021-06-17 * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/PKG-INFO new/trytond-5.0.42/PKG-INFO --- old/trytond-5.0.36/PKG-INFO 2021-06-17 21:22:29.208312000 +0200 +++ new/trytond-5.0.42/PKG-INFO 2021-12-03 21:43:14.007671800 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 5.0.36 +Version: 5.0.42 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/bin/trytond-cron new/trytond-5.0.42/bin/trytond-cron --- old/trytond-5.0.36/bin/trytond-cron 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/bin/trytond-cron 2021-09-14 21:49:46.000000000 +0200 @@ -19,9 +19,11 @@ commandline.config_log(options) # Import after application is configured +from trytond.pool import Pool import trytond.cron as cron with commandline.pidfile(options): + Pool.start() while True: cron.run(options) time.sleep(60) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/bin/trytond-worker new/trytond-5.0.42/bin/trytond-worker --- old/trytond-5.0.36/bin/trytond-worker 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/bin/trytond-worker 2021-09-14 21:49:46.000000000 +0200 @@ -18,7 +18,9 @@ commandline.config_log(options) # Import after application is configured +from trytond.pool import Pool import trytond.worker as worker with commandline.pidfile(options): + Pool.start() worker.work(options) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/__init__.py new/trytond-5.0.42/trytond/__init__.py --- old/trytond-5.0.36/trytond/__init__.py 2021-05-15 22:39:51.000000000 +0200 +++ new/trytond-5.0.42/trytond/__init__.py 2021-11-05 00:02:40.000000000 +0100 @@ -5,7 +5,7 @@ import warnings from email import charset -__version__ = "5.0.36" +__version__ = "5.0.42" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/backend/postgresql/table.py new/trytond-5.0.42/trytond/backend/postgresql/table.py --- old/trytond-5.0.36/trytond/backend/postgresql/table.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/backend/postgresql/table.py 2021-08-30 13:36:37.000000000 +0200 @@ -398,15 +398,11 @@ self._update_definitions(columns=True) else: logger.warning( - 'Unable to set column %s ' - 'of table %s not null !\n' - 'Try to re-run: ' - 'trytond.py --update=module\n' - 'If it doesn\'t work, update records ' - 'and execute manually:\n' - 'ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL', - column_name, self.table_name, self.table_name, - column_name) + "Unable to set not null on column %s of table %s.\n" + "Try restarting one more time.\n" + "If that doesn't work update the records and restart " + "again.", + column_name, self.table_name) elif action == 'remove': if not self._columns[column_name]['notnull']: return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/convert.py new/trytond-5.0.42/trytond/convert.py --- old/trytond-5.0.36/trytond/convert.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/convert.py 2021-08-30 13:36:37.000000000 +0200 @@ -803,11 +803,9 @@ except Exception: transaction.rollback() logger.error( - 'Could not delete id: %d of model %s\n' - 'There should be some relation ' - 'that points to this resource\n' - 'You should manually fix this ' - 'and restart --update=module\n', + "Could not delete id %d from model %s.\n" + "There may be a relation that points to this resource " + "that must be manually fixed before restarting the update.", db_id, model, exc_info=True) if 'active' in Model._fields: try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/ir/attachment.py new/trytond-5.0.42/trytond/ir/attachment.py --- old/trytond-5.0.36/trytond/ir/attachment.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/ir/attachment.py 2021-10-23 00:15:51.000000000 +0200 @@ -90,7 +90,7 @@ def get_size(self, name): with Transaction().set_context({ - '%s.%s' % (self.__name__, name): 'size', + '%s.%s' % (self.__name__, name[:-len('_size')]): 'size', }): record = self.__class__(self.id) return record.data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/ir/translation.py new/trytond-5.0.42/trytond/ir/translation.py --- old/trytond-5.0.36/trytond/ir/translation.py 2021-03-16 09:36:44.000000000 +0100 +++ new/trytond-5.0.42/trytond/ir/translation.py 2021-09-02 23:10:53.000000000 +0200 @@ -177,7 +177,7 @@ trans_help[trans['name']] = trans elif trans['type'] == 'selection': trans_selection.setdefault(trans['name'], {}) - trans_selection[trans['name']][trans['src']] = trans + trans_selection[trans['name']][trans['src']] = trans or '' def update_insert_field(field, trans_name): string_md5 = cls.get_src_md5(field.string) @@ -219,7 +219,7 @@ def insert_selection(field, trans_name): for (_, val) in field.selection: if (trans_name not in trans_selection - or val not in trans_selection[trans_name]): + or (val or '') not in trans_selection[trans_name]): val_md5 = cls.get_src_md5(val) cursor.execute(*ir_translation.insert( [ir_translation.name, ir_translation.lang, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/ir/ui/menu.py new/trytond-5.0.42/trytond/ir/ui/menu.py --- old/trytond-5.0.36/trytond/ir/ui/menu.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/ir/ui/menu.py 2021-08-30 13:36:37.000000000 +0200 @@ -1,5 +1,6 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. +from collections import defaultdict from itertools import groupby from trytond.model import ( @@ -166,19 +167,21 @@ action_keywords.sort(key=key) for type, action_keywords in groupby(action_keywords, key=key): action_keywords = list(action_keywords) + action2keywords = defaultdict(list) for action_keyword in action_keywords: model = action_keyword.model actions[model.id] = '%s,-1' % type + action2keywords[action_keyword.action.id].append( + action_keyword) Action = pool.get(type) - action2keyword = {k.action.id: k for k in action_keywords} with Transaction().set_context(active_test=False): factions = Action.search([ - ('action', 'in', list(action2keyword.keys())), + ('action', 'in', list(action2keywords.keys())), ]) for action in factions: - model = action2keyword[action.id].model - actions[model.id] = str(action) + for action_keyword in action2keywords[action.id]: + actions[action_keyword.model.id] = str(action) return actions @classmethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/model/fields/field.py new/trytond-5.0.42/trytond/model/fields/field.py --- old/trytond-5.0.36/trytond/model/fields/field.py 2021-03-16 00:44:19.000000000 +0100 +++ new/trytond-5.0.42/trytond/model/fields/field.py 2021-08-30 13:36:37.000000000 +0200 @@ -396,11 +396,30 @@ def _get_translation_join(self, Model, name, translation, model, table, from_, language): + if backend.name() == 'postgresql' and _sql_version >= (1, 1, 0): + query = translation.select( + translation.res_id.as_('res_id'), + translation.value.as_('value'), + translation.name.as_('name'), + distinct=True, + distinct_on=[translation.res_id, translation.name], + order_by=[ + translation.res_id, + translation.name, + translation.id.desc]) + else: + query = translation.select( + translation.res_id.as_('res_id'), + Min(translation.value).as_('value'), + translation.name.as_('name'), + group_by=[translation.res_id, translation.name]) if Model.__name__ == 'ir.model': name_ = Concat(Concat(table.model, ','), name) type_ = 'model' res_id = -1 elif Model.__name__ == 'ir.model.field': + from_ = from_.join(model, 'LEFT', + condition=model.id == table.model) name_ = Concat(Concat(model.model, ','), table.name) if name == 'field_description': type_ = 'field' @@ -411,26 +430,13 @@ name_ = '%s,%s' % (Model.__name__, name) type_ = 'model' res_id = table.id - if backend.name() == 'postgresql' and _sql_version >= (1, 1, 0): - query = translation.select( - translation.res_id.as_('res_id'), - translation.value.as_('value'), - distinct=True, - distinct_on=[translation.res_id], - order_by=[translation.res_id, translation.id.desc]) - else: - query = translation.select( - translation.res_id.as_('res_id'), - Min(translation.value).as_('value'), - group_by=[translation.res_id]) query.where = ( (translation.lang == language) & (translation.type == type_) - & (translation.name == name_) & (translation.fuzzy == Literal(False)) ) return query, from_.join(query, 'LEFT', - condition=(query.res_id == res_id)) + condition=(query.res_id == res_id) & (query.name == name_)) def convert_domain(self, domain, tables, Model): from trytond.ir.lang import get_parent_language diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/model/modelsql.py new/trytond-5.0.42/trytond/model/modelsql.py --- old/trytond-5.0.36/trytond/model/modelsql.py 2020-01-22 22:23:31.000000000 +0100 +++ new/trytond-5.0.42/trytond/model/modelsql.py 2021-10-12 14:56:24.000000000 +0200 @@ -1106,7 +1106,8 @@ Model.delete(records) for Model, field_name in foreign_keys_tocheck: - with Transaction().set_context(_check_access=False): + with Transaction().set_context( + _check_access=False, active_test=False): if Model.search([ (field_name, 'in', sub_ids), ], order=[]): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/protocols/dispatcher.py new/trytond-5.0.42/trytond/protocols/dispatcher.py --- old/trytond-5.0.36/trytond/protocols/dispatcher.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/protocols/dispatcher.py 2021-11-29 23:33:07.000000000 +0100 @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -import http.client import logging import pydoc try: @@ -153,7 +152,7 @@ context = {'_request': request.context} if not security.check_timeout( pool.database_name, user, session, context=context): - abort(http.client.UNAUTHORIZED) + abort(HTTPStatus.UNAUTHORIZED) log_message = '%s.%s(*%s, **%s) from %s@%s/%s' username = request.authorization.username diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/protocols/xmlrpc.py new/trytond-5.0.42/trytond/protocols/xmlrpc.py --- old/trytond-5.0.36/trytond/protocols/xmlrpc.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/protocols/xmlrpc.py 2021-09-27 23:49:27.000000000 +0200 @@ -56,6 +56,16 @@ } self.dump_struct(value, write) + +def dump_long(self, value, write): + try: + self.dump_long(value, write) + except OverflowError: + write('<value><biginteger>') + write(str(int(value))) + write('</biginteger></value>\n') + + client.Marshaller.dispatch[Decimal] = dump_decimal client.Marshaller.dispatch[type(None)] = \ lambda self, value, write: write("<value><nil/></value>") @@ -64,6 +74,7 @@ client.Marshaller.dispatch[datetime.timedelta] = dump_timedelta if bytes == str: client.Marshaller.dispatch[bytearray] = dump_bytes +client.Marshaller.dispatch[int] = dump_long def dump_struct(self, value, write, escape=client.escape): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond/tests/test_ir.py new/trytond-5.0.42/trytond/tests/test_ir.py --- old/trytond-5.0.36/trytond/tests/test_ir.py 2019-08-11 19:34:43.000000000 +0200 +++ new/trytond-5.0.42/trytond/tests/test_ir.py 2021-08-30 13:36:37.000000000 +0200 @@ -14,6 +14,58 @@ module = 'ir' @with_transaction() + def test_model_search_name(self): + "Test searching on name of model" + pool = Pool() + Model = pool.get('ir.model') + + record, = Model.search([ + ('name', '=', "Language"), + ('module', '=', 'ir'), + ]) + self.assertEqual(record.name, "Language") + + @with_transaction() + def test_model_search_order(self): + "Test searching and ordering on name of model" + pool = Pool() + Model = pool.get('ir.model') + + records = Model.search([ + ('name', 'in', ["Language", "Module"]), + ('module', '=', 'ir'), + ], + order=[('name', 'ASC')]) + self.assertEqual([r.name for r in records], ["Language", "Module"]) + + @with_transaction() + def test_model_field_search_description(self): + "Test searching on description of model field" + pool = Pool() + ModelField = pool.get('ir.model.field') + + field, = ModelField.search([ + ('field_description', '=', "Name"), + ('model.model', '=', 'ir.lang'), + ('module', '=', 'ir'), + ]) + self.assertEqual(field.field_description, "Name") + + @with_transaction() + def test_model_field_search_order_description(self): + "Test searching and ordering on description of model field" + pool = Pool() + ModelField = pool.get('ir.model.field') + + fields = ModelField.search([ + ('field_description', 'in', ["Name", "Code"]), + ('model.model', '=', 'ir.lang'), + ('module', '=', 'ir'), + ]) + self.assertEqual( + [f.field_description for f in fields], ["Code", "Name"]) + + @with_transaction() def test_sequence_substitutions(self): 'Test Sequence Substitutions' pool = Pool() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-5.0.36/trytond.egg-info/PKG-INFO new/trytond-5.0.42/trytond.egg-info/PKG-INFO --- old/trytond-5.0.36/trytond.egg-info/PKG-INFO 2021-06-17 21:22:28.000000000 +0200 +++ new/trytond-5.0.42/trytond.egg-info/PKG-INFO 2021-12-03 21:43:12.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 5.0.36 +Version: 5.0.42 Summary: Tryton server Home-page: http://www.tryton.org/ Author: Tryton
