diff --git a/addons/auction/auction.py b/addons/auction/auction.py
index e701e399acf..ced68d530ef 100644
--- a/addons/auction/auction.py
+++ b/addons/auction/auction.py
@@ -687,9 +687,9 @@ class auction_lots(osv.osv):
if (lot.auction_id.id, lot.ach_uid.id) in invoices:
inv_id = invoices[(lot.auction_id.id, lot.ach_uid.id)]
else:
- add = res_obj.read(cr, uid, [lot.ach_uid.id], ['address'])[0]['address']
- if not len(add):
- raise orm.except_orm(_('Missed Address !'), _('The Buyer has no Invoice Address.'))
+ add = res_obj.address_get(cr, uid, [lot.ach_uid.id], ['default'])['default']
+ if not add:
+ raise orm.except_orm(_('Missed Address !'), _('The Buyer has no Address.'))
inv = {
'name':lot.auction_id.name or '',
'reference': lot.ach_login,
diff --git a/addons/auction/auction_demo.xml b/addons/auction/auction_demo.xml
index ebc336caa72..2e720ed199b 100644
--- a/addons/auction/auction_demo.xml
+++ b/addons/auction/auction_demo.xml
@@ -109,7 +109,7 @@
Unknown
-
+
Bruxelles1
Benoit Mortie1r1
1030
@@ -118,10 +118,10 @@
(+32)2 211 34 83
Rue des Palais 44, bte 33
default
-
+
-
+
Avignon CEDEX 091
Laurent Jacot1
84911
@@ -130,10 +130,10 @@
(+33)4.32.74.10.57
85 rue du traite de Rome
default
-
+
-
+
Louvain-la-Neuve
Thomas Passot
1348
@@ -141,7 +141,7 @@
info@mediapole.net
(+32).10.45.17.73
Rue de l'Angelique, 1
-
+
diff --git a/addons/auction/wizard/auction_lots_sms_send.py b/addons/auction/wizard/auction_lots_sms_send.py
index 93faab41275..fe05e538be7 100644
--- a/addons/auction/wizard/auction_lots_sms_send.py
+++ b/addons/auction/wizard/auction_lots_sms_send.py
@@ -47,18 +47,16 @@ class auction_lots_sms_send(osv.osv_memory):
if context is None: context = {}
lot_obj = self.pool.get('auction.lots')
partner_obj = self.pool.get('res.partner')
- partner_address_obj = self.pool.get('res.partner.address')
for data in self.read(cr, uid, ids, context=context):
lots = lot_obj.read(cr, uid, context.get('active_ids', []), ['obj_num','obj_price','ach_uid'])
res = partner_obj.read(cr, uid, [l['ach_uid'][0] for l in lots if l['ach_uid']], ['gsm'], context)
-
nbr = 0
for r in res:
add = partner_obj.address_get(cr, uid, [r['id']])['default']
- addr = partner_address_obj.browse(cr, uid, add, context=context)
+ addr = partner_obj.browse(cr, uid, add, context=context)
to = addr.mobile
if to:
- tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
+ tools.sms_send(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
auction_lots_sms_send()