Bank information of the customer does not go back in invoice

Bug #631846 reported by Laurent G.
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Hi,

I have bank détails in my customer but when I make invoice, bank informations from my customer does not go back in the field "Bank Account" of the tab 'Other Info" of the invoice.

In version 5.0.12, I corrected this bug with the following code :

1°) In file server/addons/sale/sale.py, function _make_invoice(), I add :

                  'partner_bank': order.partner_id.bank_ids[0].id

2°) In file server/addons/stock/stock.py, function action_invoice_create(), I add :

                  if partner.bank_ids:
                            bank_id = partner.bank_ids[0].id
                  else:
                            bank_id = ''

and

                  if type in ('out_invoice','out_refund'):
                           invoice_vals['partner_bank'] = bank_id

3°) In file server/addons/account/invoice.py, function _get_invoice_from_reconcile(), I add :

                    'readonly=True' on fiel 'partner_bank' because the search is not goog (bank of manufacture)

and function onchange_partner_id(), I add :

                     'out_invoice' in line 'if type in ('in_invoice', 'in_refund'):'

I think it's a bug. Can you correct this ???
Thank's a lot
Best regards

Laurent

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Could you please post a patch or a branch ? They are easier to review than plain English.

Otherwise, you may be interested in Bug #405863 about the use of bank details on supplier invoices as opposed to customer invoices.

Lionel

Laurent G. (lguilloteau)
description: updated
Revision history for this message
Laurent G. (lguilloteau) wrote :

With the change mentioned in the bug #405863, there is no need to set 'readonly' field partner_bank (3°). Thank's

If you want modified files, let me your mail @.

Laurent

Revision history for this message
Laurent G. (lguilloteau) wrote :

Hi,

Here are the modified files.

Best regards

Laurent

summary: - Version 5.0.14 : bank information of the customer does not go back in
- invoice
+ Bank information of the customer does not go back in invoice
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Laurent,

Whenever a sale order is made,corresponding customer invoice is created. Here, the bank account information of the main company is consulted, not the bank account of customer. The Money is going to be paid to account of the current company.

Whenever a supplier invoice is created, bank account information of the main company is not consulted, but the bank account of supplier is. The Money is going to be paid to account of the supplier.

Interrupt me if I am missing something.

@Experts, do we need to improve the behaviour?

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

@Experts, do we need to improve the behaviour?
Yes we do. Marking as a duplicate according to your latest comment.

Revision history for this message
Laurent G. (lguilloteau) wrote :

Hello Jay

Your reasoning is correct.
I expected to find the customer information in the customer's bill.
It should therefore both information (customer and company)
I need the customer's bank information in order to print a customer payment order.

Laurent

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.