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

[16.0][MIG] purchase_stock_picking_invoice_link: Migration to 16.0 #1198

Merged

Conversation

JavierIniesta
Copy link

@JavierIniesta JavierIniesta commented Jan 24, 2023

Issue: #1101

cubells and others added 13 commits January 20, 2023 12:17
Steps to reproduce the problem:

- Create a sales order with Dropshipping route.
- Confirm the sale order.
- Confirm the purchase order and validate the DS picking.
- Invoice the sales order.
- Invoice the purchase order.

Current behavior:

The vendor bill is not linked to the DS picking

Expected behavior:

It's linked.

That's because 2 problems:

- Current algorithm looks for existing invoices linked to the picking
  for discarding double links, but it's not having into account that
  such invoices can be customer ones.

  We simply filter for vendor bills in the algorithm to fix it.
  Twin for the customer part already done in OCA#1036.

- The location filter must use the supplier location as reference,
  not the internal one, as in DS, there's no internal location.

TT38628
…ckorders

Before this patch, when we receive products in a backorder and the other
quantities received where invoiced yet, the picking of the backorder
will be related to the invoice created for the other quantities.

With this patch, this situation will just happen when the invoicing
policy of the product is based on quantities purchased.

Steps to reproduce the problem:

1. Create a purchase order buying 10 units of some stockable product
2. Receive 8 units of the product
3. Create back order
4. Invoice the received quantity (8 units)
5. Receive 2 units of the product in the created back order
6. You will see that the back order picking is related to the invoice with 8 units
…nvoice

If we make partial invoices, we need that all partial invoices were linked
to the pickings related.

Steps to reproduce the problem:

1. Create a purchase order buying 10 units of some stockable product
2. Receive all
3. Create new invoice, invoicing just 8 units (This invoice will be linked to the picking)
4. Create new invoice, invoicing the remaining quantity
5. The invoice with 2 units won't be linked to the picking

x
@JavierIniesta JavierIniesta mentioned this pull request Jan 24, 2023
69 tasks
@JavierIniesta
Copy link
Author

We have done functional tests and it works correctly.

@rousseldenis
Copy link
Contributor

/ocabot migration purchase_stock_picking_invoice_link

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review

Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

Code review

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-1198-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jan 29, 2023
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

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

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.

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-1198-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit a836dc3 into OCA:16.0 Jan 30, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 25701a0. Thanks a lot for contributing to OCA. ❤️

@JavierIniesta JavierIniesta deleted the 16.0-mig-purchase_stock_picking_invoice_link branch March 14, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.