Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package trytond_purchase for 
openSUSE:Factory checked in at 2024-10-30 17:38:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_purchase (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_purchase.new.2020 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_purchase"

Wed Oct 30 17:38:52 2024 rev:34 rq:1219421 version:6.0.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond_purchase/trytond_purchase.changes        
2024-08-05 17:21:49.652481765 +0200
+++ 
/work/SRC/openSUSE:Factory/.trytond_purchase.new.2020/trytond_purchase.changes  
    2024-10-30 17:39:16.340411823 +0100
@@ -1,0 +2,5 @@
+Tue Oct  8 18:03:38 UTC 2024 - Axel Braun <[email protected]>
+
+- Version 6.0.18 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_purchase-6.0.17.tar.gz

New:
----
  trytond_purchase-6.0.18.tar.gz

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

Other differences:
------------------
++++++ trytond_purchase.spec ++++++
--- /var/tmp/diff_new_pack.VTD8hm/_old  2024-10-30 17:39:16.928436455 +0100
+++ /var/tmp/diff_new_pack.VTD8hm/_new  2024-10-30 17:39:16.928436455 +0100
@@ -28,7 +28,7 @@
 
 %define majorver 6.0
 Name:           trytond_purchase
-Version:        %{majorver}.17
+Version:        %{majorver}.18
 Release:        0
 Summary:        The "purchase" module for the Tryton ERP system
 License:        GPL-3.0-only

++++++ trytond_purchase-6.0.17.tar.gz -> trytond_purchase-6.0.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-6.0.17/CHANGELOG 
new/trytond_purchase-6.0.18/CHANGELOG
--- old/trytond_purchase-6.0.17/CHANGELOG       2024-07-17 23:49:25.000000000 
+0200
+++ new/trytond_purchase-6.0.18/CHANGELOG       2024-10-05 18:02:51.000000000 
+0200
@@ -1,4 +1,9 @@
 
+Version 6.0.18 - 2024-10-05
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
 Version 6.0.17 - 2024-07-17
 ---------------------------
 * Bug fixes (see mercurial logs for details)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-6.0.17/PKG-INFO 
new/trytond_purchase-6.0.18/PKG-INFO
--- old/trytond_purchase-6.0.17/PKG-INFO        2024-07-17 23:49:28.065620700 
+0200
+++ new/trytond_purchase-6.0.18/PKG-INFO        2024-10-05 18:02:53.873235500 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond_purchase
-Version: 6.0.17
+Version: 6.0.18
 Summary: Tryton module for purchase
 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_purchase-6.0.17/invoice.py 
new/trytond_purchase-6.0.18/invoice.py
--- old/trytond_purchase-6.0.17/invoice.py      2023-05-17 23:03:30.000000000 
+0200
+++ new/trytond_purchase-6.0.18/invoice.py      2024-09-28 18:06:54.000000000 
+0200
@@ -123,7 +123,7 @@
         pool = Pool()
         PurchaseLine = pool.get('purchase.line')
         name = super(InvoiceLine, self).origin_name
-        if isinstance(self.origin, PurchaseLine):
+        if isinstance(self.origin, PurchaseLine) and self.origin.id >= 0:
             name = self.origin.purchase.rec_name
         return name
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-6.0.17/purchase.py 
new/trytond_purchase-6.0.18/purchase.py
--- old/trytond_purchase-6.0.17/purchase.py     2024-07-12 19:10:24.000000000 
+0200
+++ new/trytond_purchase-6.0.18/purchase.py     2024-09-28 18:06:05.000000000 
+0200
@@ -1,6 +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.
 import datetime
+import math
 from itertools import chain
 from decimal import Decimal
 
@@ -32,6 +33,10 @@
 from .exceptions import PurchaseQuotationError, PartyLocationError
 
 
+def samesign(a, b):
+    return math.copysign(a, b) == a
+
+
 def get_shipments_returns(model_name):
     "Computes the returns or shipments"
     def method(self, name):
@@ -1585,7 +1590,8 @@
                     gettext('purchase'
                         '.msg_purchase_missing_account_expense',
                         purchase=self.purchase.rec_name))
-        invoice_line.stock_moves = self._get_invoice_line_moves()
+        if samesign(self.quantity, invoice_line.quantity):
+            invoice_line.stock_moves = self._get_invoice_line_moves()
         return [invoice_line]
 
     def _get_invoice_not_line(self):
@@ -1713,9 +1719,11 @@
     def _get_move_invoice_lines(self, move_type):
         'Return the invoice lines that should be shipped'
         if self.purchase.invoice_method == 'order':
-            return [l for l in self.invoice_lines]
+            lines = self.invoice_lines
         else:
-            return [l for l in self.invoice_lines if not l.stock_moves]
+            lines = filter(lambda l: not l.stock_moves, self.invoice_lines)
+        return list(filter(
+                lambda l: samesign(self.quantity, l.quantity), lines))
 
     def set_actual_quantity(self):
         pool = Pool()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-6.0.17/stock.py 
new/trytond_purchase-6.0.18/stock.py
--- old/trytond_purchase-6.0.17/stock.py        2023-05-17 23:03:30.000000000 
+0200
+++ new/trytond_purchase-6.0.18/stock.py        2024-09-28 18:06:54.000000000 
+0200
@@ -221,7 +221,7 @@
         pool = Pool()
         PurchaseLine = pool.get('purchase.line')
         name = super(Move, self).origin_name
-        if isinstance(self.origin, PurchaseLine):
+        if isinstance(self.origin, PurchaseLine) and self.origin.id >= 0:
             name = self.origin.purchase.rec_name
         return name
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-6.0.17/tox.ini 
new/trytond_purchase-6.0.18/tox.ini
--- old/trytond_purchase-6.0.17/tox.ini 2023-05-17 23:03:30.000000000 +0200
+++ new/trytond_purchase-6.0.18/tox.ini 2024-09-13 16:34:34.000000000 +0200
@@ -4,6 +4,7 @@
 [testenv]
 commands = {envpython} setup.py test
 deps =
+    setuptools<72
     {py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
     pypy3-postgresql: psycopg2cffi >= 2.5
     py36-sqlite: sqlitebck
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_purchase-6.0.17/tryton.cfg 
new/trytond_purchase-6.0.18/tryton.cfg
--- old/trytond_purchase-6.0.17/tryton.cfg      2024-06-02 18:26:05.000000000 
+0200
+++ new/trytond_purchase-6.0.18/tryton.cfg      2024-07-17 23:49:35.000000000 
+0200
@@ -1,5 +1,5 @@
 [tryton]
-version=6.0.17
+version=6.0.18
 depends:
     account
     account_invoice
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_purchase-6.0.17/trytond_purchase.egg-info/PKG-INFO 
new/trytond_purchase-6.0.18/trytond_purchase.egg-info/PKG-INFO
--- old/trytond_purchase-6.0.17/trytond_purchase.egg-info/PKG-INFO      
2024-07-17 23:49:27.000000000 +0200
+++ new/trytond_purchase-6.0.18/trytond_purchase.egg-info/PKG-INFO      
2024-10-05 18:02:53.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: trytond_purchase
-Version: 6.0.17
+Version: 6.0.18
 Summary: Tryton module for purchase
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/6.0/

Reply via email to