diff options
| author | Bhumika (OpenERP) <sbh@tinyerp.com> | 2012-03-06 17:35:30 +0530 |
|---|---|---|
| committer | Bhumika (OpenERP) <sbh@tinyerp.com> | 2012-03-06 17:35:30 +0530 |
| commit | 6cb6a9e6492de631b41ec8d64b0620fa98ca4e37 (patch) | |
| tree | 77eb8dd5e3662a60e3f7d9f6f38de1e646202f15 | |
| parent | 69c4e577db36f383c222578c05e5f4da6137b014 (diff) | |
| parent | 48950149048874c7e9683e02941fce7fc6a537a9 (diff) | |
[MERGE] account: remove res.partner.address
bzr revid: sbh@tinyerp.com-20120306120530-ruzk6xx0ju5b6vbo
15 files changed, 18 insertions, 43 deletions
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 @@ </td> <td> <para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para> - <para style="terp_default_8">[[ display_address(o.partner_id) ]]</para> + <para style="terp_default_8">[[ display_address(o.partner_id,'invoice') ]]</para> <para style="terp_default_8"> <font color="white"> </font> </para> 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}) 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}) 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'): diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index 56004cebde3..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.address') 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) 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 @@ </td> <td> <para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para> - <para style="terp_default_8">[[ display_address(o.address_invoice_id) ]]</para> + <para style="terp_default_8">[[ display_address(o.partner_id, 'invoice') ]]</para> <para style="terp_default_8"> <font color="white"> </font> </para> - <para style="terp_default_8">Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]]</para> - <para style="terp_default_8">Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]]</para> + <para style="terp_default_8">Tel. : [[ (o.partner_id and o.partner_id.phone) or removeParentNode('para') ]]</para> + <para style="terp_default_8">Fax : [[ (o.partner_id and o.partner_id.fax) or removeParentNode('para') ]]</para> <para style="terp_default_8">VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]]</para> </td> </tr> @@ -247,7 +247,7 @@ <para style="terp_default_Centre_9">[[ o.name or '' ]]</para> </td> <td> - <para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para> + <para style="terp_default_Centre_9">[[ (o.partner_id and o.partner_id.ref) or ' ' ]]</para> </td> </tr> </blockTable> 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 @@ </td> <td> <para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para> - <para style="terp_default_8">[[ display_address(o.address_invoice_id) ]]</para> + <para style="terp_default_8">[[ display_address(o.partner_id, 'invoice') ]]</para> <para style="terp_default_8"> <font color="white"> </font> </para> - <para style="terp_default_8">Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]]</para> - <para style="terp_default_8">Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]]</para> + <para style="terp_default_8">Tel. : [[ (o.partner_id and o.partner_id.phone) or removeParentNode('para') ]]</para> + <para style="terp_default_8">Fax : [[ (o.partner_id and o.partner_id.fax) or removeParentNode('para') ]]</para> <para style="terp_default_8">VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]]</para> </td> </tr> @@ -251,7 +251,7 @@ <para style="terp_default_Centre_9">[[ o.name or '' ]]</para> </td> <td> - <para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para> + <para style="terp_default_Centre_9">[[ ( o.partner_id and o.partner_id.ref) or ' ' ]]</para> </td> </tr> </blockTable> 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: diff --git a/addons/product_visible_discount/product_visible_discount.py b/addons/product_visible_discount/product_visible_discount.py index 2f4070db381..5d833ea6b53 100644 --- a/addons/product_visible_discount/product_visible_discount.py +++ b/addons/product_visible_discount/product_visible_discount.py @@ -103,8 +103,8 @@ sale_order_line() class account_invoice_line(osv.osv): _inherit = "account.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 = 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 = 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) def get_real_price(res_dict, product_id, qty, uom, pricelist): item_obj = self.pool.get('product.pricelist.item') |
