[tryton-debian-vcs] tryton-modules-timesheet-cost branch debian updated. debian/3.0.1-2-4-g2469703
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:11:49 UTC 2014
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-timesheet-cost.git;a=commitdiff;h=debian/3.0.1-2-4-g2469703
commit 246970365acbab8a13607f701caa619ea44b059f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 15:00:31 2014 +0200
Bumping minimal required Python version to 2.7.
diff --git a/debian/control b/debian/control
index bb5a721..86ffe06 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Standards-Version: 3.9.5
Homepage: http://www.tryton.org/
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=tryton/tryton-modules-timesheet-cost.git
Vcs-Git: git://anonscm.debian.org/tryton/tryton-modules-timesheet-cost.git
-X-Python-Version: >= 2.6
+X-Python-Version: >= 2.7
Package: tryton-modules-timesheet-cost
Architecture: all
commit 532e2ea9cd1e376fc948902f14c8dcf633e83133
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:47:12 2014 +0200
Updating copyright.
diff --git a/debian/copyright b/debian/copyright
index 4ef129e..2ee028e 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-2013 Cédric Krier
- 2008-2013 B2CK SPRL
+Copyright: 2008-2014 Cédric Krier
+ 2008-2014 B2CK SPRL
License: GPL-3+
Files: debian/*
commit 1e5d86dd6ffbb510cfcba8aad570fc77ba5a5309
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:24:13 2014 +0200
Merging upstream version 3.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index be7289e..a77894f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 3.0.1 - 2013-12-04
+Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
Version 3.0.0 - 2013-10-21
diff --git a/COPYRIGHT b/COPYRIGHT
index cf5f3f9..8d7bc43 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2008-2013 Cédric Krier.
-Copyright (C) 2008-2013 B2CK SPRL.
+Copyright (C) 2008-2014 Cédric Krier.
+Copyright (C) 2008-2014 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/INSTALL b/INSTALL
index 1a690a5..dfd0a5a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_timesheet_cost
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_timesheet (http://www.tryton.org/)
* trytond_company (http://www.tryton.org/)
diff --git a/PKG-INFO b/PKG-INFO
index c664541..74cbbf1 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_timesheet_cost
-Version: 3.0.1
+Version: 3.2.0
Summary: Tryton module to add cost on timesheet
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_timesheet_cost
======================
@@ -43,6 +43,7 @@ Description: trytond_timesheet_cost
http://www.tryton.org/
+Keywords: tryton timesheet cost
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/company.py b/company.py
index e3d4798..e5825fb 100644
--- a/company.py
+++ b/company.py
@@ -19,8 +19,8 @@ class Employee:
help="Hourly cost price for this Employee"), 'get_cost_price')
cost_prices = fields.One2Many('company.employee_cost_price', 'employee',
'Cost Prices', help="List of hourly cost price over time")
- 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')
_cost_prices_cache = Cache('company_employee.cost_prices')
def get_cost_price(self, name):
@@ -68,6 +68,7 @@ class Employee:
break
return cost
+ @fields.depends('company')
def on_change_with_currency_digits(self, name=None):
if self.company:
return self.company.currency.digits
@@ -93,8 +94,8 @@ class EmployeeCostPrice(ModelSQL, ModelView):
required=True, depends=['currency_digits'],
help="Hourly cost price")
employee = fields.Many2One('company.employee', 'Employee')
- currency_digits = fields.Function(fields.Integer('Currency Digits',
- on_change_with=['employee']), 'on_change_with_currency_digits')
+ currency_digits = fields.Function(fields.Integer('Currency Digits'),
+ 'on_change_with_currency_digits')
@classmethod
def __register__(cls, module_name):
@@ -139,11 +140,12 @@ class EmployeeCostPrice(ModelSQL, ModelView):
return prices
@classmethod
- def write(cls, prices, vals):
+ def write(cls, *args):
Employee = Pool().get('company.employee')
- super(EmployeeCostPrice, cls).write(prices, vals)
+ super(EmployeeCostPrice, cls).write(*args)
Employee._cost_prices_cache.clear()
+ @fields.depends('employee')
def on_change_with_currency_digits(self, name=None):
if self.employee:
return self.employee.company.currency.digits
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index dc539b9..5afc02e 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -60,15 +60,15 @@ msgstr "Usuari modificació"
msgctxt "help:company.employee,cost_price:"
msgid "Hourly cost price for this Employee"
-msgstr "Preu de cost per hora per a aquest empleat"
+msgstr "Preu de cost per hora per a aquest empleat."
msgctxt "help:company.employee,cost_prices:"
msgid "List of hourly cost price over time"
-msgstr "Llista de preu de cost per hora a través del temps"
+msgstr "Llista de preus de cost per hora a través del temps."
msgctxt "help:company.employee_cost_price,cost_price:"
msgid "Hourly cost price"
-msgstr "Preu de cost per hora"
+msgstr "Preu de cost per hora."
msgctxt "model:company.employee_cost_price,name:"
msgid "Employee Cost Price"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 34fc113..e86c29b 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -18,11 +18,11 @@ msgstr "Kostenpreise"
msgctxt "field:company.employee,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
msgctxt "field:company.employee_cost_price,cost_price:"
msgid "Cost Price"
-msgstr "Einkaufspreis"
+msgstr "Kostenpreis"
msgctxt "field:company.employee_cost_price,create_date:"
msgid "Create Date"
@@ -34,7 +34,7 @@ msgstr "Erstellt durch"
msgctxt "field:company.employee_cost_price,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
msgctxt "field:company.employee_cost_price,date:"
msgid "Date"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index f7cbb24..28f7641 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -4,23 +4,23 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:company.employee_cost_price:"
msgid "A employee can only have one cost price by date."
-msgstr ""
+msgstr "Un empleado solo puede tener un costo por fecha."
msgctxt "field:company.employee,cost_price:"
msgid "Cost Price"
-msgstr "Precio de Costo"
+msgstr "Costo"
msgctxt "field:company.employee,cost_prices:"
msgid "Cost Prices"
-msgstr "Precios de Costo"
+msgstr "Costos"
msgctxt "field:company.employee,currency_digits:"
msgid "Currency Digits"
-msgstr "Gestión de Moneda"
+msgstr "Decimales de Moneda"
msgctxt "field:company.employee_cost_price,cost_price:"
msgid "Cost Price"
-msgstr "Precio de Costo"
+msgstr "Costo"
msgctxt "field:company.employee_cost_price,create_date:"
msgid "Create Date"
@@ -48,7 +48,7 @@ msgstr "ID"
msgctxt "field:company.employee_cost_price,rec_name:"
msgid "Name"
-msgstr "Nombre de Contacto"
+msgstr "Nombre"
msgctxt "field:company.employee_cost_price,write_date:"
msgid "Write Date"
@@ -80,4 +80,4 @@ msgstr "Costo"
msgctxt "view:company.employee_cost_price:"
msgid "Cost Prices"
-msgstr "Precio de Costo"
+msgstr "Costos"
diff --git a/setup.py b/setup.py
index 43e1c43..5477d3a 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_timesheet_cost'
+
+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_timesheet_cost',
- version=info.get('version', '0.0.1'),
+setup(name=name,
+ version=version,
description='Tryton module to add cost on timesheet',
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 timesheet cost',
package_dir={'trytond.modules.timesheet_cost': '.'},
packages=[
'trytond.modules.timesheet_cost',
@@ -67,7 +85,6 @@ setup(name='trytond_timesheet_cost',
'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_timesheet_cost.py b/tests/test_timesheet_cost.py
index ab24c60..41c57eb 100644
--- a/tests/test_timesheet_cost.py
+++ b/tests/test_timesheet_cost.py
@@ -1,14 +1,5 @@
-#!/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 datetime
from decimal import Decimal
@@ -20,9 +11,7 @@ from trytond.transaction import Transaction
class TimesheetCostTestCase(unittest.TestCase):
- '''
- Test TimesheetCost module.
- '''
+ 'Test TimesheetCost module'
def setUp(self):
trytond.tests.test_tryton.install_module('timesheet_cost')
@@ -34,21 +23,15 @@ class TimesheetCostTestCase(unittest.TestCase):
self.line = POOL.get('timesheet.line')
def test0005views(self):
- '''
- Test views.
- '''
+ 'Test views'
test_view('timesheet_cost')
def test0006depends(self):
- '''
- Test depends.
- '''
+ 'Test depends'
test_depends()
def test0010compute_cost_price(self):
- '''
- Test compute_cost_price
- '''
+ 'Test compute_cost_price'
cost_prices = [
(datetime.date(2011, 1, 1), Decimal(10)),
(datetime.date(2012, 1, 1), Decimal(15)),
@@ -64,7 +47,9 @@ class TimesheetCostTestCase(unittest.TestCase):
(datetime.date(2013, 6, 1), Decimal(20)),
]
with Transaction().start(DB_NAME, USER, context=CONTEXT):
- company, = self.company.search([('rec_name', '=', 'B2CK')])
+ company, = self.company.search([
+ ('rec_name', '=', 'Dunder Mifflin'),
+ ])
party = self.party(name='Pam Beesly')
party.save()
employee = self.employee(party=party.id,
@@ -88,6 +73,3 @@ def suite():
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
TimesheetCostTestCase))
return suite
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 886d243..24194ea 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.1
+version=3.2.0
depends:
ir
company
diff --git a/trytond_timesheet_cost.egg-info/PKG-INFO b/trytond_timesheet_cost.egg-info/PKG-INFO
index f72a5d7..77efbee 100644
--- a/trytond_timesheet_cost.egg-info/PKG-INFO
+++ b/trytond_timesheet_cost.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-timesheet-cost
-Version: 3.0.1
+Version: 3.2.0
Summary: Tryton module to add cost on timesheet
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_timesheet_cost
======================
@@ -43,6 +43,7 @@ Description: trytond_timesheet_cost
http://www.tryton.org/
+Keywords: tryton timesheet cost
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_timesheet_cost.egg-info/requires.txt b/trytond_timesheet_cost.egg-info/requires.txt
index 9ff4458..ecd713b 100644
--- a/trytond_timesheet_cost.egg-info/requires.txt
+++ b/trytond_timesheet_cost.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_company >= 3.0, < 3.1
-trytond_timesheet >= 3.0, < 3.1
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond_company >= 3.2, < 3.3
+trytond_timesheet >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
--
tryton-modules-timesheet-cost
More information about the tryton-debian-vcs
mailing list