[tryton-debian-vcs] tryton-modules-account-stock-anglo-saxon branch upstream-4.2 updated. upstream/4.2.0-1-gfed7656

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Nov 12 16:30:06 UTC 2017


The following commit has been merged in the upstream-4.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-stock-anglo-saxon.git;a=commitdiff;h=upstream/4.2.0-1-gfed7656

commit fed7656f02606c1f79a4d3b21e21eb5f1a5ff97f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 11 13:43:31 2017 +0100

    Adding upstream version 4.2.1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..c4fd423
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,9 @@
+image: python:all
+env:
+  - POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
+  - MYSQL_URI=mysql://root@127.0.0.1:3306/
+script:
+  - pip install tox
+  - tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
+services:
+  - postgres
diff --git a/CHANGELOG b/CHANGELOG
index 3384445..20ff1b8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.1 - 2017-11-08
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.0 - 2016-11-28
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 29a4a55..46e36ff 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2010-2016 Cédric Krier.
-Copyright (C) 2010-2016 B2CK SPRL.
+Copyright (C) 2010-2017 Cédric Krier.
+Copyright (C) 2010-2017 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 71e6ad3..37e0945 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_stock_anglo_saxon
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton module for anglo-saxon real-time stock valuation
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/stock.py b/stock.py
index 7f883a8..54182c2 100644
--- a/stock.py
+++ b/stock.py
@@ -169,10 +169,15 @@ class Move:
 
             cost += move_cost_price * Decimal(str(move_qty))
 
-            move_qty = Uom.compute_qty(product.default_uom, move_qty, move.uom)
+            move_qty = Uom.compute_qty(
+                product.default_uom, move_qty, move.uom, round=False)
+
+            # Avoid float rounding issue but allow only rounding precision lost
+            new_qty = (getattr(move, as_qty_field) or 0.0) + move_qty
+            assert move.uom.round(new_qty) <= move.quantity
+            new_qty = min(new_qty, move.quantity)
             cls.write([move], {
-                    as_qty_field: (
-                        (getattr(move, as_qty_field) or 0.0) + move_qty),
+                    as_qty_field: new_qty,
                     })
 
         if consumed_qty < total_qty:
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..08e43cf
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+    {py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
+    pypy-postgresql: psycopg2cffi >= 2.5
+    mysql: MySQL-python
+    sqlite: sqlitebck
+setenv =
+    sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
+    postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
+    mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
+    sqlite: DB_NAME={env:SQLITE_NAME::memory:}
+    postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
+    mysql: DB_NAME={env:MYSQL_NAME:test}
+install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
diff --git a/tryton.cfg b/tryton.cfg
index 5d08afd..ec3851d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.0
+version=4.2.1
 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 afa727b..b0625ee 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: 4.2.0
+Version: 4.2.1
 Summary: Tryton module for anglo-saxon real-time stock valuation
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
index 2b3562c..eb433be 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
@@ -1,10 +1,15 @@
+.drone.yml
+.hgtags
 CHANGELOG
 COPYRIGHT
 INSTALL
 LICENSE
 MANIFEST.in
 README
+__init__.py
+account.py
 account.xml
+invoice.py
 minimal_chart.xml
 minimal_chart_bg.xml
 minimal_chart_ca.xml
@@ -16,8 +21,11 @@ minimal_chart_nl.xml
 minimal_chart_pt.xml
 minimal_chart_ru.xml
 minimal_chart_sl.xml
+product.py
 product.xml
 setup.py
+stock.py
+tox.ini
 tryton.cfg
 ./__init__.py
 ./account.py
@@ -81,8 +89,11 @@ locale/pt_BR.po
 locale/ru.po
 locale/sl.po
 locale/zh_CN.po
+tests/__init__.py
 tests/scenario_account_stock_anglo_saxon.rst
 tests/scenario_account_stock_anglo_saxon_with_drop_shipment.rst
+tests/test_account_stock_anglo_saxon.py
+tests/tools.py
 trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
 trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
 trytond_account_stock_anglo_saxon.egg-info/dependency_links.txt
-- 
tryton-modules-account-stock-anglo-saxon



More information about the tryton-debian-vcs mailing list