[IMP]account_followup: remove address

bzr revid: sbh@tinyerp.com-20120330050955-fsld4gti0phnu34h
This commit is contained in:
Sbh (Openerp) 2012-03-30 10:39:55 +05:30
parent 964b385d5c
commit bba2e9ce07
2 changed files with 10 additions and 11 deletions

View File

@ -89,8 +89,8 @@ class account_followup_stat_by_partner(osv.osv):
tools.drop_view_if_exists(cr, 'account_followup_stat_by_partner') 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 # 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, # 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 # 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 # 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. # reach 10 000 records is made, what should be enough for a time.
cr.execute(""" cr.execute("""
create or replace view account_followup_stat_by_partner as ( 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: for line in data_lines:
total_amt += line.debit - line.credit total_amt += line.debit - line.credit
dest = False dest = False
if partner.address: if partner:
for adr in partner.address: if partner.type=='contact':
if adr.type=='contact': if adr.email:
if adr.email: dest = [partner.email]
dest = [adr.email] if (not dest) and partner.type=='default':
if (not dest) and adr.type=='default': if partner.email:
if adr.email: dest = [partner.email]
dest = [adr.email]
src = tools.config.options['email_from'] src = tools.config.options['email_from']
if not data.partner_lang: if not data.partner_lang:
body = data.email_body body = data.email_body

View File

@ -219,7 +219,7 @@ class payment_line(osv.osv):
break break
partner = line.partner_id.name or '' partner = line.partner_id.name or ''
if line.partner_id: if line.partner_id:
#for ads in line.partner_id.address: #for ads in line.partner_id:
if line.partner_id.type == 'default': if line.partner_id.type == 'default':
st = line.partner_id.street and line.partner_id.street or '' st = line.partner_id.street and line.partner_id.street or ''
st1 = line.partner_id.street2 and line.partner_id.street2 or '' st1 = line.partner_id.street2 and line.partner_id.street2 or ''