Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2025-01-05 15:28:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.1881 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Sun Jan 5 15:28:43 2025 rev:101 rq:1234606 version:6.0.57 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2024-12-02 17:00:04.723581655 +0100 +++ /work/SRC/openSUSE:Factory/.trytond.new.1881/trytond.changes 2025-01-05 15:28:50.315795572 +0100 @@ -1,0 +2,5 @@ +Thu Jan 2 17:35:49 UTC 2025 - Axel Braun <axel.br...@gmx.de> + +- Version 6.0.57 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-6.0.55.tar.gz New: ---- trytond-6.0.57.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.1GdPms/_old 2025-01-05 15:28:51.303836211 +0100 +++ /var/tmp/diff_new_pack.1GdPms/_new 2025-01-05 15:28:51.303836211 +0100 @@ -1,7 +1,7 @@ # # spec file for package trytond # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2015-2024 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties @@ -30,7 +30,7 @@ %endif Name: trytond -Version: %{majorver}.55 +Version: %{majorver}.57 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later ++++++ trytond-6.0.55.tar.gz -> trytond-6.0.57.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/CHANGELOG new/trytond-6.0.57/CHANGELOG --- old/trytond-6.0.55/CHANGELOG 2024-12-01 19:44:22.000000000 +0100 +++ new/trytond-6.0.57/CHANGELOG 2025-01-01 20:28:41.000000000 +0100 @@ -1,4 +1,14 @@ +Version 6.0.57 - 2025-01-01 +--------------------------- +* Bug fixes (see mercurial logs for details) + + +Version 6.0.56 - 2024-12-16 +--------------------------- +* Bug fixes (see mercurial logs for details) + + Version 6.0.55 - 2024-12-01 --------------------------- * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/PKG-INFO new/trytond-6.0.57/PKG-INFO --- old/trytond-6.0.55/PKG-INFO 2024-12-01 19:44:25.633739000 +0100 +++ new/trytond-6.0.57/PKG-INFO 2025-01-01 20:28:45.023151900 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 6.0.55 +Version: 6.0.57 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.55/trytond/__init__.py new/trytond-6.0.57/trytond/__init__.py --- old/trytond-6.0.55/trytond/__init__.py 2024-10-18 12:25:07.000000000 +0200 +++ new/trytond-6.0.57/trytond/__init__.py 2024-12-16 18:57:08.000000000 +0100 @@ -7,7 +7,7 @@ from lxml import etree, objectify -__version__ = "6.0.55" +__version__ = "6.0.57" os.environ['TZ'] = 'UTC' if hasattr(time, 'tzset'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond/model/modelsql.py new/trytond-6.0.57/trytond/model/modelsql.py --- old/trytond-6.0.55/trytond/model/modelsql.py 2024-10-14 23:57:17.000000000 +0200 +++ new/trytond-6.0.57/trytond/model/modelsql.py 2024-12-14 22:00:14.000000000 +0100 @@ -352,7 +352,7 @@ field = cls._fields[field_name] # Check required fields if (field.required - and field.sql_type() + and not hasattr(field, 'set') and field_name not in ('create_uid', 'create_date')): if values.get(field_name) is None: raise RequiredValidationError( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond/model/modelview.py new/trytond-6.0.57/trytond/model/modelview.py --- old/trytond-6.0.55/trytond/model/modelview.py 2023-10-24 00:14:46.000000000 +0200 +++ new/trytond-6.0.57/trytond/model/modelview.py 2024-12-30 19:41:38.000000000 +0100 @@ -179,6 +179,18 @@ meth_names = list(methods['depend_methods'][function_name]) meth_done = set() + + for depend in getattr(field, attribute): + if '.' in depend: + depend, _ = depend.split('.', 1) + if depend.startswith('_parent_'): + depend = depend[len('_parent_'):] + dep_field = getattr(cls, depend, None) + if dep_field: + if (isinstance(dep_field, fields.Function) + and dep_field.getter.startswith('on_change_with')): + meth_names.append(dep_field.getter) + while meth_names: meth_name = meth_names.pop() method = getattr(cls, meth_name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond/tests/field_binary.py new/trytond-6.0.57/trytond/tests/field_binary.py --- old/trytond-6.0.55/trytond/tests/field_binary.py 2022-12-19 13:03:39.000000000 +0100 +++ new/trytond-6.0.57/trytond/tests/field_binary.py 2024-12-14 22:00:14.000000000 +0100 @@ -1,7 +1,7 @@ # 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 trytond.model import ModelSQL, fields +from trytond.model import Check, ModelSQL, fields from trytond.pool import Pool @@ -27,6 +27,21 @@ binary = fields.Binary('Binary Required', required=True) +class BinaryRequiredSQLConstraint(ModelSQL): + "Binary Required SQL Constraint" + __name__ = 'test.binary_required_sql_constraint' + binary = fields.Binary('Binary Required', required=True) + constraint = fields.Boolean("Constraint") + + @classmethod + def __setup__(cls): + super().__setup__() + t = cls.__table__() + cls._sql_constraints.append( + ('constraint', Check(t, t.constraint), + 'tests.msg_binary_required_sql_constraint')) + + class BinaryFileStorage(ModelSQL): "Binary in FileStorage" __name__ = 'test.binary_filestorage' @@ -39,5 +54,6 @@ Binary, BinaryDefault, BinaryRequired, + BinaryRequiredSQLConstraint, BinaryFileStorage, module=module, type_='model') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond/tests/message.xml new/trytond-6.0.57/trytond/tests/message.xml --- old/trytond-6.0.55/trytond/tests/message.xml 2022-12-19 13:03:39.000000000 +0100 +++ new/trytond-6.0.57/trytond/tests/message.xml 2024-12-14 22:00:14.000000000 +0100 @@ -6,5 +6,8 @@ <record model="ir.message" id="msg_test"> <field name="text">Message</field> </record> + <record model="ir.message" id="msg_binary_required_sql_constraint"> + <field name="text">Constraint must be checked.</field> + </record> </data> </tryton> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond/tests/test_field_binary.py new/trytond-6.0.57/trytond/tests/test_field_binary.py --- old/trytond-6.0.55/trytond/tests/test_field_binary.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.57/trytond/tests/test_field_binary.py 2024-12-14 22:00:14.000000000 +0100 @@ -7,7 +7,8 @@ from sql import Literal from trytond.config import config -from trytond.model.exceptions import RequiredValidationError +from trytond.model.exceptions import ( + RequiredValidationError, SQLConstraintError) from trytond.model import fields from trytond.pool import Pool from trytond.tests.test_tryton import activate_module, with_transaction @@ -89,6 +90,22 @@ }]) @with_transaction() + def test_create_required_with_invalid_sql_constraint(self): + "Test create required binary with invalid SQL constraint" + Binary = Pool().get('test.binary_required_sql_constraint') + + binary, = Binary.create([{ + 'binary': cast(b'foo'), + 'constraint': True, + }]) + + with self.assertRaises(SQLConstraintError): + binary, = Binary.create([{ + 'binary': cast(b'foo'), + 'constraint': False, + }]) + + @with_transaction() def test_create_filestorage(self): "Test create binary with filestorage" Binary = Pool().get('test.binary_filestorage') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond/tests/test_field_depends.py new/trytond-6.0.57/trytond/tests/test_field_depends.py --- old/trytond-6.0.55/trytond/tests/test_field_depends.py 2023-05-17 23:03:30.000000000 +0200 +++ new/trytond-6.0.57/trytond/tests/test_field_depends.py 2024-12-30 18:43:56.000000000 +0100 @@ -248,6 +248,29 @@ self.assertEqual(Model.bar.on_change, {'foo', 'bar'}) + def test_depends_function_getter(self): + "Tests depends on Function field with on_change_with getter" + + class Model(ModelView): + __name__ = 'test.modelview.function_getter_depends' + + test = fields.Char("Test") + foo = fields.Function(fields.Char("Foo"), 'on_change_with_foo') + bar = fields.Char("Bar") + + @fields.depends('foo') + def on_change_test(self): + pass + + @fields.depends('bar') + def on_change_with_foo(self, name=None): + pass + + Model.__setup__() + Model.__post_setup__() + + self.assertEqual(Model.test.on_change, {'foo', 'bar'}) + def suite(): return unittest.TestLoader().loadTestsFromTestCase(FieldDependsTestCase) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-6.0.55/trytond.egg-info/PKG-INFO new/trytond-6.0.57/trytond.egg-info/PKG-INFO --- old/trytond-6.0.55/trytond.egg-info/PKG-INFO 2024-12-01 19:44:24.000000000 +0100 +++ new/trytond-6.0.57/trytond.egg-info/PKG-INFO 2025-01-01 20:28:44.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: trytond -Version: 6.0.55 +Version: 6.0.57 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/6.0/