[tryton-debian-vcs] tryton-modules-account-stock-anglo-saxon branch upstream-4.0 updated. upstream/4.0.1-1-g377ce1c

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.0 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.0.1-1-g377ce1c

commit 377ce1c738ea1db1e3563b0cdd0a13de8ed8b943
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 11 13:41:56 2017 +0100

    Adding upstream version 4.0.2.
    
    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 d3716b7..265010a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.2 - 2017-11-08
+* Bug fixes (see mercurial logs for details)
+
 Version 4.0.1 - 2016-05-11
 * 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 4bc9357..961bacb 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_stock_anglo_saxon
-Version: 4.0.1
+Version: 4.0.2
 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..3dda9ab
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,17 @@
+[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
+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 b772cb1..b2d2a57 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.0.1
+version=4.0.2
 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 23dd033..2832a79 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.0.1
+Version: 4.0.2
 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 3762fce..ae5a40e 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
@@ -85,8 +93,11 @@ locale/pt_BR.po
 locale/ru_RU.po
 locale/sl_SI.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