[tryton-debian-vcs] tryton-modules-account-stock-anglo-saxon branch debian-wheezy-2.6 created. ada01ed9632afe09414296cc081f2c1375aba66f

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 16:57:13 UTC 2013


The following commit has been merged in the debian-wheezy-2.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-stock-anglo-saxon.git;a=commitdiff;h=ada01ed9632afe09414296cc081f2c1375aba66f
commit ada01ed9632afe09414296cc081f2c1375aba66f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 17 13:54:31 2013 +0200

    Releasing debian version 2.6.4-1.

diff --git a/debian/changelog b/debian/changelog
index 1e5a169..77ce21c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-account-stock-anglo-saxon (2.6.4-1) unstable; urgency=low
+
+  * Merging upstream version 2.6.4.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Thu, 17 Oct 2013 13:14:49 +0200
+
 tryton-modules-account-stock-anglo-saxon (2.6.3-1) experimental; urgency=low
 
   * Versioning watch file for Tryton branch 2.6.
commit e5576678c092ffd7cced1a9498774caff80433cd
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 17 13:14:37 2013 +0200

    Merging upstream version 2.6.4.

diff --git a/CHANGELOG b/CHANGELOG
index 0883997..e478392 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.4 - 2013-10-01
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.3 - 2013-05-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index b3c8bbe..ad24a27 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_stock_anglo_saxon
-Version: 2.6.3
+Version: 2.6.4
 Summary: Tryton module for anglo-saxon real-time stock valuation
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/invoice.py b/invoice.py
index 347e990..742dbfb 100644
--- a/invoice.py
+++ b/invoice.py
@@ -81,10 +81,17 @@ class InvoiceLine:
             type_ = 'out_supplier'
         elif self.invoice.type == 'out_credit_note':
             type_ = 'in_customer'
+        if self.quantity < 0:
+            direction, target = type_.split('_')
+            if direction == 'in':
+                direction = 'out'
+            else:
+                direction = 'in'
+            type_ = '%s_%s' % (direction, target)
 
         moves.sort(key=operator.attrgetter('effective_date'))
         cost = Move.update_anglo_saxon_quantity_product_cost(
-            self.product, moves, self.quantity, self.unit, type_)
+            self.product, moves, abs(self.quantity), self.unit, type_)
         cost = self.invoice.currency.round(cost)
 
         anglo_saxon_move_lines = self._get_anglo_saxon_move_lines(cost, type_)
diff --git a/tryton.cfg b/tryton.cfg
index 67dc30a..1e03544 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.3
+version=2.6.4
 depends:
     account
     account_invoice
diff --git a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
index f4031cf..6adfb7c 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
+++ b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-stock-anglo-saxon
-Version: 2.6.3
+Version: 2.6.4
 Summary: Tryton module for anglo-saxon real-time stock valuation
 Home-page: http://www.tryton.org/
 Author: Tryton
commit d6f470ead41c27f197e0576228bdfaee6d297337
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 12:07:16 2013 +0200

    Releasing debian version 2.6.3-1.

diff --git a/debian/changelog b/debian/changelog
index f33c05b..1e5a169 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-account-stock-anglo-saxon (2.6.3-1) experimental; urgency=low
+
+  * Versioning watch file for Tryton branch 2.6.
+  * Improving update of major version in Depends.
+  * Merging upstream version 2.6.3.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sat, 04 May 2013 02:38:09 +0200
+
 tryton-modules-account-stock-anglo-saxon (2.6.2-1) experimental; urgency=low
 
   * Initial packaging.
commit a4c091bc8586c8d45e8492ae8621415353cbe697
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 02:18:51 2013 +0200

    Merging upstream version 2.6.3.

diff --git a/CHANGELOG b/CHANGELOG
index ae0a4df..0883997 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.3 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.2 - 2013-02-12
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 4659dff..b3c8bbe 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_stock_anglo_saxon
-Version: 2.6.2
+Version: 2.6.3
 Summary: Tryton module for anglo-saxon real-time stock valuation
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/stock.py b/stock.py
index d5034a9..f99ab8f 100644
--- a/stock.py
+++ b/stock.py
@@ -32,13 +32,17 @@ class Move:
         pool = Pool()
         Uom = pool.get('product.uom')
         AccountMoveLine = pool.get('account.move.line')
+        Currency = pool.get('currency.currency')
         lines = super(Move, self)._get_account_stock_move_lines(type_)
         if (type_.endswith('supplier')
                 and self.product.cost_price_method == 'fixed'):
             cost_price = Uom.compute_price(self.product.default_uom,
                 self.cost_price, self.uom)
+            with Transaction().set_context(date=self.effective_date):
+                unit_price = Currency.compute(self.currency, self.unit_price,
+                    self.company.currency, round=False)
             amount = self.company.currency.round(
-                Decimal(str(self.quantity)) * (self.unit_price - cost_price))
+                Decimal(str(self.quantity)) * (unit_price - cost_price))
             if self.company.currency.is_zero(amount):
                 return lines
             account = self.product.account_stock_supplier_used
@@ -94,7 +98,9 @@ class Move:
         Return the cost for quantity based on lines.
         Update anglo_saxon_quantity on the concerned moves.
         '''
-        Uom = Pool().get('product.uom')
+        pool = Pool()
+        Uom = pool.get('product.uom')
+        Currency = pool.get('currency.currency')
 
         for move in moves:
             assert move.product == product, 'wrong product'
@@ -110,8 +116,11 @@ class Move:
             consumed_qty += move_qty
 
             if type_.startswith('in_'):
+                with Transaction().set_context(date=move.effective_date):
+                    unit_price = Currency.compute(move.currency,
+                        move.unit_price, move.company.currency, round=False)
                 move_cost_price = Uom.compute_price(move.uom,
-                        move.unit_price, move.product.default_uom)
+                        unit_price, move.product.default_uom)
             else:
                 move_cost_price = move.cost_price
             cost += move_cost_price * Decimal(str(move_qty))
diff --git a/tryton.cfg b/tryton.cfg
index 2502cf8..67dc30a 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_account_stock_anglo_saxon.egg-info/PKG-INFO b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
index 6958eb8..f4031cf 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
+++ b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-stock-anglo-saxon
-Version: 2.6.2
+Version: 2.6.3
 Summary: Tryton module for anglo-saxon real-time stock valuation
 Home-page: http://www.tryton.org/
 Author: Tryton
commit fadba6ffed25deb5122a46f4990991358b6153be
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 27 14:54:47 2013 +0200

    Improving update of major version in Depends.
    
    Pulling the major version for Depends directly from the package version.
    Thanks to Ilya Melnikov for pushing the idea.

diff --git a/debian/control b/debian/control
index 6303eab..8b6469a 100644
--- a/debian/control
+++ b/debian/control
@@ -13,12 +13,13 @@ X-Python-Version: >= 2.6
 Package: tryton-modules-account-stock-anglo-saxon
 Architecture: all
 Depends:
- ${misc:Depends}, ${python:Depends}, tryton-server (>= 2.6),
- tryton-modules-account (>= 2.6), tryton-modules-account-invoice (>= 2.6),
- tryton-modules-account-product (>= 2.6), 
- tryton-modules-account-stock-continental (>= 2.6),
- tryton-modules-purchase (>= 2.6),
- tryton-modules-sale (>= 2.6), python-pkg-resources
+ ${misc:Depends}, ${python:Depends}, tryton-server (>= ${version:major}),
+ tryton-modules-account (>= ${version:major}),
+ tryton-modules-account-invoice (>= ${version:major}),
+ tryton-modules-account-product (>= ${version:major}),
+ tryton-modules-account-stock-continental (>= ${version:major}),
+ tryton-modules-purchase (>= ${version:major}),
+ tryton-modules-sale (>= ${version:major}), python-pkg-resources
 Description: Tryton Application Platform (Account Stock Anglo Saxon Module)
  Tryton is a high-level general purpose application platform written in Python
  and using PostgreSQL as database engine. It is the core base of a complete
diff --git a/debian/rules b/debian/rules
index 1ae0776..0f63ab4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
+
 %:
 	dh ${@} --with python2
 
@@ -8,5 +10,8 @@ override_dh_auto_clean:
 
 	rm -rf *.egg-info
 
+override_dh_gencontrol:
+	dh_gencontrol -- -Vversion:major="$(MAJOR)"
+
 override_dh_builddeb:
 	dh_builddeb -- -Zxz -z9
commit 121bbd8e9e92aea9b354bb14d5a09bb0e20c04d4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Apr 24 00:59:36 2013 +0200

    Versioning watch file for Tryton branch 2.6.

diff --git a/debian/watch b/debian/watch
index 45b76ff..5c5d596 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
 version=3
-http://downloads.tryton.org/current/ .*trytond_account_stock_anglo_saxon-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
+http://downloads.tryton.org/2.6/ .*trytond_account_stock_anglo_saxon-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
-- 
tryton-modules-account-stock-anglo-saxon



More information about the tryton-debian-vcs mailing list