Hello community,

here is the log from the commit of package trytond_purchase for 
openSUSE:Factory checked in at 2019-06-01 09:48:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_purchase (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_purchase.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_purchase"

Sat Jun  1 09:48:13 2019 rev:10 rq:705911 version:4.6.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond_purchase/trytond_purchase.changes        
2019-01-21 10:49:55.440050831 +0100
+++ 
/work/SRC/openSUSE:Factory/.trytond_purchase.new.5148/trytond_purchase.changes  
    2019-06-01 09:48:14.911349917 +0200
@@ -1,0 +2,5 @@
+Wed Feb 20 21:05:38 UTC 2019 - Axel Braun <[email protected]>
+
+- Version 4.6.5 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_purchase-4.6.4.tar.gz

New:
----
  trytond_purchase-4.6.5.tar.gz

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

Other differences:
------------------
++++++ trytond_purchase.spec ++++++
--- /var/tmp/diff_new_pack.AJtq9n/_old  2019-06-01 09:48:15.547349700 +0200
+++ /var/tmp/diff_new_pack.AJtq9n/_new  2019-06-01 09:48:15.547349700 +0200
@@ -17,7 +17,7 @@
 
 %define majorver 4.6
 Name:           trytond_purchase
-Version:        %{majorver}.4
+Version:        %{majorver}.5
 Release:        0
 Summary:        The "purchase" module for the Tryton ERP system
 License:        GPL-3.0

++++++ trytond_purchase-4.6.4.tar.gz -> trytond_purchase-4.6.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-4.6.4/.hgtags 
new/trytond_purchase-4.6.5/.hgtags
--- old/trytond_purchase-4.6.4/.hgtags  2018-07-05 12:08:43.000000000 +0200
+++ new/trytond_purchase-4.6.5/.hgtags  2019-02-19 23:10:03.000000000 +0100
@@ -21,3 +21,4 @@
 37c52b2243828adaf12fff2862951f0b315ef8aa 4.6.2
 4062ed1803019eaad01274ef6c074dd037b61a20 4.6.3
 f08127800a9d587076c4d04174150419856ffe67 4.6.4
+25b6ffbaba2a7a3c3d332d2f43d4791f4277824b 4.6.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-4.6.4/CHANGELOG 
new/trytond_purchase-4.6.5/CHANGELOG
--- old/trytond_purchase-4.6.4/CHANGELOG        2018-07-05 12:08:43.000000000 
+0200
+++ new/trytond_purchase-4.6.5/CHANGELOG        2019-02-19 23:10:03.000000000 
+0100
@@ -1,3 +1,6 @@
+Version 4.6.5 - 2019-02-19
+* Bug fixes (see mercurial logs for details)
+
 Version 4.6.4 - 2018-07-05
 * Bug fixes (see mercurial logs for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-4.6.4/COPYRIGHT 
new/trytond_purchase-4.6.5/COPYRIGHT
--- old/trytond_purchase-4.6.4/COPYRIGHT        2018-07-05 12:08:43.000000000 
+0200
+++ new/trytond_purchase-4.6.5/COPYRIGHT        2019-02-19 23:10:02.000000000 
+0100
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2018 Cédric Krier.
+Copyright (C) 2008-2019 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2018 B2CK SPRL.
+Copyright (C) 2008-2019 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-4.6.4/PKG-INFO 
new/trytond_purchase-4.6.5/PKG-INFO
--- old/trytond_purchase-4.6.4/PKG-INFO 2018-07-05 12:08:44.000000000 +0200
+++ new/trytond_purchase-4.6.5/PKG-INFO 2019-02-19 23:10:04.000000000 +0100
@@ -1,13 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_purchase
-Version: 4.6.4
+Version: 4.6.5
 Summary: Tryton module for purchase
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: [email protected]
 License: GPL-3
 Download-URL: http://downloads.tryton.org/4.6/
-Description-Content-Type: UNKNOWN
 Description: trytond_purchase
         ================
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-4.6.4/purchase.py 
new/trytond_purchase-4.6.5/purchase.py
--- old/trytond_purchase-4.6.4/purchase.py      2018-04-26 23:14:43.000000000 
+0200
+++ new/trytond_purchase-4.6.5/purchase.py      2019-02-06 22:58:37.000000000 
+0100
@@ -835,6 +835,7 @@
     @ModelView.button
     def process(cls, purchases):
         process, done = [], []
+        cls.__lock(purchases)
         for purchase in purchases:
             purchase.create_invoice()
             purchase.set_invoice_state()
@@ -855,6 +856,25 @@
         if done:
             cls.do(done)
 
+    @classmethod
+    def __lock(cls, records):
+        from trytond.tools import grouped_slice, reduce_ids
+        from sql import Literal, For
+        transaction = Transaction()
+        database = transaction.database
+        connection = transaction.connection
+        table = cls.__table__()
+
+        if database.has_select_for():
+            for sub_records in grouped_slice(records):
+                where = reduce_ids(table.id, sub_records)
+                query = table.select(
+                    Literal(1), where=where, for_=For('UPDATE', nowait=True))
+                with connection.cursor() as cursor:
+                    cursor.execute(*query)
+        else:
+            database.lock(connection, cls._table)
+
 
 class PurchaseIgnoredInvoice(ModelSQL):
     'Purchase - Ignored Invoice'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-4.6.4/tryton.cfg 
new/trytond_purchase-4.6.5/tryton.cfg
--- old/trytond_purchase-4.6.4/tryton.cfg       2018-05-08 22:19:55.000000000 
+0200
+++ new/trytond_purchase-4.6.5/tryton.cfg       2018-08-20 22:55:18.000000000 
+0200
@@ -1,5 +1,5 @@
 [tryton]
-version=4.6.4
+version=4.6.5
 depends:
     account
     account_invoice
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_purchase-4.6.4/trytond_purchase.egg-info/PKG-INFO 
new/trytond_purchase-4.6.5/trytond_purchase.egg-info/PKG-INFO
--- old/trytond_purchase-4.6.4/trytond_purchase.egg-info/PKG-INFO       
2018-07-05 12:08:44.000000000 +0200
+++ new/trytond_purchase-4.6.5/trytond_purchase.egg-info/PKG-INFO       
2019-02-19 23:10:03.000000000 +0100
@@ -1,13 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-purchase
-Version: 4.6.4
+Version: 4.6.5
 Summary: Tryton module for purchase
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: [email protected]
 License: GPL-3
 Download-URL: http://downloads.tryton.org/4.6/
-Description-Content-Type: UNKNOWN
 Description: trytond_purchase
         ================
         


Reply via email to