[tryton-debian-vcs] tryton-modules-sale branch upstream-3.2 updated. upstream/3.2.1-1-g88176fc
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Nov 12 13:54:17 UTC 2014
The following commit has been merged in the upstream-3.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale.git;a=commitdiff;h=upstream/3.2.1-1-g88176fc
commit 88176fc0330feb6a8c4905dd18c7e6793cecd9b0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Nov 12 13:11:39 2014 +0100
Adding upstream version 3.2.2.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
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