Hello community,

here is the log from the commit of package trytond for openSUSE:Factory checked 
in at 2020-02-10 21:53:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond (Old)
 and      /work/SRC/openSUSE:Factory/.trytond.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond"

Mon Feb 10 21:53:08 2020 rev:41 rq:772530 version:5.0.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond/trytond.changes  2020-01-10 
17:51:23.650122593 +0100
+++ /work/SRC/openSUSE:Factory/.trytond.new.26092/trytond.changes       
2020-02-10 21:53:18.930187412 +0100
@@ -1,0 +2,5 @@
+Sun Feb  2 18:40:27 UTC 2020 - Axel Braun <axel.br...@gmx.de>
+
+- Version 5.0.18 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond-5.0.17.tar.gz

New:
----
  trytond-5.0.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trytond.spec ++++++
--- /var/tmp/diff_new_pack.ilZf0L/_old  2020-02-10 21:53:20.390188219 +0100
+++ /var/tmp/diff_new_pack.ilZf0L/_new  2020-02-10 21:53:20.390188219 +0100
@@ -20,7 +20,7 @@
 %define majorver 5.0
 %define base_name tryton
 Name:           trytond
-Version:        %{majorver}.17
+Version:        %{majorver}.18
 Release:        0
 
 Summary:        An Enterprise Resource Planning (ERP) system

++++++ trytond-5.0.17.tar.gz -> trytond-5.0.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/.hgtags new/trytond-5.0.18/.hgtags
--- old/trytond-5.0.17/.hgtags  2019-12-16 23:48:42.000000000 +0100
+++ new/trytond-5.0.18/.hgtags  2020-02-02 16:56:52.000000000 +0100
@@ -36,3 +36,4 @@
 5e88387812d259b30e048f783fb22f75241246ca 5.0.15
 10157c2bfc0f14deb596cef77a90f5aff76a3e5a 5.0.16
 45b6add00a6f037d2a2987050959f0148c3ab5cb 5.0.17
+d5ceda2dfd6a678e19bd88ef072a4b7a118834b5 5.0.18
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/CHANGELOG new/trytond-5.0.18/CHANGELOG
--- old/trytond-5.0.17/CHANGELOG        2019-12-16 23:48:41.000000000 +0100
+++ new/trytond-5.0.18/CHANGELOG        2020-02-02 16:56:52.000000000 +0100
@@ -1,3 +1,6 @@
+Version 5.0.18 - 2020-02-02
+* Bug fixes (see mercurial logs for details)
+
 Version 5.0.17 - 2019-12-16
 * Bug fixes (see mercurial logs for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/COPYRIGHT new/trytond-5.0.18/COPYRIGHT
--- old/trytond-5.0.17/COPYRIGHT        2019-12-16 23:48:41.000000000 +0100
+++ new/trytond-5.0.18/COPYRIGHT        2020-02-02 16:56:51.000000000 +0100
@@ -1,7 +1,7 @@
 Copyright (C) 2004-2008 Tiny SPRL.
-Copyright (C) 2007-2019 Cédric Krier.
+Copyright (C) 2007-2020 Cédric Krier.
 Copyright (C) 2007-2013 Bertrand Chenal.
-Copyright (C) 2008-2019 B2CK SPRL.
+Copyright (C) 2008-2020 B2CK SPRL.
 Copyright (C) 2011 Openlabs Technologies & Consulting (P) Ltd.
 Copyright (C) 2011-2019 Nicolas Évrard.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/PKG-INFO new/trytond-5.0.18/PKG-INFO
--- old/trytond-5.0.17/PKG-INFO 2019-12-16 23:48:43.000000000 +0100
+++ new/trytond-5.0.18/PKG-INFO 2020-02-02 16:56:54.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond
-Version: 5.0.17
+Version: 5.0.18
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
@@ -110,7 +110,7 @@
 Classifier: Topic :: Software Development :: Libraries :: Application 
Frameworks
 Requires-Python: >=3.4
 Provides-Extra: PostgreSQL
-Provides-Extra: html2text
-Provides-Extra: BCrypt
-Provides-Extra: Levenshtein
 Provides-Extra: graphviz
+Provides-Extra: Levenshtein
+Provides-Extra: BCrypt
+Provides-Extra: html2text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/trytond/__init__.py 
new/trytond-5.0.18/trytond/__init__.py
--- old/trytond-5.0.17/trytond/__init__.py      2019-12-02 20:37:55.000000000 
+0100
+++ new/trytond-5.0.18/trytond/__init__.py      2019-12-16 23:49:00.000000000 
+0100
@@ -5,7 +5,7 @@
 import warnings
 from email import charset
 
-__version__ = "5.0.17"
+__version__ = "5.0.18"
 
 os.environ['TZ'] = 'UTC'
 if hasattr(time, 'tzset'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/trytond/model/modelsql.py 
new/trytond-5.0.18/trytond/model/modelsql.py
--- old/trytond-5.0.17/trytond/model/modelsql.py        2019-11-15 
22:44:58.000000000 +0100
+++ new/trytond-5.0.18/trytond/model/modelsql.py        2020-01-22 
22:23:31.000000000 +0100
@@ -1520,6 +1520,8 @@
                                 clause &= Literal(False)
                             clause &= operator(column, value)
                         where |= clause
+                    if isinstance(sql, Exclude) and sql.where:
+                        where &= sql.where
                     cursor.execute(
                         *table.select(table.id, where=where, limit=1))
                     if cursor.fetchone():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/trytond/tests/modelsql.py 
new/trytond-5.0.18/trytond/tests/modelsql.py
--- old/trytond-5.0.17/trytond/tests/modelsql.py        2019-08-11 
19:34:43.000000000 +0200
+++ new/trytond-5.0.18/trytond/tests/modelsql.py        2020-01-22 
22:23:31.000000000 +0100
@@ -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 sql import Literal
 from sql.operators import Equal
 
 from trytond.model import ModelSQL, fields, Check, Unique, Exclude
@@ -93,13 +94,19 @@
     "ModelSQL with exclude constraint"
     __name__ = 'test.modelsql.exclude'
     value = fields.Integer("Value")
+    condition = fields.Boolean("Condition")
+
+    @classmethod
+    def default_condition(cls):
+        return True
 
     @classmethod
     def __setup__(cls):
         super(ModelExclude, cls).__setup__()
         t = cls.__table__()
         cls._sql_constraints = [
-            ('exclude', Exclude(t, (t.value, Equal), where=t.value > 0),
+            ('exclude', Exclude(t, (t.value, Equal),
+                    where=t.condition == Literal(True)),
                 "Value must be unique."),
             ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/trytond/tests/test_modelsql.py 
new/trytond-5.0.18/trytond/tests/test_modelsql.py
--- old/trytond-5.0.17/trytond/tests/test_modelsql.py   2019-11-15 
22:44:58.000000000 +0100
+++ new/trytond-5.0.18/trytond/tests/test_modelsql.py   2020-01-22 
22:23:31.000000000 +0100
@@ -251,7 +251,20 @@
         pool = Pool()
         Model = pool.get('test.modelsql.exclude')
 
-        records = Model.create([{'value': -1}, {'value': -1}])
+        records = Model.create([{'value': 1, 'condition': False}] * 2)
+
+        self.assertEqual(len(records), 2)
+
+    @with_transaction()
+    def test_constraint_exclude_exclusion_mixed(self):
+        "Test exclude constraint exclusion mixed"
+        pool = Pool()
+        Model = pool.get('test.modelsql.exclude')
+
+        records = Model.create([
+                {'value': 1, 'condition': False},
+                {'value': 1, 'condition': True},
+                ])
 
         self.assertEqual(len(records), 2)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-5.0.17/trytond.egg-info/PKG-INFO 
new/trytond-5.0.18/trytond.egg-info/PKG-INFO
--- old/trytond-5.0.17/trytond.egg-info/PKG-INFO        2019-12-16 
23:48:43.000000000 +0100
+++ new/trytond-5.0.18/trytond.egg-info/PKG-INFO        2020-02-02 
16:56:53.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond
-Version: 5.0.17
+Version: 5.0.18
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
@@ -110,7 +110,7 @@
 Classifier: Topic :: Software Development :: Libraries :: Application 
Frameworks
 Requires-Python: >=3.4
 Provides-Extra: PostgreSQL
-Provides-Extra: html2text
-Provides-Extra: BCrypt
-Provides-Extra: Levenshtein
 Provides-Extra: graphviz
+Provides-Extra: Levenshtein
+Provides-Extra: BCrypt
+Provides-Extra: html2text


Reply via email to