This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Open
Conversation
Member
thomaspaulb
commented
Sep 17, 2024
- serial number product combined with regular product - backorder created on serial number validation
Kit products (bom type = phantom) expand into several other products upon picking creation. Before this commit, this caused the module to find multiple destination moves per each move, since the matching was done on sale order - purchases order link only. Here we add matching on product also, which should fix this.
…o rebel module For product_supplierinfo_inter_company, this introduces a hard requirement to configure a pricelist on each supplier. This makes the tests of other modules fail because they do not set these. For stock_intercompany I don't know why it was set to rebel, it was done before but not updated in the copier template, so just updating copier to reflect reality.
When a return is actioned on the SO side, also process the return on PO side.
Currently when the sale order line has received a discount, and the SO is confirmed, the undiscounted price is copied over to the PO, leading to a price discrepancy between the SO and PO. With this commit, discount is respected.
By default picking state is forced to Done when SO picking is done, but if picking sync fails, eg if there is a mismatch in SO and PO move lines, user can't correct anything since the picking is already set to Done. This may be acceptable in cases where 100% of the syncs go OK but we make the setting configurable to support situations where manual corrections are needed.
f37c103 to
9aabd56
Compare
- One bug in particular related to the amount of stock.move.line records on PO picking being unequal to those on the SO picking side, and the resulting mismatch prevented the confirm to continue. This is actually a common case that happens when you confirm early and want to make a backorder; in such a case the PO side will still a higher reserved qty and a matching number of move lines. Solve for this case by removing any excess PO-side stock.move.line records upon sync. - Another bug was that if for whatever reason a certain move could not be synced, it would still continue to set qty_done for that move, instead of skipping it. This led to errors. Furthermore, in such a case it would still create the serial numbers in the destination company but not actually link them to the move lines, leading to errors about the serial number already existing if people want to solve the situation manually by typing in the serial numbers on the picking. In order to solve this, I had to merge the 'button_validate' and '_action_done' overrides into one single unified function override. Because the '_action_done' override dealt with the syncing of lot numbers, and the 'button_validate' override dealt with the syncing of 'qty_done', but if the first fails, you want to also skip the other, which is difficult if they are executed in different functions.
This was referenced Sep 18, 2024
thomaspaulb
commented
Sep 25, 2024
| raise UserError(_("PO does not exist or has no receipts")) | ||
| ic_user = dest_company.intercompany_sale_user_id | ||
| purchase.picking_ids.write({"intercompany_picking_id": pick.id}) | ||
| ic_pick = pick.intercompany_picking_id.with_user(ic_user) |
Member
Author
There was a problem hiding this comment.
We need to add here with_company(dest_company) for those cases where the destination user has access to more than one company.
thomaspaulb
commented
Sep 25, 2024
| ret = super()._action_done() | ||
|
|
||
| # sync lots for move lines on returns | ||
| # TODO: integrate with the non-return part just below this clause |
Member
Author
There was a problem hiding this comment.
I think it's best to already do this before merging. Maybe intercompany_picking_id and intercompany_return_picking_id can also be merged into one.
|
So the error now appears in the _mrp module. Haven't checked that, will do so |
@thomaspaulb the error persists even if I remove my commit and rerun. I'll see into rebasing everything, this maybe will make the test error go away |
42fb6e8 to
0b4e991
Compare
0b4e991 to
96ba1c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.