Skip to content

Conversation

@lmarion-source
Copy link

@lmarion-source lmarion-source commented Aug 29, 2024

A previous MR existed but only when payment order was triggered from invoices.
We added the case also directly from confirm button on payment order

Original PR: #1177

Closes #1330

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch 2 times, most recently from 9a523ec to 386628a Compare August 29, 2024 14:05
Copy link
Contributor

@acsonefho acsonefho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ 💪
Just a minor change 🙏

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch from 386628a to 5f1064e Compare August 30, 2024 06:06
@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch from 5f1064e to a02bcff Compare September 11, 2024 07:06
@adrienpeiffer
Copy link

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-1340-by-adrienpeiffer-bump-minor, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 12, 2024
Signed-off-by adrienpeiffer
@pedrobaeza pedrobaeza added this to the 16.0 milestone Sep 12, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have stopped the merge. AFAIK, @sbidoul commented that wants to be able to add the lines, but not to confirm the order, and this is pre-filtering the non-allowed bank accounts previously if I understand the code right.

@OCA-git-bot
Copy link
Contributor

@adrienpeiffer your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-1340-by-adrienpeiffer-bump-minor.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@adrienpeiffer
Copy link

adrienpeiffer commented Sep 12, 2024

@pedrobaeza Not sure to understand. The check is done in draft2open method.

@pedrobaeza
Copy link
Member

I mean this code for example:

https://github.com/OCA/bank-payment/pull/1340/files#diff-bb6441f4ea06462fe1aae1f093f82c4e57460864b29b209676a6c7ce14e49ef9R156

It's avoiding to include the lines in the order.

@adrienpeiffer
Copy link

Isn't that exactly the code approved in #1177 ?

@pedrobaeza
Copy link
Member

OK, I based my review in #1177 (comment). Let me check again.

@adrienpeiffer
Copy link

@lmarion-source Could you remove blank lines (cfr pedro's review)
@sbidoul If I undersood correctly, you prefer to be able to add lines from invoces even bank account is not validated ?
So basically, we have to remove this line https://github.com/OCA/bank-payment/pull/1340/files#diff-bb6441f4ea06462fe1aae1f093f82c4e57460864b29b209676a6c7ce14e49ef9R158

@sbidoul
Copy link
Member

sbidoul commented Sep 13, 2024

If I undersood correctly, you prefer to be able to add lines from invoces even bank account is not validated ?

It is my impression that Odoo Enterprise works like that, and it makes sense to me, since the process of preparing payment orders is distinct from the process of validating bank accounts, and often done by different persons. So I think it's better to let both processes run in parallel and block at the last moment. Cherry on the cake would be a warning when an non validated bank account is used in a payment line, but that can be done in another PR.

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch from a02bcff to 565a13b Compare September 13, 2024 08:10
@gdgellatly
Copy link
Contributor

Hmm, we solved this completely differently. I get the minimal touch here, but we made a seperate module that hit all the places Odoo gets this wrong, mostly purchase order and account move but also payment with a single function on bank to get a valid out payment bank account. Then overrode def _compute_available_partner_bank_ids(self): which for me seems to be the place this belongs

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch 3 times, most recently from 1cd2603 to adb3c59 Compare September 26, 2024 14:42
@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 26, 2025
@github-actions github-actions bot closed this Mar 2, 2025
@sbidoul sbidoul removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 2, 2025
@sbidoul sbidoul reopened this Mar 2, 2025
@sbidoul
Copy link
Member

sbidoul commented Mar 2, 2025

Reopening as I think it needs another review round after the last commits. What's the status of this?

Copy link

@Cedric-Pigeon Cedric-Pigeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach of letting the user making the payment order and block at the end in case of unvalidated account.
I would be really interested to get it merge soon as I'd need to forward-port it to v17.0

@Cedric-Pigeon
Copy link

@lmarion-source Could you please resolve conflicts ?

@AnizR
Copy link

AnizR commented Apr 30, 2025

ping @lmarion-source

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch 5 times, most recently from 092cb52 to 534deff Compare April 30, 2025 10:40
Copy link

@AnizR AnizR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost good, thanks!

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch from 534deff to f97f52f Compare April 30, 2025 11:38
Copy link

@AnizR AnizR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

Copy link

@Cedric-Pigeon Cedric-Pigeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sbidoul
Copy link
Member

sbidoul commented Jun 12, 2025

@pedrobaeza can you update your review here?

.sudo()
.get_param("account_payment_order.use_allow_out_payment")
):
payline._check_bank_allows_out_payments()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to check that payment_type is outbound here? Because this check does not make sense for a debit order.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmarion-source I looks like you have not handled this comment?

@pedrobaeza
Copy link
Member

@lmarion-source can you please check the latest comments?

@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch from f97f52f to bba476a Compare September 15, 2025 08:02
@lmarion-source lmarion-source force-pushed the 16.0-account_payment_order_allow_out_payment branch from bba476a to 0437b98 Compare September 15, 2025 08:12
related="company_id.transfer_journal_id", readonly=False
)
use_allow_out_payment = fields.Boolean(
string=" Use allow out payment on partner bank",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string=" Use allow out payment on partner bank",
string="Verify that Send Money is enabled on partner bank accounts",

Is this easier to understand by non technical users?

</div>
</div>
</div>
</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ends up in the next section. Not sure this is fixable in this PR, though.

Image

.sudo()
.get_param("account_payment_order.use_allow_out_payment")
):
payline._check_bank_allows_out_payments()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmarion-source I looks like you have not handled this comment?

astirpe and others added 3 commits October 17, 2025 18:04
A previous MR existed but only when payment order was triggered from invoices.
We added the case also directement from confirm button on payment order

original PR: OCA#1177
@sbidoul sbidoul force-pushed the 16.0-account_payment_order_allow_out_payment branch from 0437b98 to 4ad0f67 Compare October 17, 2025 16:05
@sbidoul
Copy link
Member

sbidoul commented Oct 17, 2025

rebased

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.

10 participants