Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package trytond for openSUSE:Factory checked 
in at 2024-08-05 17:21:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond (Old)
 and      /work/SRC/openSUSE:Factory/.trytond.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond"

Mon Aug  5 17:21:25 2024 rev:97 rq:1191469 version:6.0.50

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond/trytond.changes  2024-07-02 
18:19:18.901710130 +0200
+++ /work/SRC/openSUSE:Factory/.trytond.new.7232/trytond.changes        
2024-08-05 17:21:53.060621406 +0200
@@ -1,0 +2,5 @@
+Sat Aug  3 08:11:37 UTC 2024 - Axel Braun <[email protected]>
+
+- Version 6.0.50 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond-6.0.48.tar.gz

New:
----
  trytond-6.0.50.tar.gz

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

Other differences:
------------------
++++++ trytond.spec ++++++
--- /var/tmp/diff_new_pack.3BZrSB/_old  2024-08-05 17:21:54.400676312 +0200
+++ /var/tmp/diff_new_pack.3BZrSB/_new  2024-08-05 17:21:54.400676312 +0200
@@ -30,7 +30,7 @@
 %endif
 
 Name:           trytond
-Version:        %{majorver}.48
+Version:        %{majorver}.50
 Release:        0
 Summary:        An Enterprise Resource Planning (ERP) system
 License:        GPL-3.0-or-later

++++++ trytond-6.0.48.tar.gz -> trytond-6.0.50.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/CHANGELOG new/trytond-6.0.50/CHANGELOG
--- old/trytond-6.0.48/CHANGELOG        2024-06-15 11:03:37.000000000 +0200
+++ new/trytond-6.0.50/CHANGELOG        2024-08-01 21:32:46.000000000 +0200
@@ -1,4 +1,14 @@
 
+Version 6.0.50 - 2024-08-01
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
+Version 6.0.49 - 2024-07-17
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
 Version 6.0.48 - 2024-06-15
 ---------------------------
 * Bug fixes (see mercurial logs for details)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/PKG-INFO new/trytond-6.0.50/PKG-INFO
--- old/trytond-6.0.48/PKG-INFO 2024-06-15 11:03:40.697573000 +0200
+++ new/trytond-6.0.50/PKG-INFO 2024-08-01 21:32:48.735759000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond
-Version: 6.0.48
+Version: 6.0.50
 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.48/trytond/__init__.py 
new/trytond-6.0.50/trytond/__init__.py
--- old/trytond-6.0.48/trytond/__init__.py      2024-06-02 17:58:05.000000000 
+0200
+++ new/trytond-6.0.50/trytond/__init__.py      2024-07-17 23:37:34.000000000 
+0200
@@ -7,7 +7,7 @@
 
 from lxml import etree, objectify
 
-__version__ = "6.0.48"
+__version__ = "6.0.50"
 
 os.environ['TZ'] = 'UTC'
 if hasattr(time, 'tzset'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/trytond/model/fields/dict.py 
new/trytond-6.0.50/trytond/model/fields/dict.py
--- old/trytond-6.0.48/trytond/model/fields/dict.py     2023-10-18 
16:20:58.000000000 +0200
+++ new/trytond-6.0.50/trytond/model/fields/dict.py     2024-07-25 
18:31:43.000000000 +0200
@@ -72,6 +72,8 @@
                 if v is None:
                     continue
                 if self.schema_model and isinstance(v, (list, tuple)):
+                    if not v:
+                        continue
                     v = list(sorted(set(v)))
                 d[k] = v
             value = dumps(d)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/trytond/model/fields/numeric.py 
new/trytond-6.0.50/trytond/model/fields/numeric.py
--- old/trytond-6.0.48/trytond/model/fields/numeric.py  2023-05-17 
23:03:30.000000000 +0200
+++ new/trytond-6.0.50/trytond/model/fields/numeric.py  2024-07-14 
10:31:43.000000000 +0200
@@ -1,17 +1,11 @@
 # 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 decimal import Decimal
-from sql import Cast, Literal, Select, CombiningQuery, As
+from sql import Cast, Literal, Select, CombiningQuery
 
 from trytond import backend
-from .float import Float
-
 
-class SQLite_Cast(Cast):
-
-    def as_(self, output_name):
-        # Use PARSE_COLNAMES instead of CAST for final column
-        return As(self.expression, '%s [NUMERIC]' % output_name)
+from .float import Float
 
 
 class Numeric(Float):
@@ -22,18 +16,23 @@
     _sql_type = 'NUMERIC'
     _py_type = Decimal
 
-    def sql_column(self, table):
-        column = super(Numeric, self).sql_column(table)
-        db_type = backend.name
-        if db_type == 'sqlite':
+    def convert_order(self, name, tables, Model):
+        columns = super().convert_order(name, tables, Model)
+        if backend.name == 'sqlite':
+            # Must be cast because Decimal is stored as bytes
+            columns = [Cast(c, self.sql_type().base) for c in columns]
+        return columns
+
+    def _domain_column(self, operator, column):
+        column = super()._domain_column(operator, column)
+        if backend.name == 'sqlite':
             # Must be casted as Decimal is stored as bytes
-            column = SQLite_Cast(column, self.sql_type().base)
+            column = Cast(column, self.sql_type().base)
         return column
 
     def _domain_value(self, operator, value):
         value = super(Numeric, self)._domain_value(operator, value)
-        db_type = backend.name
-        if db_type == 'sqlite':
+        if backend.name == 'sqlite':
             if isinstance(value, (Select, CombiningQuery)):
                 return value
             # Must be casted as Decimal is adapted to bytes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/trytond/model/modelsql.py 
new/trytond-6.0.50/trytond/model/modelsql.py
--- old/trytond-6.0.48/trytond/model/modelsql.py        2024-04-13 
00:38:02.000000000 +0200
+++ new/trytond-6.0.50/trytond/model/modelsql.py        2024-07-12 
19:15:46.000000000 +0200
@@ -1351,6 +1351,11 @@
                 columns += [Extract('EPOCH',
                         Coalesce(main_table.write_date, main_table.create_date)
                         ).cast(sql_type).as_('_timestamp')]
+        if backend.name == 'sqlite':
+            for column in columns:
+                field = cls._fields.get(column.output_name)
+                if field:
+                    column.output_name += ' [%s]' % field.sql_type().base
         select = table.select(*columns,
             where=expression, order_by=order_by, limit=limit, offset=offset)
         if query:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/trytond/tests/test_field_dict.py 
new/trytond-6.0.50/trytond/tests/test_field_dict.py
--- old/trytond-6.0.48/trytond/tests/test_field_dict.py 2023-05-17 
23:03:30.000000000 +0200
+++ new/trytond-6.0.50/trytond/tests/test_field_dict.py 2024-07-12 
18:52:18.000000000 +0200
@@ -886,7 +886,7 @@
         self.assertDictEqual(
             dict_.dico_string_keys, {'a': 'A', 'type': "Type"})
 
-    @with_transaction
+    @with_transaction()
     def test_set_key(self):
         "Test setting a key of dict"
         Dict = Pool().get('test.dict')
@@ -897,7 +897,7 @@
                     }])
 
         with self.assertRaises(TypeError):
-            dict.dico['a'] = 5
+            dict_.dico['a'] = 5
 
 
 @unittest.skipUnless(backend.name == 'postgresql',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/trytond/tests/test_field_numeric.py 
new/trytond-6.0.50/trytond/tests/test_field_numeric.py
--- old/trytond-6.0.48/trytond/tests/test_field_numeric.py      2024-04-12 
22:18:56.000000000 +0200
+++ new/trytond-6.0.50/trytond/tests/test_field_numeric.py      2024-07-14 
10:30:32.000000000 +0200
@@ -452,6 +452,28 @@
         self.assertEqual(numerics, [numeric1])
 
     @with_transaction()
+    def test_search_order(self):
+        "Test search order"
+        pool = Pool()
+        Numeric = pool.get('test.numeric')
+
+        Numeric.create([{
+                    'numeric': Decimal('10.00'),
+                    }, {
+                    'numeric': Decimal('7.00'),
+                    }])
+
+        records_asc = Numeric.search([], order=[('numeric', 'ASC')])
+        records_desc = Numeric.search([], order=[('numeric', 'DESC')])
+
+        self.assertEqual(
+            [r.numeric for r in records_asc],
+            [Decimal('7.00'), Decimal('10.00')])
+        self.assertEqual(
+            [r.numeric for r in records_desc],
+            [Decimal('10.00'), Decimal('7.00')])
+
+    @with_transaction()
     def test_write(self):
         "Test write numeric"
         Numeric = Pool().get('test.numeric')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-6.0.48/trytond.egg-info/PKG-INFO 
new/trytond-6.0.50/trytond.egg-info/PKG-INFO
--- old/trytond-6.0.48/trytond.egg-info/PKG-INFO        2024-06-15 
11:03:40.000000000 +0200
+++ new/trytond-6.0.50/trytond.egg-info/PKG-INFO        2024-08-01 
21:32:48.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond
-Version: 6.0.48
+Version: 6.0.50
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/6.0/

Reply via email to