[tryton-debian-vcs] tryton-modules-product-measurements branch upstream updated. upstream/3.0.0-1-gb75c5f6

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:08:52 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-product-measurements.git;a=commitdiff;h=upstream/3.0.0-1-gb75c5f6

commit b75c5f6d0cf0506e8684f2dda99a117ecacfa5cf
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 22 14:22:36 2014 +0200

    Adding upstream version 3.2.0.

diff --git a/CHANGELOG b/CHANGELOG
index 8258af5..6811c91 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.0 - 2014-04-21
+* Bug fixes (see mercurial logs for details)
+
 Version 3.0.0 - 2013-10-21
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 87a90a4..3731ce2 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
-Copyright (C) 2011-2013 Cédric Krier.
+Copyright (C) 2011-2014 Cédric Krier.
 Copyright (C) 2011-2012 Bertrand Chenal.
 Copyright (C) 2011 Nicolas Évrard.
-Copyright (C) 2011-2013 B2CK SPRL.
+Copyright (C) 2011-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 2eb7351..cfd1a29 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_product_measurements
 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_product (http://www.tryton.org/)
 
diff --git a/MANIFEST.in b/MANIFEST.in
index 732a76e..8db8a3e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,13 +1,11 @@
 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/*
 include icons/*
diff --git a/PKG-INFO b/PKG-INFO
index 1ef26a3..1f0704f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_product_measurements
-Version: 3.0.0
+Version: 3.2.0
 Summary: Tryton module to add measurements to product
 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_product_measurements
         ============================
         
@@ -43,6 +43,7 @@ Description: trytond_product_measurements
         
           http://www.tryton.org/
         
+Keywords: tryton product measurement
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Plugins
@@ -62,6 +63,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 16d8b01..803ecc8 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -8,7 +8,7 @@ msgstr "Höhe"
 
 msgctxt "field:product.template,height_digits:"
 msgid "Height Digits"
-msgstr "Höhe Stellen"
+msgstr "Nachkommastellen Höhe"
 
 msgctxt "field:product.template,height_uom:"
 msgid "Height Uom"
@@ -20,7 +20,7 @@ msgstr "Länge"
 
 msgctxt "field:product.template,length_digits:"
 msgid "Length Digits"
-msgstr "Länge Stellen"
+msgstr "Nachkommastellen Länge"
 
 msgctxt "field:product.template,length_uom:"
 msgid "Length Uom"
@@ -32,7 +32,7 @@ msgstr "Gewicht"
 
 msgctxt "field:product.template,weight_digits:"
 msgid "Weight Digits"
-msgstr "Gewicht Stellen"
+msgstr "Nachkommastellen Gewicht"
 
 msgctxt "field:product.template,weight_uom:"
 msgid "Weight Uom"
@@ -44,7 +44,7 @@ msgstr "Breite"
 
 msgctxt "field:product.template,width_digits:"
 msgid "Width Digits"
-msgstr "Breite Stellen"
+msgstr "Nachkommastellen Breite"
 
 msgctxt "field:product.template,width_uom:"
 msgid "Width Uom"
diff --git a/product.py b/product.py
index 41471df..bb1bd4a 100644
--- a/product.py
+++ b/product.py
@@ -26,8 +26,8 @@ class Template:
             'required': Bool(Eval('length')),
             },
         depends=['type', 'length'])
-    length_digits = fields.Function(fields.Integer('Length Digits',
-            on_change_with=['length_uom']), 'on_change_with_length_digits')
+    length_digits = fields.Function(fields.Integer('Length Digits'),
+        'on_change_with_length_digits')
     height = fields.Float('Height',
         digits=(16, Eval('height_digits', 2)),
         states={
@@ -41,8 +41,8 @@ class Template:
             'required': Bool(Eval('height')),
             },
         depends=['type', 'height'])
-    height_digits = fields.Function(fields.Integer('Height Digits',
-            on_change_with=['height_uom']), 'on_change_with_height_digits')
+    height_digits = fields.Function(fields.Integer('Height Digits'),
+        'on_change_with_height_digits')
     width = fields.Float('Width',
         digits=(16, Eval('width_digits', 2)),
         states={
@@ -56,8 +56,8 @@ class Template:
             'required': Bool(Eval('width')),
             },
         depends=['type', 'width'])
-    width_digits = fields.Function(fields.Integer('Width Digits',
-            on_change_with=['width_uom']), 'on_change_with_width_digits')
+    width_digits = fields.Function(fields.Integer('Width Digits'),
+        'on_change_with_width_digits')
     weight = fields.Float('Weight',
         digits=(16, Eval('weight_digits', 2)),
         states={
@@ -71,9 +71,10 @@ class Template:
             'required': Bool(Eval('weight')),
             },
         depends=['type', 'weight'])
-    weight_digits = fields.Function(fields.Integer('Weight Digits',
-            on_change_with=['weight_uom']), 'on_change_with_weight_digits')
+    weight_digits = fields.Function(fields.Integer('Weight Digits'),
+        'on_change_with_weight_digits')
 
+    @fields.depends('length_uom')
     def on_change_with_length_digits(self, name=None):
         return (self.length_uom.digits if self.length_uom
             else self.default_length_digits())
@@ -82,6 +83,7 @@ class Template:
     def default_length_digits():
         return 2
 
+    @fields.depends('height_uom')
     def on_change_with_height_digits(self, name=None):
         return (self.height_uom.digits if self.height_uom
             else self.default_height_digits())
@@ -90,6 +92,7 @@ class Template:
     def default_height_digits():
         return 2
 
+    @fields.depends('width_uom')
     def on_change_with_width_digits(self, name=None):
         return (self.width_uom.digits if self.width_uom
             else self.default_width_digits())
@@ -98,6 +101,7 @@ class Template:
     def default_width_digits():
         return 2
 
+    @fields.depends('weight_uom')
     def on_change_with_weight_digits(self, name=None):
         return (self.weight_uom.digits if self.weight_uom
             else self.default_weight_digits())
diff --git a/setup.py b/setup.py
index a06f4b8..2029088 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_product_measurements'
+
+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_product_measurements',
-    version=info.get('version', '0.0.1'),
+setup(name=name,
+    version=version,
     description='Tryton module to add measurements to product',
     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 product measurement',
     package_dir={'trytond.modules.product_measurements': '.'},
     packages=[
         'trytond.modules.product_measurements',
@@ -66,7 +84,6 @@ setup(name='trytond_product_measurements',
         '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_measurements.py b/tests/test_measurements.py
index 103a98d..2e29bfa 100644
--- a/tests/test_measurements.py
+++ b/tests/test_measurements.py
@@ -1,37 +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 ProductMeasurementsTestCase(unittest.TestCase):
-    '''
-    Test ProductMeasurements module.
-    '''
+    'Test ProductMeasurements module'
 
     def setUp(self):
         trytond.tests.test_tryton.install_module('product_measurements')
 
     def test0005views(self):
-        '''
-        Test views.
-        '''
+        'Test views'
         test_view('product_measurements')
 
     def test0006depends(self):
-        '''
-        Test depends.
-        '''
+        'Test depends'
         test_depends()
 
 
@@ -40,6 +25,3 @@ def suite():
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
         ProductMeasurementsTestCase))
     return suite
-
-if __name__ == '__main__':
-    unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index a200876..79e4ced 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.0.0
+version=3.2.0
 depends:
     ir
     product
diff --git a/trytond_product_measurements.egg-info/PKG-INFO b/trytond_product_measurements.egg-info/PKG-INFO
index 0c1c66f..646289c 100644
--- a/trytond_product_measurements.egg-info/PKG-INFO
+++ b/trytond_product_measurements.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-product-measurements
-Version: 3.0.0
+Version: 3.2.0
 Summary: Tryton module to add measurements to product
 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_product_measurements
         ============================
         
@@ -43,6 +43,7 @@ Description: trytond_product_measurements
         
           http://www.tryton.org/
         
+Keywords: tryton product measurement
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Plugins
@@ -62,6 +63,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_product_measurements.egg-info/requires.txt b/trytond_product_measurements.egg-info/requires.txt
index a69ed06..8453a9a 100644
--- a/trytond_product_measurements.egg-info/requires.txt
+++ b/trytond_product_measurements.egg-info/requires.txt
@@ -1,2 +1,2 @@
-trytond_product >= 3.0, < 3.1
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond_product >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
-- 
tryton-modules-product-measurements



More information about the tryton-debian-vcs mailing list