From 7defabc876c94e03dd1db7ad3c512e5283331719 Mon Sep 17 00:00:00 2001 From: ced <> Date: Wed, 10 Oct 2007 05:44:46 +0000 Subject: [PATCH] Remove bank on the invoice: no need. bzr revid: ced-a28af3f654f05663aeba5bea61d7eb4474f99fe1 --- addons/account/account_invoice_view.xml | 3 +-- addons/account/invoice.py | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index d0607297d04..287e707c7de 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -192,8 +192,8 @@ - + @@ -261,7 +261,6 @@ - diff --git a/addons/account/invoice.py b/addons/account/invoice.py index b60940dd636..12cfdc437a1 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -129,7 +129,6 @@ class account_invoice(osv.osv): 'date_due': fields.date('Due Date', states={'open':[('readonly',True)],'close':[('readonly',True)]}), 'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}), - 'partner_bank_id': fields.many2one('res.partner.bank', 'Partner bank'), 'address_contact_id': fields.many2one('res.partner.address', 'Contact Address', readonly=True, states={'draft':[('readonly',False)]}), 'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True, required=True, states={'draft':[('readonly',False)]}), @@ -181,7 +180,6 @@ class account_invoice(osv.osv): def onchange_partner_id(self, cr, uid, ids, type, partner_id): invoice_addr_id = False contact_addr_id = False - partner_bank_id = False payment_term = False acc_id = False @@ -198,12 +196,14 @@ class account_invoice(osv.osv): else: acc_id = p.property_account_payable.id - partner_bank_id = p.bank_ids and p.bank_ids[0] and p.bank_ids[0].id or False payment_term = p.property_payment_term and p.property_payment_term or False - result = {'value': {'address_contact_id': contact_addr_id, 'address_invoice_id': invoice_addr_id, - 'account_id': acc_id,'partner_bank_id':partner_bank_id, - 'payment_term':payment_term}} + result = {'value': { + 'address_contact_id': contact_addr_id, + 'address_invoice_id': invoice_addr_id, + 'account_id': acc_id, + 'payment_term':payment_term} + } if partner_id and p.property_payment_term.id: result['value']['payment_term'] = p.property_payment_term.id