Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2023-08-02 16:49:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.22712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Wed Aug 2 16:49:02 2023 rev:84 rq:1101630 version:6.0.34 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2023-06-29 17:29:40.458732381 +0200 +++ /work/SRC/openSUSE:Factory/.trytond.new.22712/trytond.changes 2023-08-02 16:50:37.933567576 +0200 @@ -1,0 +2,5 @@ +Mon Jul 31 18:32:35 UTC 2023 - Axel Braun <axel.br...@gmx.de> + +- Version 6.0.34 - Security Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-6.0.33.tar.gz trytond-6.0.33.tar.gz.asc New: ---- trytond-6.0.34.tar.gz trytond-6.0.34.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.sw6hOo/_old 2023-08-02 16:50:38.825572965 +0200 +++ /var/tmp/diff_new_pack.sw6hOo/_new 2023-08-02 16:50:38.829572990 +0200 @@ -20,7 +20,7 @@ %define majorver 6.0 %define base_name tryton Name: trytond -Version: %{majorver}.33 +Version: %{majorver}.34 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later ++++++ trytond-6.0.33.tar.gz -> trytond-6.0.34.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/CHANGELOG new/trytond-6.0.34/CHANGELOG --- old/trytond-6.0.33/CHANGELOG 2023-06-21 19:11:15.000000000 +0200 +++ new/trytond-6.0.34/CHANGELOG 2023-07-31 17:07:58.000000000 +0200 @@ -1,4 +1,9 @@ +Version 6.0.34 - 2023-07-31 +--------------------------- +* Bug fixes (see mercurial logs for details) +* Enforce record rules when reading only non SQL fields (#12428) + Version 6.0.33 - 2023-06-21 --------------------------- * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/PKG-INFO new/trytond-6.0.34/PKG-INFO --- old/trytond-6.0.33/PKG-INFO 2023-06-21 19:11:19.017953400 +0200 +++ new/trytond-6.0.34/PKG-INFO 2023-07-31 17:08:02.204558800 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 6.0.33 +Version: 6.0.34 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/doc/ref/models/models.rst new/trytond-6.0.34/doc/ref/models/models.rst --- old/trytond-6.0.33/doc/ref/models/models.rst 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/doc/ref/models/models.rst 2023-07-22 23:25:00.000000000 +0200 @@ -92,15 +92,6 @@ Instance methods: -.. method:: Model.on_change(fieldnames) - - Returns the list of changes by calling ``on_change`` method of each field. - -.. method:: Model.on_change_with(fieldnames) - - Returns the new values of all fields by calling ``on_change_with`` method of - each field. - .. method:: Model.pre_validate() This method is called by the client to validate the instance. @@ -193,6 +184,17 @@ This method is public mainly to allow modification the existing XML of the view by code. +Instance methods + +.. method:: Model.on_change(fieldnames) + + Returns the list of changes by calling ``on_change`` method of each field. + +.. method:: Model.on_change_with(fieldnames) + + Returns the new values of all fields by calling ``on_change_with`` method of + each field. + ============ ModelStorage ============ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/__init__.py new/trytond-6.0.34/trytond/__init__.py --- old/trytond-6.0.33/trytond/__init__.py 2023-05-17 23:04:52.000000000 +0200 +++ new/trytond-6.0.34/trytond/__init__.py 2023-06-21 19:11:32.000000000 +0200 @@ -7,7 +7,7 @@ from lxml import etree, objectify -__version__ = "6.0.33" +__version__ = "6.0.34" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/i18n.py new/trytond-6.0.34/trytond/i18n.py --- old/trytond-6.0.33/trytond/i18n.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/i18n.py 2023-07-22 23:35:23.000000000 +0200 @@ -24,7 +24,7 @@ return message_id try: return Message.gettext(module, id_, language, **variables) - except KeyError: + except (KeyError, ValueError): return message_id diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/model/dictschema.py new/trytond-6.0.34/trytond/model/dictschema.py --- old/trytond-6.0.33/trytond/model/dictschema.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/model/dictschema.py 2023-07-03 23:08:41.000000000 +0200 @@ -69,7 +69,7 @@ 'invisible': ~Eval('type_').in_(['selection', 'multiselection']), }, depends=['type_'], - help=lazy_gettext('is.msg_dict_schema_help_selection_help')) + help=lazy_gettext('ir.msg_dict_schema_help_selection_help')) selection_json = fields.Function(fields.Char( lazy_gettext('ir.msg_dict_schema_selection_json'), states={ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/model/modelsql.py new/trytond-6.0.34/trytond/model/modelsql.py --- old/trytond-6.0.33/trytond/model/modelsql.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/model/modelsql.py 2023-07-31 15:26:48.000000000 +0200 @@ -768,7 +768,7 @@ Coalesce(table.write_date, table.create_date) ).cast(sql_type).as_('_timestamp')) - if len(columns): + if len(columns) or domain: if 'id' not in fields_names: columns.append(table.id.as_('id')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/model/modelstorage.py new/trytond-6.0.34/trytond/model/modelstorage.py --- old/trytond-6.0.33/trytond/model/modelstorage.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/model/modelstorage.py 2023-07-22 23:17:28.000000000 +0200 @@ -668,10 +668,11 @@ child_lines = ModelStorage.__export_row(child_record, child_fields_names) if first: - for child_fpos in range(len(fields_names)): - if child_lines and child_lines[0][child_fpos]: - data[child_fpos] = \ - child_lines[0][child_fpos] + if child_lines: + for child_fpos in range(len(fields_names)): + if child_fields_names[child_fpos]: + data[child_fpos] = ( + child_lines[0][child_fpos]) lines += child_lines[1:] first = False else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/modules/__init__.py new/trytond-6.0.34/trytond/modules/__init__.py --- old/trytond-6.0.33/trytond/modules/__init__.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/modules/__init__.py 2023-07-22 23:29:18.000000000 +0200 @@ -271,11 +271,14 @@ ])) module2state[module] = 'activated' - # Clear cache from old data cached before transaction started - Cache.clear_all() - # Avoid clearing cache to prevent dead lock on ir.cache table + # Rollback cache changes to prevent dead lock on ir.cache table Cache.rollback(transaction) transaction.commit() + # Clear the cache so that the transaction has an empty cache + # from now on. The cache is not empty because the rollback might + # have filled it with old data from before the transaction + # started. + Cache.clear_all() # Clear transaction cache to update default_factory transaction.cache.clear() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/tests/export_data.py new/trytond-6.0.34/trytond/tests/export_data.py --- old/trytond-6.0.33/trytond/tests/export_data.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/tests/export_data.py 2023-07-22 23:17:28.000000000 +0200 @@ -9,6 +9,7 @@ "Export Data Target" __name__ = 'test.export_data.target' name = fields.Char('Name') + value = fields.Float("Value") class ExportData(ModelSQL): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/tests/test_exportdata.py new/trytond-6.0.34/trytond/tests/test_exportdata.py --- old/trytond-6.0.33/trytond/tests/test_exportdata.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/tests/test_exportdata.py 2023-07-22 23:17:28.000000000 +0200 @@ -354,6 +354,26 @@ [[export1.id, 'Target 1'], ['', 'Target 2'], [export2.id, '']]) @with_transaction() + def test_one2many_empty_value(self): + "Test export_data one2many with first child with 0 value" + pool = Pool() + ExportData = pool.get('test.export_data') + ExportDataTarget = pool.get('test.export_data.target') + + export, = ExportData.create([{}]) + ExportDataTarget.create([{ + 'value': 0, + 'one2many': export.id, + }, { + 'value': 42, + 'one2many': export.id, + }]) + + self.assertEqual( + ExportData.export_data([export], ['id', 'one2many/value']), + [[export.id, 0], ['', 42]]) + + @with_transaction() def test_reference(self): 'Test export_data reference' pool = Pool() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/tests/test_rule.py new/trytond-6.0.34/trytond/tests/test_rule.py --- old/trytond-6.0.33/trytond/tests/test_rule.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/tests/test_rule.py 2023-07-31 15:26:09.000000000 +0200 @@ -320,6 +320,33 @@ TestRule.read([test.id], ['field']) @with_transaction(context=_context) + def test_perm_read_with_rule_no_sql_type_fail(self): + "Test read with rule fail and without SQL type" + pool = Pool() + TestRule = pool.get('test.rule') + RuleGroup = pool.get('ir.rule.group') + Model = pool.get('ir.model') + + model, = Model.search([('model', '=', 'test.rule')]) + rule_group, = RuleGroup.create([{ + 'name': "Field different from foo", + 'model': model.id, + 'global_p': True, + 'perm_read': True, + 'perm_create': False, + 'perm_write': False, + 'perm_delete': False, + 'rules': [('create', [{ + 'domain': json.dumps( + [('field', '!=', 'foo')]), + }])], + }]) + test, = TestRule.create([{'field': 'foo'}]) + + with self.assertRaisesRegex(AccessError, "Field different from foo"): + TestRule.read([test.id], ['rec_name']) + + @with_transaction(context=_context) def test_search_without_rule(self): "Test search without rule" pool = Pool() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond/tests/test_tryton.py new/trytond-6.0.34/trytond/tests/test_tryton.py --- old/trytond-6.0.33/trytond/tests/test_tryton.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.34/trytond/tests/test_tryton.py 2023-07-10 23:32:40.000000000 +0200 @@ -663,6 +663,8 @@ 'field': field_name, 'model': model.__name__, }) + if field._type == 'multiselection': + self.assertNotIn(None, dict(selection_values).keys()) @with_transaction() def test_function_fields(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.33/trytond.egg-info/PKG-INFO new/trytond-6.0.34/trytond.egg-info/PKG-INFO --- old/trytond-6.0.33/trytond.egg-info/PKG-INFO 2023-06-21 19:11:18.000000000 +0200 +++ new/trytond-6.0.34/trytond.egg-info/PKG-INFO 2023-07-31 17:08:01.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 6.0.33 +Version: 6.0.34 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/