From d781f175ae2548d341cb1788dcfb7109499ea303 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 11:22:01 +0530 Subject: [PATCH 1/8] [IMP]account_analytic_default: remove address field from method bzr revid: kjo@tinyerp.com-20120306055201-cc5065cjq6xx8r2i --- addons/account_analytic_default/account_analytic_default.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_analytic_default/account_analytic_default.py b/addons/account_analytic_default/account_analytic_default.py index 2c4fdd4e421..c621028b2e7 100644 --- a/addons/account_analytic_default/account_analytic_default.py +++ b/addons/account_analytic_default/account_analytic_default.py @@ -73,8 +73,8 @@ class account_invoice_line(osv.osv): _inherit = "account.invoice.line" _description = "Invoice Line" - def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None): - res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context, company_id=company_id) + def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None): + res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id) rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context) if rec: res_prod['value'].update({'account_analytic_id': rec.analytic_id.id}) From f5e57cca0a4a7ac3404956f19a1112a4c1fe0d84 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 11:26:03 +0530 Subject: [PATCH 2/8] [IMP]account_analytic_plans: remove address field from method bzr revid: kjo@tinyerp.com-20120306055603-tiatrcjisq0f7h45 --- addons/account_analytic_plans/account_analytic_plans.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index a051e994f2e..3180d0458d4 100644 --- a/addons/account_analytic_plans/account_analytic_plans.py +++ b/addons/account_analytic_plans/account_analytic_plans.py @@ -307,8 +307,8 @@ class account_invoice_line(osv.osv): res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False return res - def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None): - res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context, company_id=company_id) + def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None): + res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context, company_id=company_id) rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context) if rec and rec.analytics_id: res_prod['value'].update({'analytics_id': rec.analytics_id.id}) From b961004f1d7a7c98e6872b1203c6e548fef88aba Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 11:28:47 +0530 Subject: [PATCH 3/8] [IMP]account_anglo_saxon: remove address field from method bzr revid: kjo@tinyerp.com-20120306055847-rvz9pdongih0wu9c --- addons/account_anglo_saxon/invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py index ca86bd2bceb..693283b870b 100644 --- a/addons/account_anglo_saxon/invoice.py +++ b/addons/account_anglo_saxon/invoice.py @@ -136,9 +136,9 @@ class account_invoice_line(osv.osv): res += diff_res return res - def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None): + def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None): fiscal_pool = self.pool.get('account.fiscal.position') - res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context, company_id) + res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context, company_id) if not product: return res if type in ('in_invoice','in_refund'): From d80059474dc088bbe8b909cf1f8bfb51aca178bc Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 11:53:15 +0530 Subject: [PATCH 4/8] [IMP]account_followup: remove res.partner.address bzr revid: kjo@tinyerp.com-20120306062315-7opw05rwdg69jni7 --- addons/account_followup/report/account_followup_print.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index 56004cebde3..b48d80a9084 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -45,7 +45,7 @@ class report_rappel(report_sxw.rml_parse): def _adr_get(self, stat_line, type): res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') - res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') + res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner') adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type] return adr and res_partner_address.read(self.cr, self.uid, [adr]) or [{}] From b758fdc523cfa034e08b30e8792764b35d35dd71 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 11:57:24 +0530 Subject: [PATCH 5/8] [IMP]account: set invoice address for report print bzr revid: kjo@tinyerp.com-20120306062724-u3rruqcr1k8j1h1k --- addons/account/report/account_print_invoice.rml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml index 8aa6d785d08..fc6fc3f1898 100644 --- a/addons/account/report/account_print_invoice.rml +++ b/addons/account/report/account_print_invoice.rml @@ -162,7 +162,7 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ display_address(o.partner_id) ]] + [[ display_address(o.partner_id,'invoice') ]] From 8367adba081405d477ff77cd6afd612021afb7e9 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 12:13:27 +0530 Subject: [PATCH 6/8] [IMP]account_invoice_layout: set invoice address for report bzr revid: kjo@tinyerp.com-20120306064327-x02hchrwwu5ou0s7 --- .../report/report_account_invoice_layout.rml | 8 ++++---- .../report/special_message_invoice.rml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index 2cff52d4146..6a9de4f7f41 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -193,12 +193,12 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ display_address(o.address_invoice_id) ]] + [[ display_address(o.partner_id, 'invoice') ]] - Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]] - Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]] + Tel. : [[ (o.partner_id and o.partner_id.phone) or removeParentNode('para') ]] + Fax : [[ (o.partner_id and o.partner_id.fax) or removeParentNode('para') ]] VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]] @@ -247,7 +247,7 @@ [[ o.name or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]] + [[ (o.partner_id and o.partner_id.ref) or ' ' ]] diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml index f474a44d161..bd3eb175dd0 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.rml +++ b/addons/account_invoice_layout/report/special_message_invoice.rml @@ -197,12 +197,12 @@ [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ display_address(o.address_invoice_id) ]] + [[ display_address(o.partner_id, 'invoice') ]] - Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]] - Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]] + Tel. : [[ (o.partner_id and o.partner_id.phone) or removeParentNode('para') ]] + Fax : [[ (o.partner_id and o.partner_id.fax) or removeParentNode('para') ]] VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]] @@ -251,7 +251,7 @@ [[ o.name or '' ]] - [[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]] + [[ ( o.partner_id and o.partner_id.ref) or ' ' ]] From 0ebb6e46ad930ac219ce91f5a05dc0f27e5a0499 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 12:25:26 +0530 Subject: [PATCH 7/8] [IMP]account_voucher: remove address file from yml bzr revid: kjo@tinyerp.com-20120306065526-kfghm03qof7uprju --- addons/account_voucher/test/case1_usd_usd.yml | 4 ---- addons/account_voucher/test/case2_suppl_usd_eur.yml | 4 ---- addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml | 4 ---- addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml | 4 ---- addons/account_voucher/test/case3_eur_eur.yml | 4 ---- addons/account_voucher/test/case4_cad_chf.yml | 2 -- addons/account_voucher/test/sales_payment.yml | 2 -- 7 files changed, 24 deletions(-) diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index d75c386e259..5ff48e7d35d 100644 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -73,8 +73,6 @@ - !record {model: account.invoice, id: account_invoice_jan}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-01-01' %(datetime.now().year)" @@ -108,8 +106,6 @@ - !record {model: account.invoice, id: account_invoice_feb}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-02-01' %(datetime.now().year)" diff --git a/addons/account_voucher/test/case2_suppl_usd_eur.yml b/addons/account_voucher/test/case2_suppl_usd_eur.yml index 0ad523b8004..85d710f235a 100644 --- a/addons/account_voucher/test/case2_suppl_usd_eur.yml +++ b/addons/account_voucher/test/case2_suppl_usd_eur.yml @@ -44,8 +44,6 @@ !record {model: account.invoice, id: account_first_invoice_jan_suppl}: account_id: account.a_pay type : in_invoice - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-01-01' %(datetime.now().year)" @@ -80,8 +78,6 @@ - !record {model: account.invoice, id: account_second_invoice_feb_suppl}: account_id: account.a_pay - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-02-01' %(datetime.now().year)" diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml index ac77aef622d..e420abda961 100644 --- a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml @@ -79,8 +79,6 @@ - !record {model: account.invoice, id: account_first_invoice_jan}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-01-01' %(datetime.now().year)" @@ -114,8 +112,6 @@ - !record {model: account.invoice, id: account_second_invoice_feb}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-02-01' %(datetime.now().year)" diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml index a3a32a32082..c4c94541e10 100644 --- a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml +++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml @@ -79,8 +79,6 @@ - !record {model: account.invoice, id: account_first_invoice_jan_michal}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-01-01' %(datetime.now().year)" @@ -114,8 +112,6 @@ - !record {model: account.invoice, id: account_second_invoice_feb_michal}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.USD date_invoice: !eval "'%s-02-01' %(datetime.now().year)" diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index a2fc39e1844..c99f0d968c9 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -33,8 +33,6 @@ - !record {model: account.invoice, id: account_first_invoice_jan_eur}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.EUR date_invoice: !eval "'%s-01-01' %(datetime.now().year)" @@ -68,8 +66,6 @@ - !record {model: account.invoice, id: account_second_invoice_feb_eur}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.EUR date_invoice: !eval "'%s-02-01' %(datetime.now().year)" diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index ff8db125682..9d9b4d77994 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -67,8 +67,6 @@ - !record {model: account.invoice, id: account_first_invoice_jan_cad}: account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 company_id: base.main_company currency_id: base.CAD date_invoice: !eval "'%s-01-01' %(datetime.now().year)" diff --git a/addons/account_voucher/test/sales_payment.yml b/addons/account_voucher/test/sales_payment.yml index f6025389896..8d861154a48 100644 --- a/addons/account_voucher/test/sales_payment.yml +++ b/addons/account_voucher/test/sales_payment.yml @@ -3,8 +3,6 @@ - !record {model: account.invoice, id: account_invoice_0}: account_id: account.a_recv - address_contact_id: base.res_partner_address_7 - address_invoice_id: base.res_partner_address_7 company_id: base.main_company currency_id: base.EUR invoice_line: From 48950149048874c7e9683e02941fce7fc6a537a9 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 6 Mar 2012 17:34:58 +0530 Subject: [PATCH 8/8] [IMP]account_followup: remove res_partner_address bzr revid: kjo@tinyerp.com-20120306120458-1y9k6xdhiorzzw1e --- addons/account_followup/report/account_followup_print.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index b48d80a9084..8d64ce30f6b 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -45,9 +45,8 @@ class report_rappel(report_sxw.rml_parse): def _adr_get(self, stat_line, type): res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') - res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner') adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type] - return adr and res_partner_address.read(self.cr, self.uid, [adr]) or [{}] + return adr and res_partner.read(self.cr, self.uid, [adr]) or [{}] def _lines_get(self, stat_by_partner_line): pool = pooler.get_pool(self.cr.dbname)