[tryton-debian-vcs] tryton-modules-project-revenue branch upstream updated. upstream/3.0.1-1-gf316978
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:09:24 UTC 2014
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-project-revenue.git;a=commitdiff;h=upstream/3.0.1-1-gf316978
commit f3169785d12e3b9a2198cc79c4314352be2b3c15
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:22:54 2014 +0200
Adding upstream version 3.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index 905a10d..b602191 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 3.0.1 - 2014-03-22
+Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
Version 3.0.0 - 2013-10-21
diff --git a/INSTALL b/INSTALL
index f9df19b..75ade06 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_project_revenue
Prerequisites
-------------
- * Python 2.6 or later (http://www.python.org/)
+ * Python 2.7 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
* trytond_project (http://www.tryton.org/)
* trytond_timesheet (http://www.tryton.org/)
diff --git a/MANIFEST.in b/MANIFEST.in
index 2569955..e013c00 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,12 +1,10 @@
include INSTALL
include README
-include TODO
include COPYRIGHT
include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
-include *.odt
include locale/*.po
include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 0e3cfd3..0806b73 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_project_revenue
-Version: 3.0.1
-Summary: Tryton module to add cost/revenue on project
+Version: 3.2.0
+Summary: Tryton module to add revenue on project
Home-page: http://www.tryton.org/
Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
Description: trytond_project_revenue
=======================
@@ -43,6 +43,7 @@ Description: trytond_project_revenue
http://www.tryton.org/
+Keywords: tryton project revenue
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -63,6 +64,5 @@ Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 4227c32..dfbad15 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -8,7 +8,7 @@ msgstr "Kosten"
msgctxt "field:project.work,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
msgctxt "field:project.work,list_price:"
msgid "List Price"
diff --git a/setup.py b/setup.py
index 65568cf..4e0e08d 100644
--- a/setup.py
+++ b/setup.py
@@ -11,33 +11,51 @@ import ConfigParser
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+def get_require_version(name):
+ if minor_version % 2:
+ require = '%s >= %s.%s.dev0, < %s.%s'
+ else:
+ require = '%s >= %s.%s, < %s.%s'
+ require %= (name, major_version, minor_version,
+ major_version, minor_version + 1)
+ return require
+
config = ConfigParser.ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
-major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+version = info.get('version', '0.0.1')
+major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
+name = 'trytond_project_revenue'
+
+download_url = 'http://downloads.tryton.org/%s.%s/' % (
+ major_version, minor_version)
+if minor_version % 2:
+ version = '%s.%s.dev0' % (major_version, minor_version)
+ download_url = (
+ 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
+ name[8:], name, version))
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
- requires.append('trytond_%s >= %s.%s, < %s.%s' %
- (dep, major_version, minor_version, major_version,
- minor_version + 1))
-requires.append('trytond >= %s.%s, < %s.%s' %
- (major_version, minor_version, major_version, minor_version + 1))
+ requires.append(get_require_version('trytond_%s' % dep))
+requires.append(get_require_version('trytond'))
-setup(name='trytond_project_revenue',
- version=info.get('version', '0.0.1'),
- description='Tryton module to add cost/revenue on project',
+setup(name=name,
+ version=version,
+ description='Tryton module to add revenue on project',
long_description=read('README'),
author='Tryton',
+ author_email='issue_tracker at tryton.org',
url='http://www.tryton.org/',
- download_url=("http://downloads.tryton.org/" +
- info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
+ download_url=download_url,
+ keywords='tryton project revenue',
package_dir={'trytond.modules.project_revenue': '.'},
packages=[
'trytond.modules.project_revenue',
@@ -67,7 +85,6 @@ setup(name='trytond_project_revenue',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
],
diff --git a/tests/test_project_revenue.py b/tests/test_project_revenue.py
index 94cdec1..bb6d212 100644
--- a/tests/test_project_revenue.py
+++ b/tests/test_project_revenue.py
@@ -1,38 +1,22 @@
-#!/usr/bin/env python
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
-
-import sys
-import os
-DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
- '..', '..', '..', '..', '..', 'trytond')))
-if os.path.isdir(DIR):
- sys.path.insert(0, os.path.dirname(DIR))
-
import unittest
-
import trytond.tests.test_tryton
from trytond.tests.test_tryton import test_view, test_depends
class ProjectRevenueTestCase(unittest.TestCase):
- '''
- Test ProjectRevenue module.
- '''
+ 'Test ProjectRevenue module'
def setUp(self):
trytond.tests.test_tryton.install_module('project_revenue')
def test0005views(self):
- '''
- Test views.
- '''
+ 'Test views'
test_view('project_revenue')
def test0006depends(self):
- '''
- Test depends.
- '''
+ 'Test depends'
test_depends()
@@ -41,6 +25,3 @@ def suite():
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
ProjectRevenueTestCase))
return suite
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 3544fe8..458b898 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.1
+version=3.2.0
depends:
ir
project
diff --git a/trytond_project_revenue.egg-info/PKG-INFO b/trytond_project_revenue.egg-info/PKG-INFO
index b9160c4..af0cb0b 100644
--- a/trytond_project_revenue.egg-info/PKG-INFO
+++ b/trytond_project_revenue.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-project-revenue
-Version: 3.0.1
-Summary: Tryton module to add cost/revenue on project
+Version: 3.2.0
+Summary: Tryton module to add revenue on project
Home-page: http://www.tryton.org/
Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
Description: trytond_project_revenue
=======================
@@ -43,6 +43,7 @@ Description: trytond_project_revenue
http://www.tryton.org/
+Keywords: tryton project revenue
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -63,6 +64,5 @@ Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
diff --git a/trytond_project_revenue.egg-info/requires.txt b/trytond_project_revenue.egg-info/requires.txt
index 40d7800..76139b4 100644
--- a/trytond_project_revenue.egg-info/requires.txt
+++ b/trytond_project_revenue.egg-info/requires.txt
@@ -1,6 +1,6 @@
-trytond_project >= 3.0, < 3.1
-trytond_timesheet >= 3.0, < 3.1
-trytond_timesheet_cost >= 3.0, < 3.1
-trytond_company >= 3.0, < 3.1
-trytond_product >= 3.0, < 3.1
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond_project >= 3.2, < 3.3
+trytond_timesheet >= 3.2, < 3.3
+trytond_timesheet_cost >= 3.2, < 3.3
+trytond_company >= 3.2, < 3.3
+trytond_product >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
diff --git a/work.py b/work.py
index c89dc9f..01facb1 100644
--- a/work.py
+++ b/work.py
@@ -23,8 +23,7 @@ class Work:
states={
'invisible': ~Eval('timesheet_available'),
},
- depends=['timesheet_available'],
- on_change=['product', 'party', 'hours', 'company'])
+ depends=['timesheet_available'])
list_price = fields.Numeric('List Price',
digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'])
revenue = fields.Function(fields.Numeric('Revenue',
@@ -36,8 +35,8 @@ class Work:
},
digits=(16, Eval('currency_digits', 2)),
depends=['currency_digits', 'timesheet_available']), 'get_cost')
- currency_digits = fields.Function(fields.Integer('Currency Digits',
- on_change_with=['company']), 'on_change_with_currency_digits')
+ currency_digits = fields.Function(fields.Integer('Currency Digits'),
+ 'on_change_with_currency_digits')
@classmethod
def get_cost(cls, works, name):
@@ -101,6 +100,7 @@ class Work:
return cls.sum_tree(works, getter)
+ @fields.depends('company')
def on_change_with_currency_digits(self, name=None):
if self.company:
return self.company.currency.digits
@@ -115,6 +115,7 @@ class Work:
return company.currency.digits
return 2
+ @fields.depends('product', 'party', 'hours', 'company')
def on_change_product(self):
pool = Pool()
User = pool.get('res.user')
--
tryton-modules-project-revenue
More information about the tryton-debian-vcs
mailing list