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

[RFC] contract_auto_invoice_status: Invoice auto-validation on automatic payments #70

Closed
vonpupp opened this issue May 18, 2017 · 3 comments

Comments

@vonpupp
Copy link

vonpupp commented May 18, 2017

This module would be able to change the status of an invoice after automatically being paid using the contract_auto module.

The idea would be to have an option within on the payment_acquirer to be able to automatically modify the status of an invoice. Similar to the regular sales order flow with the option: "Authorize & capture the amount, confirm the SO and auto-validate the invoice on acquirer confirmation".

What I think it would be the outline of the steps are:

  • Fork LasLabs/contracts and create a branch from release/10.0/LABS-411-contract_auto
  • Modify payment.acquirer and add a field similar to auto_confirm to add the following options: No automatic status change, auto-validate the invoice on acquirer confirmation.
  • Create a new module named contract_auto_invoice_status that adds the logic to contracts_auto.
  • Open a PR with the dependence on PR [10.0] [ADD] contract_auto: Automatic Payment For Contracts #67.

I am an Odoo apprentice so guidance is very welcome. How does this sound?

@vonpupp vonpupp changed the title [RFC] website_sale_contract: Invoice auto-validation on automatic payments [RFC] contract_auto_invoice_status: Invoice auto-validation on automatic payments May 18, 2017
@lasley
Copy link
Contributor

lasley commented May 22, 2017

I don't think we'll need to bind this to contract_auto actually, and could instead maybe call this payment_contract - indicating the fact that we are gluing contract and payment modules. The contract module is where the invoice creation logic takes place, and the payment module is where the payment actually takes place - hence this recommendation.

You've got the overview on point I think though, except just fork from OCA/10. You'll just want to add a set of options into the payment acquirer form view, similar to the ones provided in v10, allowing for the selection of what happens to the invoice after payment.

@vonpupp
Copy link
Author

vonpupp commented May 25, 2017

Thank you very much @lasley. I will follow your recommendations. If you don't mind I will ping you out once done for your review and approval.

@pedrobaeza
Copy link
Member

Closing this waiting for a PR.

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

No branches or pull requests

3 participants