[tryton-debian-vcs] tryton-modules-sale branch debian-jessie-3.2 updated. debian/3.2.1-1-3-g63ea773

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 12 13:54:16 UTC 2014


The following commit has been merged in the debian-jessie-3.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale.git;a=commitdiff;h=debian/3.2.1-1-3-g63ea773

commit 63ea773aebc7e4431cd25b46106c262edb2fad44
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:11:41 2014 +0100

    Releasing debian version 3.2.2-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 2352d8e..887b287 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-sale (3.2.2-1) unstable; urgency=medium
+
+  * Setting the branch in the watch file to the fixed version 3.2.
+  * Merging upstream version 3.2.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 12 Nov 2014 13:11:40 +0100
+
 tryton-modules-sale (3.2.1-1) unstable; urgency=medium
 
   * Updating signing key while using now plain .asc files instead of .pgp
commit 0a25963d44df885a1c3c8367a3fbd0ac5302b15f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:11:40 2014 +0100

    Merging upstream version 3.2.2.

diff --git a/CHANGELOG b/CHANGELOG
index 942ecff..97ee1b9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.2 - 2014-11-06
+* Bug fixes (see mercurial logs for details)
+
 Version 3.2.1 - 2014-09-29
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index adcefe8..6efc16a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_sale
-Version: 3.2.1
+Version: 3.2.2
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/sale.py b/sale.py
index c4667a0..374bf1b 100644
--- a/sale.py
+++ b/sale.py
@@ -1335,7 +1335,8 @@ class SaleLine(ModelSQL, ModelView):
                         self.unit)
                     if move.invoiced_quantity < move.quantity:
                         stock_moves.append(move)
-        invoice_line.stock_moves = stock_moves
+        if self.sale.shipment_method == 'order':
+            invoice_line.stock_moves = stock_moves
 
         skip_ids = set(l.id for i in self.sale.invoices_recreated
             for l in i.lines)
@@ -1345,10 +1346,12 @@ class SaleLine(ModelSQL, ModelView):
             if old_invoice_line.id not in skip_ids:
                 quantity -= Uom.compute_qty(old_invoice_line.unit,
                     old_invoice_line.quantity, self.unit)
-        invoice_line.quantity = quantity
 
-        if invoice_line.quantity <= 0.0:
+        rounding = self.unit.rounding if self.unit else 0.01
+        invoice_line.quantity = Uom.round(quantity, rounding)
+        if invoice_line.quantity <= 0:
             return []
+
         invoice_line.unit = self.unit
         invoice_line.product = self.product
         invoice_line.unit_price = self.unit_price
@@ -1403,7 +1406,8 @@ class SaleLine(ModelSQL, ModelView):
         invoice_lines = []
         if self.sale.shipment_method == 'order':
             quantity = abs(self.quantity)
-            invoice_lines = self.invoice_lines
+            if self.sale.invoice_method == 'order':
+                invoice_lines = self.invoice_lines
         else:
             quantity = 0.0
             for invoice_line in self.invoice_lines:
@@ -1418,8 +1422,11 @@ class SaleLine(ModelSQL, ModelView):
             if move.id not in skip_ids:
                 quantity -= Uom.compute_qty(move.uom, move.quantity,
                     self.unit)
-        if quantity <= 0.0:
+
+        quantity = Uom.round(quantity, self.unit.rounding)
+        if quantity <= 0:
             return
+
         if not self.sale.party.customer_location:
             self.raise_user_error('customer_location_required', {
                     'sale': self.sale.rec_name,
diff --git a/tryton.cfg b/tryton.cfg
index 1c7c099..e3bd9aa 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.2.1
+version=3.2.2
 depends:
     account
     account_invoice
diff --git a/trytond_sale.egg-info/PKG-INFO b/trytond_sale.egg-info/PKG-INFO
index dd0e5ef..76f679f 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: 3.2.1
+Version: 3.2.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