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

[FW][FIX] sale_stock: partial downpayment doesn't create COGS #161749

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 12, 2024

Usecase to reproduce:

  • Product wiht a real time valuation
  • Product with invoice on delivered quantity
  • Create a SO for 5 units and 1000$ each
  • Do a full downpayment of 100% of quotation
  • Deliver 3 out of 5 units and create a backorder
  • Create an invoice
  • Validate the invoice

Expected behavior:
The cogs entries are there

Current behavior:
No cogs

It only happens with partial downpayment. When the downpayment amount equals the quotation amount. An invoice is created instead of a credit note and the process works correctly.

It happens because it creates a credit note with a negative quantity to invoice so the system doesn't understand it has to create the cogs at that point.

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


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

Forward-Port-Of: #161098

Usecase to reproduce:
- Product wiht a real time valuation
- Product with invoice on delivered quantity
- Create a SO for 5 units and 1000$ each
- Do a full downpayment of 100% of quotation
- Deliver 3 out of 5 units and create a backorder
- Create an invoice
- Validate the invoice

Expected behavior:
The cogs entries are there

Current behavior:
No cogs

It only happens with partial downpayment. When the downpayment amount
equals the quotation amount. An invoice is created instead of a credit
note and the process works correctly.

It happens because it creates a credit note with a negative quantity to
invoice so the system doesn't understand it has to create the cogs at
that point.

X-original-commit: d2a365c
@robodoo
Copy link
Contributor

robodoo commented Apr 12, 2024

Pull request status dashboard.

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 12, 2024

This PR targets saas-16.4 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 12, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 12, 2024
@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 22, 2024

@amoyaux @adwid child PR #161768 was modified / updated and has become a normal PR. This PR (and any of its parents) will need to be merged independently as approvals won't cross.

@amoyaux
Copy link
Contributor

amoyaux commented Apr 22, 2024

@fw-bot r+

robodoo pushed a commit that referenced this pull request Apr 22, 2024
Usecase to reproduce:
- Product wiht a real time valuation
- Product with invoice on delivered quantity
- Create a SO for 5 units and 1000$ each
- Do a full downpayment of 100% of quotation
- Deliver 3 out of 5 units and create a backorder
- Create an invoice
- Validate the invoice

Expected behavior:
The cogs entries are there

Current behavior:
No cogs

It only happens with partial downpayment. When the downpayment amount
equals the quotation amount. An invoice is created instead of a credit
note and the process works correctly.

It happens because it creates a credit note with a negative quantity to
invoice so the system doesn't understand it has to create the cogs at
that point.

closes #161749

X-original-commit: d2a365c
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
@robodoo robodoo closed this Apr 22, 2024
@fw-bot fw-bot deleted the saas-16.4-16.0-fix-credit-note-downpayment-arm-Vcrq-fw branch May 6, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants