[tryton-debian-vcs] tryton-modules-project-revenue branch upstream-3.8 updated. upstream/3.8.0-1-g4b43cfb
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Sun Jan 7 12:58:36 UTC 2018
The following commit has been merged in the upstream-3.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-project-revenue.git;a=commitdiff;h=upstream/3.8.0-1-g4b43cfb
commit 4b43cfbca18669f4a467fb31407378d539e77e5e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Jan 6 12:07:43 2018 +0100
Adding upstream version 3.8.1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..9d7c769
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,9 @@
+image: python2.7
+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-{sqlite,postgresql}"
+services:
+ - postgres
diff --git a/CHANGELOG b/CHANGELOG
index fa2bfee..56b62db 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.1 - 2018-01-04
+* Bug fixes (see mercurial logs for details)
+
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
* Use product price_decimal for list price
diff --git a/COPYRIGHT b/COPYRIGHT
index 0634fbe..812516e 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2008-2015 Cédric Krier.
-Copyright (C) 2008-2015 B2CK SPRL.
+Copyright (C) 2008-2018 Cédric Krier.
+Copyright (C) 2008-2018 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 7f122c6..2178459 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_project_revenue
-Version: 3.8.0
+Version: 3.8.1
Summary: Tryton module to add revenue on project
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/tox.ini b/tox.ini
new file mode 100644
index 0000000..e9d2876
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,17 @@
+[tox]
+envlist = py27-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+ py27-postgresql: psycopg2 >= 2.0
+ 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 5bbde70..77d5d1f 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.8.0
+version=3.8.1
depends:
ir
project
diff --git a/trytond_project_revenue.egg-info/PKG-INFO b/trytond_project_revenue.egg-info/PKG-INFO
index 4708be3..a635f1b 100644
--- a/trytond_project_revenue.egg-info/PKG-INFO
+++ b/trytond_project_revenue.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-project-revenue
-Version: 3.8.0
+Version: 3.8.1
Summary: Tryton module to add revenue on project
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond_project_revenue.egg-info/SOURCES.txt b/trytond_project_revenue.egg-info/SOURCES.txt
index c79505f..8124e07 100644
--- a/trytond_project_revenue.egg-info/SOURCES.txt
+++ b/trytond_project_revenue.egg-info/SOURCES.txt
@@ -1,12 +1,18 @@
+.drone.yml
+.hgtags
CHANGELOG
COPYRIGHT
INSTALL
LICENSE
MANIFEST.in
README
+__init__.py
+purchase.py
purchase.xml
setup.py
+tox.ini
tryton.cfg
+work.py
work.xml
./__init__.py
./purchase.py
@@ -58,6 +64,8 @@ locale/nl_NL.po
locale/pt_BR.po
locale/ru_RU.po
locale/sl_SI.po
+tests/__init__.py
+tests/test_project_revenue.py
trytond_project_revenue.egg-info/PKG-INFO
trytond_project_revenue.egg-info/SOURCES.txt
trytond_project_revenue.egg-info/dependency_links.txt
diff --git a/trytond_project_revenue.egg-info/requires.txt b/trytond_project_revenue.egg-info/requires.txt
index 9228461..070c58a 100644
--- a/trytond_project_revenue.egg-info/requires.txt
+++ b/trytond_project_revenue.egg-info/requires.txt
@@ -4,4 +4,4 @@ trytond_timesheet >= 3.8, < 3.9
trytond_timesheet_cost >= 3.8, < 3.9
trytond_company >= 3.8, < 3.9
trytond_product >= 3.8, < 3.9
-trytond >= 3.8, < 3.9
\ No newline at end of file
+trytond >= 3.8, < 3.9
diff --git a/work.py b/work.py
index 7cac750..ec6ca8e 100644
--- a/work.py
+++ b/work.py
@@ -154,9 +154,14 @@ class Work:
@classmethod
def _get_revenue(cls, works):
- return {w.id: (w.list_price * Decimal(str(w.effort_hours))
- if w.list_price else Decimal(0))
- for w in works}
+ revenues = {}
+ for work in works:
+ if work.list_price:
+ revenues[work.id] = work.company.currency.round(
+ work.list_price * Decimal(str(work.effort_hours)))
+ else:
+ revenues[work.id] = Decimal(0)
+ return revenues
@fields.depends('company')
def on_change_with_currency_digits(self, name=None):
--
tryton-modules-project-revenue
More information about the tryton-debian-vcs
mailing list