Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package trytond for openSUSE:Factory checked in at 2026-11-18 18:31:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trytond (Old) and /work/SRC/openSUSE:Factory/.trytond.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trytond" Wed Nov 18 18:31:49 2026 rev:121 rq:1398361 version:7.0.61 Changes: -------- --- /work/SRC/openSUSE:Factory/trytond/trytond.changes 2026-10-07 19:32:59.405604904 +0200 +++ /work/SRC/openSUSE:Factory/.trytond.new.1251/trytond.changes 2026-11-18 18:33:19.223349015 +0100 @@ -1,0 +2,5 @@ +Wed Nov 18 10:17:42 UTC 2026 - Axel Braun <[email protected]> + +- Version 7.0.61 - Bugfix Release + +------------------------------------------------------------------- Old: ---- trytond-7.0.58.tar.gz New: ---- trytond-7.0.61.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trytond.spec ++++++ --- /var/tmp/diff_new_pack.Isi73X/_old 2026-11-18 18:33:20.398399001 +0100 +++ /var/tmp/diff_new_pack.Isi73X/_new 2026-11-18 18:33:20.400399086 +0100 @@ -30,7 +30,7 @@ ##%%endif Name: trytond -Version: %{majorver}.58 +Version: %{majorver}.61 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later ++++++ trytond-7.0.58.tar.gz -> trytond-7.0.61.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/CHANGELOG new/trytond-7.0.61/CHANGELOG --- old/trytond-7.0.58/CHANGELOG 2026-10-02 00:32:12.674301100 +0200 +++ new/trytond-7.0.61/CHANGELOG 2026-11-06 14:43:52.713014000 +0100 @@ -1,4 +1,21 @@ +Version 7.0.61 - 2026-11-06 +--------------------------- +* Bug fixes (see mercurial logs for details) + + +Version 7.0.60 - 2026-11-05 +--------------------------- +* Bug fixes (see mercurial logs for details) +* Restrict the wizard session to the user who created it (issue15206) +* Do not permit to execute wizards without models or groups (issue15205) +* Only permit administrators to execute wizards without models or groups (issue15205) + +Version 7.0.59 - 2026-10-15 +--------------------------- +* Bug fixes (see mercurial logs for details) + + Version 7.0.58 - 2026-10-01 --------------------------- * Bug fixes (see mercurial logs for details) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/PKG-INFO new/trytond-7.0.61/PKG-INFO --- old/trytond-7.0.58/PKG-INFO 2026-10-02 00:32:19.143636500 +0200 +++ new/trytond-7.0.61/PKG-INFO 2026-11-06 14:43:56.267653200 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: trytond -Version: 7.0.58 +Version: 7.0.61 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/7.0/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/__init__.py new/trytond-7.0.61/trytond/__init__.py --- old/trytond-7.0.58/trytond/__init__.py 2026-09-16 23:05:28.798376800 +0200 +++ new/trytond-7.0.61/trytond/__init__.py 2026-11-05 22:42:43.469837700 +0100 @@ -12,7 +12,7 @@ from ._safe_genshi import genshi_patch -__version__ = "7.0.58" +__version__ = "7.0.61" if not os.environ.get('TRYTOND_APPNAME'): os.environ['TRYTOND_APPNAME'] = os.path.basename( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/config.py new/trytond-7.0.61/trytond/config.py --- old/trytond-7.0.58/trytond/config.py 2025-09-22 21:34:39.564855800 +0200 +++ new/trytond-7.0.61/trytond/config.py 2026-10-14 22:42:42.044385700 +0200 @@ -94,7 +94,7 @@ self.add_section('bus') self.set('bus', 'allow_subscribe', 'False') self.set('bus', 'long_polling_timeout', str(5 * 60)) - self.set('bus', 'cache_timeout', '5') + self.set('bus', 'cache_timeout', str(5 * 60)) self.set('bus', 'select_timeout', '5') self.add_section('html') self.update_environ() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/ir/action.py new/trytond-7.0.61/trytond/ir/action.py --- old/trytond-7.0.58/trytond/ir/action.py 2026-07-30 23:56:51.325473300 +0200 +++ new/trytond-7.0.61/trytond/ir/action.py 2026-10-14 21:46:08.012060400 +0200 @@ -319,7 +319,11 @@ action = fields.Many2One( 'ir.action', "Action", - required=True, readonly=True, ondelete='CASCADE') + required=True, ondelete='CASCADE', + states={ + 'required': Eval('id', -1) >= 0, + 'readonly': Eval('id', -1) >= 0, + }) @classmethod def __setup__(cls): @@ -399,8 +403,9 @@ values = values.copy() for field in values: if field in Action._fields: - action_values[field] = values[field] - if hasattr(getattr(cls, field), 'set'): + if field != 'action': + action_values[field] = values[field] + elif hasattr(getattr(cls, field), 'set'): later[field] = values[field] for field in later: del values[field] @@ -411,7 +416,7 @@ if database.nextid(transaction.connection, cls._table): database.setnextid(transaction.connection, cls._table, database.currid(transaction.connection, Action._table)) - if 'action' not in values: + if not values.get('action'): action, = Action.create([action_values]) values['action'] = action.id else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/tests/test_tools.py new/trytond-7.0.61/trytond/tests/test_tools.py --- old/trytond-7.0.58/trytond/tests/test_tools.py 2026-09-30 08:48:27.360700600 +0200 +++ new/trytond-7.0.61/trytond/tests/test_tools.py 2026-10-14 22:42:41.931147600 +0200 @@ -7,6 +7,7 @@ import sys import unittest from copy import deepcopy +from decimal import Decimal from io import BytesIO import sql @@ -874,6 +875,63 @@ unique_value(domain, single_value=False), (False, None, None)) def test_evaldomain(self): + + domain = [['x', '=', 42]] + self.assertTrue(eval_domain(domain, {'x': 42})) + self.assertTrue(eval_domain(domain, {'x': Decimal('42')})) + self.assertFalse(eval_domain(domain, {'x': 0})) + self.assertFalse(eval_domain(domain, {'x': Decimal('0')})) + self.assertFalse(eval_domain(domain, {'x': None})) + + domain = [['x', '=', Decimal('42')]] + self.assertTrue(eval_domain(domain, {'x': 42})) + self.assertTrue(eval_domain(domain, {'x': Decimal('42')})) + self.assertFalse(eval_domain(domain, {'x': 0})) + self.assertFalse(eval_domain(domain, {'x': Decimal('0')})) + self.assertFalse(eval_domain(domain, {'x': None})) + + domain = [['x', '=', 0]] + self.assertTrue(eval_domain(domain, {'x': 0})) + self.assertTrue(eval_domain(domain, {'x': Decimal('0')})) + self.assertFalse(eval_domain(domain, {'x': None})) + + domain = [['x', '=', Decimal('0')]] + self.assertTrue(eval_domain(domain, {'x': 0})) + self.assertTrue(eval_domain(domain, {'x': Decimal('0')})) + self.assertFalse(eval_domain(domain, {'x': None})) + + domain = [['x', '=', None]] + self.assertFalse(eval_domain(domain, {'x': 0})) + self.assertFalse(eval_domain(domain, {'x': Decimal('0')})) + self.assertTrue(eval_domain(domain, {'x': None})) + + domain = [['x', '!=', 42]] + self.assertFalse(eval_domain(domain, {'x': 42})) + self.assertFalse(eval_domain(domain, {'x': Decimal('42')})) + self.assertTrue(eval_domain(domain, {'x': Decimal('0')})) + self.assertTrue(eval_domain(domain, {'x': None})) + + domain = [['x', '!=', Decimal('42')]] + self.assertFalse(eval_domain(domain, {'x': 42})) + self.assertFalse(eval_domain(domain, {'x': Decimal('42')})) + self.assertTrue(eval_domain(domain, {'x': Decimal('0')})) + self.assertTrue(eval_domain(domain, {'x': None})) + + domain = [['x', '!=', 0]] + self.assertFalse(eval_domain(domain, {'x': 0})) + self.assertFalse(eval_domain(domain, {'x': Decimal('0')})) + self.assertTrue(eval_domain(domain, {'x': None})) + + domain = [['x', '!=', Decimal('0')]] + self.assertFalse(eval_domain(domain, {'x': 0})) + self.assertFalse(eval_domain(domain, {'x': Decimal('0')})) + self.assertTrue(eval_domain(domain, {'x': None})) + + domain = [['x', '!=', None]] + self.assertTrue(eval_domain(domain, {'x': 0})) + self.assertTrue(eval_domain(domain, {'x': Decimal('0')})) + self.assertFalse(eval_domain(domain, {'x': None})) + domain = [['x', '>', 5]] self.assertTrue(eval_domain(domain, {'x': 6})) self.assertFalse(eval_domain(domain, {'x': 4})) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/tests/test_wizard.py new/trytond-7.0.61/trytond/tests/test_wizard.py --- old/trytond-7.0.58/trytond/tests/test_wizard.py 2025-09-22 21:34:39.614856200 +0200 +++ new/trytond-7.0.61/trytond/tests/test_wizard.py 2026-11-06 12:47:00.452412400 +0100 @@ -35,6 +35,22 @@ Wizard.delete(session_id) @with_transaction() + def test_delete_different_user(self): + "Delete session from a different user" + pool = Pool() + Wizard = pool.get('test.test_wizard', type='wizard') + User = pool.get('res.user') + + user = User(login='foo') + user.save() + + session_id, _, _ = Wizard.create() + + with Transaction().set_user(user.id): + with self.assertRaises(AccessError): + Wizard.delete(session_id) + + @with_transaction() def test_session(self): 'Session Wizard' pool = Pool() @@ -73,6 +89,22 @@ self.assertEqual(group_b.name, 'Group B') @with_transaction() + def test_session_different_user(self): + "Use session from a different user" + pool = Pool() + Wizard = pool.get('test.test_wizard', type='wizard') + User = pool.get('res.user') + + user = User(login='foo') + user.save() + + session_id, _, _ = Wizard.create() + + with Transaction().set_user(user.id): + with self.assertRaises(AccessError): + Wizard(session_id) + + @with_transaction() def test_execute(self): 'Execute Wizard' pool = Pool() @@ -145,10 +177,55 @@ "Execute wizard on wrong model" pool = Pool() Wizard = pool.get('test.test_wizard', type='wizard') + User = pool.get('res.user') + user = User(login='foo') + user.save() session_id, start_state, end_state = Wizard.create() - with self.assertRaises(AccessError): - with Transaction().set_context( - active_model='test.test_wizard.start'): + with Transaction().set_user(user.id): + with self.assertRaises(AccessError): + with Transaction().set_context( + active_model='test.test_wizard.start'): + Wizard.execute(session_id, {}, start_state) + + @with_transaction(context={'_check_access': True}) + def test_execute_without_model(self): + "Execute wizard without model" + pool = Pool() + Wizard = pool.get('test.test_wizard_no_model', type='wizard') + User = pool.get('res.user') + + user = User(login='foo') + user.save() + session_id, start_state, end_state = Wizard.create() + + with Transaction().set_user(user.id): + with self.assertRaises(AccessError): + Wizard.execute(session_id, {}, start_state) + + @with_transaction(context={'_check_access': True}) + def test_execute_without_model_with_group(self): + "Execute wizard without model and groups" + pool = Pool() + Wizard = pool.get('test.test_wizard_no_model', type='wizard') + User = pool.get('res.user') + Group = pool.get('res.group') + + user = User(login='foo', groups=[Group(name="Group")]) + user.save() + session_id, start_state, end_state = Wizard.create() + + with Transaction().set_user(user.id): + with self.assertRaises(AccessError): Wizard.execute(session_id, {}, start_state) + + @with_transaction(context={'_check_access': True}) + def test_execute_without_model_with_admin(self): + "Execute wizard without model" + pool = Pool() + Wizard = pool.get('test.test_wizard_no_model', type='wizard') + + session_id, start_state, end_state = Wizard.create() + + Wizard.execute(session_id, {}, start_state) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/tests/wizard.py new/trytond-7.0.61/trytond/tests/wizard.py --- old/trytond-7.0.58/trytond/tests/wizard.py 2025-09-22 21:34:39.614856200 +0200 +++ new/trytond-7.0.61/trytond/tests/wizard.py 2026-11-05 17:33:32.475073800 +0100 @@ -49,10 +49,15 @@ return 'end' +class TestWizardNoModel(TestWizard): + __name__ = 'test.test_wizard_no_model' + + def register(module): Pool.register( TestWizardStart, module=module, type_='model') Pool.register( TestWizard, + TestWizardNoModel, module=module, type_='wizard') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/tests/wizard.xml new/trytond-7.0.61/trytond/tests/wizard.xml --- old/trytond-7.0.58/trytond/tests/wizard.xml 2023-10-30 18:06:39.142131300 +0100 +++ new/trytond-7.0.61/trytond/tests/wizard.xml 2026-11-05 17:33:32.463061300 +0100 @@ -21,5 +21,11 @@ <field name="wiz_name">test.test_wizard</field> <field name="model">test.access</field> </record> + + <record model="ir.action.wizard" id="test_wizard_no_model"> + <field name="name">Test Wizard</field> + <field name="wiz_name">test.test_wizard_no_model</field> + <field name="model" eval="None"/> + </record> </data> </tryton> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond/wizard/wizard.py new/trytond-7.0.61/trytond/wizard/wizard.py --- old/trytond-7.0.58/trytond/wizard/wizard.py 2025-09-22 21:34:39.614856200 +0200 +++ new/trytond-7.0.61/trytond/wizard/wizard.py 2026-11-06 12:47:00.455766400 +0100 @@ -251,11 +251,16 @@ ModelAccess = pool.get('ir.model.access') ActionWizard = pool.get('ir.action.wizard') User = pool.get('res.user') + ModelData = pool.get('ir.model.data') context = Transaction().context if Transaction().user == 0: return + admin_group = ModelData.get_id('res.group_admin') + groups = set(User.get_groups()) + is_admin = admin_group in groups + with check_access(): model = context.get('active_model') if model: @@ -264,12 +269,11 @@ ModelAccess.check(model, 'read') models = ActionWizard.get_models( cls.__name__, action_id=context.get('action_id')) - if model and models and model not in models: + if not is_admin and models and (not model or model not in models): raise AccessError(gettext( 'ir.msg_access_wizard_model_error', wizard=cls.__name__, model=model)) - groups = set(User.get_groups()) wizard_groups = ActionWizard.get_groups(cls.__name__, action_id=context.get('action_id')) if wizard_groups: @@ -282,6 +286,12 @@ or Model.write.__func__ != ModelSQL.write.__func__): ModelAccess.check(model, 'write') + if not is_admin and not models and not wizard_groups: + raise AccessError( + gettext( + 'ir.msg_access_wizard_error', + wizard=cls.__name__)) + if model: ids = context.get('active_ids') or [] id_ = context.get('active_id') @@ -294,20 +304,25 @@ def create(cls): "Create a session" Session = Pool().get('ir.session.wizard') - cls.check_access() return (Session.create([{}])[0].id, cls.start_state, cls.end_state) @classmethod def delete(cls, session_id): "Delete the session" - Session = Pool().get('ir.session.wizard') + pool = Pool() + Session = pool.get('ir.session.wizard') + transaction = Transaction() + session = Session(session_id) + if session.create_uid.id != transaction.user: + raise AccessError( + gettext('ir.msg_access_wizard_error', wizard=cls.__name__)) end = getattr(cls, cls.end_state, None) if end: wizard = cls(session_id) action = end(wizard) else: action = None - Session.delete([Session(session_id)]) + Session.delete([session]) return action @classmethod @@ -385,8 +400,12 @@ def __init__(self, session_id): pool = Pool() Session = pool.get('ir.session.wizard') - self._session_id = session_id + transaction = Transaction() session = Session(session_id) + if session.create_uid.id != transaction.user: + raise AccessError( + gettext('ir.msg_access_wizard_error', wizard=self.__name__)) + self._session_id = session.id data = json.loads(session.data, object_hook=JSONDecoder()) for state_name, state in self.states.items(): if isinstance(state, StateView): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trytond-7.0.58/trytond.egg-info/PKG-INFO new/trytond-7.0.61/trytond.egg-info/PKG-INFO --- old/trytond-7.0.58/trytond.egg-info/PKG-INFO 2026-10-02 00:32:17.802080400 +0200 +++ new/trytond-7.0.61/trytond.egg-info/PKG-INFO 2026-11-06 14:43:55.485780200 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: trytond -Version: 7.0.58 +Version: 7.0.61 Summary: Tryton server Home-page: http://www.tryton.org/ Download-URL: http://downloads.tryton.org/7.0/
