[tryton-debian-vcs] tryton-modules-project-revenue branch debian-stretch-4.0 updated. debian/4.0.1-1-6-gceab797
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Sun Jan 7 12:58:35 UTC 2018
The following commit has been merged in the debian-stretch-4.0 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-project-revenue.git;a=commitdiff;h=debian/4.0.1-1-6-gceab797
commit ceab79751e3d960b9768bbe8cbc11ab8dfe96392
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Jan 6 12:09:21 2018 +0100
Releasing debian version 4.0.2-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 64a6b71..e292cb3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+tryton-modules-project-revenue (4.0.2-1) unstable; urgency=medium
+
+ * Updating to Standards-Version: 3.9.8, no changes needed.
+ * Setting the branch in the watch file to the fixed version 4.0.
+ * Add the actual upstream maintainer key to signing-key.asc.
+ * Merging upstream version 4.0.2.
+ * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sat, 06 Jan 2018 12:09:21 +0100
+
tryton-modules-project-revenue (4.0.1-1) unstable; urgency=medium
* Updating signing-key.asc with the actual upstream maintainer keys.
commit 591b081216c136d60a0a687dd000fd012804b11f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Jan 6 12:09:20 2018 +0100
Updating copyright file.
diff --git a/debian/copyright b/debian/copyright
index c27e0ae..2d48ffc 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,8 +1,8 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
-Copyright: 2008-2016 Cédric Krier
- 2008-2016 B2CK SPRL
+Copyright: 2008-2018 Cédric Krier
+ 2008-2018 B2CK SPRL
License: GPL-3+
Files: debian/*
commit 1d50530b3abb9f123c0357f8e81871c16907ea88
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Jan 6 12:09:20 2018 +0100
Merging upstream version 4.0.2.
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 1a16e08..674cc6e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.2 - 2018-01-04
+* 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 00cf5e6..812516e 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2008-2016 Cédric Krier.
-Copyright (C) 2008-2016 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 b7a644e..d66829b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_project_revenue
-Version: 4.0.1
+Version: 4.0.2
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..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 9a4f27b..74fa4b8 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.1
+version=4.0.2
depends:
ir
project
diff --git a/trytond_project_revenue.egg-info/PKG-INFO b/trytond_project_revenue.egg-info/PKG-INFO
index cdbbe8d..9bbf2e0 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: 4.0.1
+Version: 4.0.2
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 1722c0b..1d2ad81 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
@@ -62,6 +68,8 @@ locale/pt_BR.po
locale/ru_RU.po
locale/sl_SI.po
locale/zh_CN.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/work.py b/work.py
index 0f10634..9f20bae 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