From 56575ac68d2d544d7d5b1d192aea901b9569c4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 24 Oct 2011 23:14:02 +0200 Subject: [PATCH 1/6] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 37c3ed02ea..91312ff292 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@b2ck.com', 'website': 'http://www.tryton.org/', From dcd49ddb4c6f4bc921cf37e824168b8029d71eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Tr=C3=A9segnie?= Date: Thu, 19 Apr 2012 19:40:39 +0200 Subject: [PATCH 2/6] Add length check for SIREN and SIRET issue2342 review333001 (transplanted from 9e2eb48f66375d71717e6ca769bb7710c41aaaa5) --- address.py | 5 +++-- party.py | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/address.py b/address.py index 3200bc1cf4..0f39bcea3a 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 d9a34e6dac..64b68f851b 100644 --- a/party.py +++ b/party.py @@ -26,8 +26,10 @@ 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 + print party.addresses return True Party() From 6d3898cf88d66c2f202576be4b28c7c9f327a7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 4 May 2012 18:36:23 +0200 Subject: [PATCH 3/6] Remove print statement (transplanted from 2817fb641765c90800e30ea437070e4f527e5b1e) --- party.py | 1 - 1 file changed, 1 deletion(-) diff --git a/party.py b/party.py index 64b68f851b..66a81ff87e 100644 --- a/party.py +++ b/party.py @@ -29,7 +29,6 @@ class Party(Model): if party.siren: if len(party.siren) != 9 or not luhn.validate(party.siren): return False - print party.addresses return True Party() From 5985fe3e53f9032e0200fdada9655cbb4242e94d Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:53 +0200 Subject: [PATCH 4/6] Prepare release 2.2.1 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 235fcce6f7..9296c78056 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 b088e8ef33..5c1aee7ca2 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 From 8452255f43baf9445c4ed97db00cf41fd8e6fae4 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:53 +0200 Subject: [PATCH 5/6] Added tag 2.2.1 for changeset ef5e007317f5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cf4f5696d4..354e043898 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ 0d99ac86e70b9f26f4f20284cefe4983f2fddfba 1.8.0 521c51caefbbdef62be2ab722f230e8bf332310d 2.0.0 28eb605769dc6c2d02563597e37be74aa7fe9d43 2.2.0 +ef5e007317f547fe40fc7963b3765ab51fb65be0 2.2.1 From 1aeb7b9f940ee32151ccf57219252db745d19b7a Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:57 +0200 Subject: [PATCH 6/6] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 91312ff292..2f81facfa2 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.1', + 'version': '2.2.2', 'author' : 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/',