summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSbh (Openerp) <sbh@tinyerp.com>2012-03-30 10:39:55 +0530
committerSbh (Openerp) <sbh@tinyerp.com>2012-03-30 10:39:55 +0530
commitbba2e9ce07bde7a6ef4b1910a1cf87da8d9ee1a3 (patch)
tree374de76f9a893afce44bac1545ea0fbcff7516ed
parent964b385d5ccb4339c3325f24eed06f3904b175a3 (diff)
[IMP]account_followup: remove address
bzr revid: sbh@tinyerp.com-20120330050955-fsld4gti0phnu34h
-rw-r--r--addons/account_followup/wizard/account_followup_print.py19
-rw-r--r--addons/account_payment/account_payment.py2
2 files changed, 10 insertions, 11 deletions
diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py
index 1a5f3c0b60b..088ff868ca0 100644
--- a/addons/account_followup/wizard/account_followup_print.py
+++ b/addons/account_followup/wizard/account_followup_print.py
@@ -89,8 +89,8 @@ class account_followup_stat_by_partner(osv.osv):
tools.drop_view_if_exists(cr, 'account_followup_stat_by_partner')
# Here we don't have other choice but to create a virtual ID based on the concatenation
# of the partner_id and the company_id, because if a partner is shared between 2 companies,
- # we want to see 2 lines for him in this table. It means that both company should be able
- # to send him followups separately . An assumption that the number of companies will not
+ # we want to see 2 lines for him in this table. It means that both company should be able
+ # to send him followups separately . An assumption that the number of companies will not
# reach 10 000 records is made, what should be enough for a time.
cr.execute("""
create or replace view account_followup_stat_by_partner as (
@@ -234,14 +234,13 @@ class account_followup_print_all(osv.osv_memory):
for line in data_lines:
total_amt += line.debit - line.credit
dest = False
- if partner.address:
- for adr in partner.address:
- if adr.type=='contact':
- if adr.email:
- dest = [adr.email]
- if (not dest) and adr.type=='default':
- if adr.email:
- dest = [adr.email]
+ if partner:
+ if partner.type=='contact':
+ if adr.email:
+ dest = [partner.email]
+ if (not dest) and partner.type=='default':
+ if partner.email:
+ dest = [partner.email]
src = tools.config.options['email_from']
if not data.partner_lang:
body = data.email_body
diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py
index ae25c6a206a..cc645dc87ad 100644
--- a/addons/account_payment/account_payment.py
+++ b/addons/account_payment/account_payment.py
@@ -219,7 +219,7 @@ class payment_line(osv.osv):
break
partner = line.partner_id.name or ''
if line.partner_id:
- #for ads in line.partner_id.address:
+ #for ads in line.partner_id:
if line.partner_id.type == 'default':
st = line.partner_id.street and line.partner_id.street or ''
st1 = line.partner_id.street2 and line.partner_id.street2 or ''