Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] bank statement reconciliation by ref #36035

Closed
wants to merge 2 commits into from

Conversation

yvaucher
Copy link
Contributor

Since invoice_payment_ref exists on account.move it should be the reference
used for reconciliation. For instance for structured refs like l10n_be_invoice_bba or ISR in l10n_ch

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Since invoice_payment_ref exists on account.move it should be the reference
used for reconciliation. For instance for structured refs like l10n_be_invoice_bba or ISR in l10n_ch
@yvaucher
Copy link
Contributor Author

@qdp-odoo @jcr-odoo In my opinion ref is to be replaced by invoice_payment_ref in the tests accordingly, or do you think we should make the search on 3 fields instead of 2.
(name, invoice_payment_ref, ref)

Because the structured ref will go into invoice_payment_ref, thus it should be the first field we search into.

As I understand ref is a supplier reference only used on vendor bills while invoice_payment_ref is present on both vendor bills and customer's invoices.
Thus, for bank statement reconcile we must use invoice_payment_ref. Do you see a case when we need to use ref in reconciliation?

@yvaucher
Copy link
Contributor Author

yvaucher commented Aug 28, 2019

message copied from #34476 on why I created this PR

I couldn't make the automatic reconciliation work from the invoice_payment_ref.

I created an invoice
I validated the invoice which copy the ISR in invoice_reference_payment but with a hack [1]

Then I created a bank statement and I tried to reconcile it.

No match were found:
Peek 2019-08-23 17-26

I tried to put the ISR reference in Label and in Reference fields, with or without spaces (all 4 combinations), no match.

[1] I commented line

self.invoice_payment_ref = new_terms_lines[-1].name or ''
to pass condition at
if move.type == 'out_invoice' and not move.invoice_payment_ref:

@yvaucher
Copy link
Contributor Author

@william-andre @jco-odoo I added a fixup to try not to break supplier invoice reconciliation that uses ref

@william-andre is it what you had in mind?

@william-andre
Copy link
Contributor

@yvaucher Something like that but you have a syntax error because you declare twice communication_flag in the SELECT

@smetl
Copy link
Contributor

smetl commented Aug 29, 2019

will be fixed by #36062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants