[tryton-debian-vcs] tryton-modules-sale branch upstream-2.6 created. 3c454465174eb73f5d8a63c9072f751aa9b6a514

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:08:43 UTC 2013


The following commit has been merged in the upstream-2.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale.git;a=commitdiff;h=3c454465174eb73f5d8a63c9072f751aa9b6a514
commit 3c454465174eb73f5d8a63c9072f751aa9b6a514
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 17 13:15:43 2013 +0200

    Adding upstream version 2.6.3.

diff --git a/CHANGELOG b/CHANGELOG
index dcb5245..ee9059f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.3 - 2013-10-01
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.2 - 2013-06-09
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 9635b23..32bb665 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_sale
-Version: 2.6.2
+Version: 2.6.3
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/sale.py b/sale.py
index bbc3470..b0dcd0c 100644
--- a/sale.py
+++ b/sale.py
@@ -1216,6 +1216,7 @@ class SaleLine(ModelSQL, ModelView):
         invoice_line.note = self.note
         if self.type != 'line':
             if (self.sale.invoice_method == 'order'
+                    and not self.invoice_lines
                     and ((all(l.quantity >= 0 for l in self.sale.lines
                                 if l.type == 'line')
                             and invoice_type == 'out_invoice')
diff --git a/tryton.cfg b/tryton.cfg
index a1f70b1..2a90c4b 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.2
+version=2.6.3
 depends:
     account
     account_invoice
diff --git a/trytond_sale.egg-info/PKG-INFO b/trytond_sale.egg-info/PKG-INFO
index 1b3b8e3..9a1bee4 100644
--- a/trytond_sale.egg-info/PKG-INFO
+++ b/trytond_sale.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-sale
-Version: 2.6.2
+Version: 2.6.3
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
commit adfbf66b9509e96e76297f1eb7d512b3635248b2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Jun 10 18:12:35 2013 +0200

    Adding upstream version 2.6.2.

diff --git a/CHANGELOG b/CHANGELOG
index 649851b..dcb5245 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.2 - 2013-06-09
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.1 - 2012-12-23
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index ede3fac..6e948f6 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2012 Cédric Krier.
+Copyright (C) 2008-2013 Cédric Krier.
 Copyright (C) 2008-2012 Bertrand Chenal.
-Copyright (C) 2008-2012 B2CK SPRL.
+Copyright (C) 2008-2013 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff --git a/PKG-INFO b/PKG-INFO
index 7e060ee..9635b23 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_sale
-Version: 2.6.1
+Version: 2.6.2
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/sale.py b/sale.py
index 63bf9de..bbc3470 100644
--- a/sale.py
+++ b/sale.py
@@ -1511,17 +1511,13 @@ class ShipmentOut:
             for shipment in shipments:
                 move_ids.extend([x.id for x in shipment.outgoing_moves])
 
-            sale_lines = SaleLine.search([
-                    ('moves', 'in', move_ids),
-                    ])
-            if sale_lines:
-                for sale_line in sale_lines:
-                    if sale_line.sale not in sales:
-                        sales.append(sale_line.sale)
-
             with Transaction().set_user(0, set_context=True):
-                sales = Sale.browse([s.id for s in sales])
-            Sale.process(sales)
+                sale_lines = SaleLine.search([
+                        ('moves', 'in', move_ids),
+                        ])
+                if sale_lines:
+                    sales = list(set(l.sale for l in sale_lines))
+                    Sale.process(sales)
 
     @classmethod
     @ModelView.button
@@ -1560,17 +1556,17 @@ class ShipmentOutReturn:
             for shipment in shipments:
                 move_ids.extend([x.id for x in shipment.incoming_moves])
 
-            sale_lines = SaleLine.search([
-                    ('moves', 'in', move_ids),
-                    ])
-            if sale_lines:
-                for sale_line in sale_lines:
-                    if sale_line.sale not in sales:
-                        sales.append(sale_line.sale)
-
             with Transaction().set_user(0, set_context=True):
-                sales = Sale.browse([s.id for s in sales])
-            Sale.process(sales)
+                sale_lines = SaleLine.search([
+                        ('moves', 'in', move_ids),
+                        ])
+                if sale_lines:
+                    for sale_line in sale_lines:
+                        if sale_line.sale not in sales:
+                            sales.append(sale_line.sale)
+
+                    sales = Sale.browse([s.id for s in sales])
+                    Sale.process(sales)
 
     @classmethod
     @ModelView.button
@@ -1624,17 +1620,13 @@ class Move:
 
         super(Move, cls).write(moves, vals)
         if 'state' in vals and vals['state'] in ('cancel',):
-            sales = set()
-            sale_lines = SaleLine.search([
-                    ('moves', 'in', [m.id for m in moves]),
-                    ])
-            if sale_lines:
-                for sale_line in sale_lines:
-                    sales.add(sale_line.sale)
-            if sales:
-                with Transaction().set_user(0, set_context=True):
-                    sales = Sale.browse([s.id for s in sales])
-                Sale.process(sales)
+            with Transaction().set_user(0, set_context=True):
+                sale_lines = SaleLine.search([
+                        ('moves', 'in', [m.id for m in moves]),
+                        ])
+                if sale_lines:
+                    sales = list(set(l.sale for l in sale_lines))
+                    Sale.process(sales)
 
     @classmethod
     def delete(cls, moves):
@@ -1642,20 +1634,17 @@ class Move:
         Sale = pool.get('sale.sale')
         SaleLine = pool.get('sale.line')
 
-        sales = set()
-        sale_lines = SaleLine.search([
-                ('moves', 'in', [m.id for m in moves]),
-                ])
+        with Transaction().set_user(0, set_context=True):
+            sale_lines = SaleLine.search([
+                    ('moves', 'in', [m.id for m in moves]),
+                    ])
 
         super(Move, cls).delete(moves)
 
         if sale_lines:
-            for sale_line in sale_lines:
-                sales.add(sale_line.sale)
-            if sales:
-                with Transaction().set_user(0, set_context=True):
-                    sales = Sale.browse([s.id for s in sales])
-                Sale.process(list(sales))
+            sales = list(set(l.sale for l in sale_lines))
+            with Transaction().set_user(0, set_context=True):
+                Sale.process(sales)
 
 
 class OpenCustomer(Wizard):
diff --git a/tryton.cfg b/tryton.cfg
index b1dd302..a1f70b1 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.1
+version=2.6.2
 depends:
     account
     account_invoice
diff --git a/trytond_sale.egg-info/PKG-INFO b/trytond_sale.egg-info/PKG-INFO
index 36a4cce..1b3b8e3 100644
--- a/trytond_sale.egg-info/PKG-INFO
+++ b/trytond_sale.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-sale
-Version: 2.6.1
+Version: 2.6.2
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-sale



More information about the tryton-debian-vcs mailing list