Please review this at http://codereview.appspot.com/1891047/show

Affected files:
  M INSTALL
  M address.py
  M party.py


Index: INSTALL
===================================================================
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@
 Prerequisites
 -------------

- * Python 2.4 or later (http://www.python.org/)
+ * Python 2.5 or later (http://www.python.org/)
  * trytond (http://www.tryton.org/)
  * trytond_party (http://www.tryton.org/)

Index: address.py
===================================================================
--- a/address.py
+++ b/address.py
@@ -22,20 +22,20 @@
             'invalid_siret': 'Invalid SIRET number!',
         })

-    def get_siret(self, cursor, user, ids, name, context=None):
+    def get_siret(self, ids, name):
         res = {}
-        for address in self.browse(cursor, user, ids, context=context):
+        for address in self.browse(ids):
             if address.party.siren and address.siret_nic:
                 res[address.id] = address.party.siren + address.siret_nic
             else:
                 res[address.id] = ''
         return res

-    def check_siret(self, cursor, user, ids):
+    def check_siret(self, ids):
         '''
         Check validity of SIRET
         '''
-        for address in self.browse(cursor, user, ids):
+        for address in self.browse(ids):
             if address.siret and not luhn.validate(address.siret):
                 return False
         return True
Index: party.py
===================================================================
--- a/party.py
+++ b/party.py
@@ -21,11 +21,11 @@
             'invalid_siren': 'Invalid SIREN number!',
         })

-    def check_siren(self, cursor, user, ids):
+    def check_siren(self, ids):
         '''
         Check validity of SIREN
         '''
-        for party in self.browse(cursor, user, ids):
+        for party in self.browse(ids):
             if party.siren and not luhn.validate(party.siren):
                 return False
         return True



-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpGug6cgCYBl.pgp
Description: PGP signature

Reply via email to