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] account: instant payment post process #31732

Conversation

jpp-odoo
Copy link
Contributor

@jpp-odoo jpp-odoo commented Mar 11, 2019

When register a payment, and choosing a payment acquired.

Before this commit, the payment post process had to wait until a cron
run (every 10 minutes).

Now, The post process is executed instantly after the payment, if the
payment is not yet done, the post process will be executed in the next
cron run.

Co-authored-by: Toufik Benjaa tbe@odoo.com

opw-1928834

@robodoo robodoo added seen 🙂 CI 🤖 Robodoo has seen passing statuses labels Mar 11, 2019
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Mar 11, 2019
Copy link
Contributor

@nim-odoo nim-odoo left a comment

Choose a reason for hiding this comment

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

What about the condition ('is_processed', '=', False) in

('is_processed', '=', False),

?

And why is the cron hardcoded to process transactions older than 10 minutes?

@jpp-odoo
Copy link
Contributor Author

Here is the explanation of why 10 minutes : 84b976f

Copy link
Contributor

@tbe-odoo tbe-odoo left a comment

Choose a reason for hiding this comment

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

Hello, as Nicolas says we need to check if the transaction hasn't been already processed (shouldn't be the case, but better be safe than sorry).

Otherwise it looks good to me :)

addons/account/models/account_payment.py Outdated Show resolved Hide resolved
When register a payment, and choosing a payment acquired.

Before this commit, the payment post process had to wait until a cron
run (every 10 minutes).

Now, The post process is executed instantly after the payment, if the
payment is not yet done, the post process will be executed in the next
cron run.

Co-authored-by:  Toufik Benjaa <tbe@odoo.com>

opw-1928834
@jpp-odoo jpp-odoo force-pushed the 12.0-opw-1928834-post_process_after_done_invoice_payment-jpp branch from 2e1b501 to 1f74d75 Compare March 11, 2019 12:02
@jpp-odoo
Copy link
Contributor Author

I just made the changes you asked for

@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 11, 2019
Copy link
Contributor

@nim-odoo nim-odoo left a comment

Choose a reason for hiding this comment

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

robodoo r+

robodoo pushed a commit that referenced this pull request Mar 11, 2019
When register a payment, and choosing a payment acquired.

Before this commit, the payment post process had to wait until a cron
run (every 10 minutes).

Now, The post process is executed instantly after the payment, if the
payment is not yet done, the post process will be executed in the next
cron run.

Co-authored-by:  Toufik Benjaa <tbe@odoo.com>

opw-1928834

closes #31732

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Mar 11, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 11, 2019
@jpp-odoo jpp-odoo deleted the 12.0-opw-1928834-post_process_after_done_invoice_payment-jpp branch March 14, 2019 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants