[tryton-debian-vcs] tryton-modules-stock branch debian updated. debian/3.8.0-1-3-g418617c
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Feb 10 19:55:13 UTC 2016
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock.git;a=commitdiff;h=debian/3.8.0-1-3-g418617c
commit 418617c424d129fa1eeea7ed5060ed8fda023be2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:38:06 2016 +0100
Releasing debian version 3.8.1-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 39ceed4..55681fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-stock (3.8.1-1) unstable; urgency=medium
+
+ * Merging upstream version 3.8.1.
+ * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Wed, 10 Feb 2016 18:38:06 +0100
+
tryton-modules-stock (3.8.0-1) unstable; urgency=medium
* Updating year of debian copyright.
commit ce1c592faaa9bd6ac9b236705075872768a0caea
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:38:05 2016 +0100
Updating copyright file.
diff --git a/debian/copyright b/debian/copyright
index 11c0ee4..043d89f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,9 +2,9 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
Copyright: 2012 Openlabs Technologies & Consulting (P) LTD
- 2008-2015 Cédric Krier
+ 2008-2016 Cédric Krier
2008-2013 Bertrand Chenal
- 2008-2015 B2CK SPRL
+ 2008-2016 B2CK SPRL
2004-2008 Tiny SPRL
License: GPL-3+
commit a9db9338ad5b35411bc97267557bfc42949ba31b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:38:05 2016 +0100
Merging upstream version 3.8.1.
diff --git a/CHANGELOG b/CHANGELOG
index 10c4f5f..ee24571 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.1 - 2016-02-06
+* Bug fixes (see mercurial logs for details)
+
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
* Add drop location type
diff --git a/COPYRIGHT b/COPYRIGHT
index 3a91df4..f5434dd 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
Copyright (C) 2012 Openlabs Technologies & Consulting (P) LTD.
-Copyright (C) 2008-2015 Cédric Krier.
+Copyright (C) 2008-2016 Cédric Krier.
Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2015 B2CK SPRL.
+Copyright (C) 2008-2016 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 de99a69..f9748f1 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_stock
-Version: 3.8.0
+Version: 3.8.1
Summary: Tryton module for stock and inventory
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/product.py b/product.py
index 7138a02..17e0d64 100644
--- a/product.py
+++ b/product.py
@@ -2,6 +2,7 @@
# this repository contains the full copyright notices and license terms.
import datetime
from decimal import Decimal
+from collections import defaultdict
from sql import Literal, Null
from sql.aggregate import Max
@@ -188,28 +189,30 @@ class Product(object, StockMixin):
pool = Pool()
Template = pool.get('product.template')
- costs = []
- for product in products:
- if product.type == 'service':
- continue
- costs.append(getattr(product, 'recompute_cost_price_%s' %
- product.cost_price_method)())
-
if hasattr(cls, 'cost_price'):
digits = cls.cost_price.digits
write = cls.write
- records = products
+ record = lambda p: p
else:
digits = Template.cost_price.digits
write = Template.write
- records = [p.template for p in products]
+ record = lambda p: p.template
+
+ costs = defaultdict(list)
+ for product in products:
+ if product.type == 'service':
+ continue
+ cost = getattr(product,
+ 'recompute_cost_price_%s' % product.cost_price_method)()
+ cost = cost.quantize(Decimal(str(10.0 ** -digits[1])))
+ costs[cost].append(record(product))
- costs = [c.quantize(
- Decimal(str(10.0 ** -digits[1]))) for c in costs]
+ if not costs:
+ return
to_write = []
- for record, cost in zip(records, costs):
- to_write.append([record])
+ for cost, records in costs.iteritems():
+ to_write.append(records)
to_write.append({'cost_price': cost})
# Enforce check access for account_stock*
diff --git a/tryton.cfg b/tryton.cfg
index fb33ff2..3076f98 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.8.0
+version=3.8.1
depends:
company
currency
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index ee334ea..dfbfd29 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-stock
-Version: 3.8.0
+Version: 3.8.1
Summary: Tryton module for stock and inventory
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-stock
More information about the tryton-debian-vcs
mailing list