[tryton-debian-vcs] tryton-modules-purchase-shipment-cost branch upstream-2.6 created. 25da08002a01e62e7d3e3c6befb74f093d07f227

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:08:00 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-purchase-shipment-cost.git;a=commitdiff;h=25da08002a01e62e7d3e3c6befb74f093d07f227
commit 25da08002a01e62e7d3e3c6befb74f093d07f227
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 01:57:08 2013 +0200

    Adding upstream version 2.6.1.

diff --git a/CHANGELOG b/CHANGELOG
index c6d5b30..d05cbd4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.1 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.0 - 2012-10-22
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 7fcb680..87a90a4 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
-Copyright (C) 2011-2012 Cédric Krier.
+Copyright (C) 2011-2013 Cédric Krier.
 Copyright (C) 2011-2012 Bertrand Chenal.
 Copyright (C) 2011 Nicolas Évrard.
-Copyright (C) 2011-2012 B2CK SPRL.
+Copyright (C) 2011-2013 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 350b1bc..fb52466 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_purchase_shipment_cost
-Version: 2.6.0
+Version: 2.6.1
 Summary: Tryton module for purchase shipment cost
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/stock.py b/stock.py
index 5c65bd2..378a1cc 100644
--- a/stock.py
+++ b/stock.py
@@ -115,7 +115,7 @@ class ShipmentIn:
             move = cost['move']
             quantity = Decimal(str(move.quantity))
             if exp * quantity < difference:
-                cost['unit_shipment_cost'] = unit_shipment_cost + exp
+                cost['unit_shipment_cost'] += exp
                 difference -= exp * quantity
             if difference < exp:
                 break
@@ -128,8 +128,8 @@ class ShipmentIn:
             unit_shipment_cost = unit_shipment_cost.quantize(
                 exp, rounding=ROUND_HALF_EVEN)
             Move.write([move], {
-                    'unit_price': move.unit_price + cost['unit_shipment_cost'],
-                    'unit_shipment_cost': cost['unit_shipment_cost'],
+                    'unit_price': move.unit_price + unit_shipment_cost,
+                    'unit_shipment_cost': unit_shipment_cost,
                     })
 
     @classmethod
@@ -157,13 +157,15 @@ class Move:
     def _get_account_stock_move_lines(self, type_):
         pool = Pool()
         AccountMoveLine = pool.get('account.move.line')
+        Currency = pool.get('currency.currency')
         move_lines = super(Move, self)._get_account_stock_move_lines(type_)
         if (type_.startswith('in_')
                 and self.unit_shipment_cost
                 and self.shipment_in
                 and self.shipment_in.carrier):
-            shipment_cost = self.company.currency.round(
-                Decimal(str(self.quantity)) * self.unit_shipment_cost)
+            shipment_cost = Currency.compute(self.currency,
+                Decimal(str(self.quantity)) * self.unit_shipment_cost,
+                self.company.currency)
             shipment_cost_account = \
                 self.shipment_in.carrier.carrier_product.account_expense_used
             account = self.product.account_stock_supplier_used
diff --git a/tryton.cfg b/tryton.cfg
index 2f65365..e43208a 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.0
+version=2.6.1
 depends:
     carrier
     currency
diff --git a/trytond_purchase_shipment_cost.egg-info/PKG-INFO b/trytond_purchase_shipment_cost.egg-info/PKG-INFO
index 85716c6..174f3ab 100644
--- a/trytond_purchase_shipment_cost.egg-info/PKG-INFO
+++ b/trytond_purchase_shipment_cost.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-purchase-shipment-cost
-Version: 2.6.0
+Version: 2.6.1
 Summary: Tryton module for purchase shipment cost
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-purchase-shipment-cost



More information about the tryton-debian-vcs mailing list