[tryton-debian-vcs] tryton-modules-party-siret branch upstream-2.2 created. bcea86bde7ddb44782db443c8a69b7cdfaf425a5

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:03:54 UTC 2013


The following commit has been merged in the upstream-2.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-party-siret.git;a=commitdiff;h=bcea86bde7ddb44782db443c8a69b7cdfaf425a5
commit bcea86bde7ddb44782db443c8a69b7cdfaf425a5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 9 12:01:17 2012 +0200

    Adding upstream version 2.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index 235fcce..9296c78 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.1 - 2012-05-07
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.0 - 2011-10-24
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index b088e8e..5c1aee7 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2010-2011 Cédric Krier.
+Copyright (C) 2010-2012 Cédric Krier.
 Copyright (C) 2010-2011 Bertrand Chenal.
-Copyright (C) 2010-2011 B2CK SPRL.
+Copyright (C) 2010-2012 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 c07078d..68d98e4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_party_siret
-Version: 2.2.0
+Version: 2.2.1
 Summary: 
 Add SIRET/SIREN number fields on party.
     These numbers are used in France, for geographical identification of
diff --git a/__tryton__.py b/__tryton__.py
index 37c3ed0..91312ff 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
     'name_es_CO' : 'Terceros - SIRET',
     'name_es_ES': 'Terceros - SIRET',
     'name_fr_FR': 'Tiers - Siret',
-    'version' : '2.2.0',
+    'version' : '2.2.1',
     'author' : 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/address.py b/address.py
index 3200bc1..0f39bce 100644
--- a/address.py
+++ b/address.py
@@ -36,8 +36,9 @@ class Address(Model):
         Check validity of SIRET
         '''
         for address in self.browse(ids):
-            if address.siret and not luhn.validate(address.siret):
-                return False
+            if address.siret:
+                if len(address.siret) != 14 or not luhn.validate(address.siret):
+                    return False
         return True
 
 Address()
diff --git a/party.py b/party.py
index d9a34e6..66a81ff 100644
--- a/party.py
+++ b/party.py
@@ -26,8 +26,9 @@ class Party(Model):
         Check validity of SIREN
         '''
         for party in self.browse(ids):
-            if party.siren and not luhn.validate(party.siren):
-                return False
+            if party.siren:
+                if len(party.siren) != 9 or not luhn.validate(party.siren):
+                    return False
         return True
 
 Party()
diff --git a/trytond_party_siret.egg-info/PKG-INFO b/trytond_party_siret.egg-info/PKG-INFO
index 0619d59..635528b 100644
--- a/trytond_party_siret.egg-info/PKG-INFO
+++ b/trytond_party_siret.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-party-siret
-Version: 2.2.0
+Version: 2.2.1
 Summary: 
 Add SIRET/SIREN number fields on party.
     These numbers are used in France, for geographical identification of
-- 
tryton-modules-party-siret



More information about the tryton-debian-vcs mailing list