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_price_unit_sync: Migration to 16.0 #2137

Merged
merged 26 commits into from
Feb 29, 2024

Conversation

AungKoKoLin1997
Copy link
Contributor

Standard Migration.

@qrtl

carlosdauden and others added 26 commits December 28, 2023 08:27
…k moves already done

[UPD] Update purchase_stock_price_unit_sync.pot

[UPD] README.rst
[UPD] Update purchase_stock_price_unit_sync.pot
[UPD] Update purchase_stock_price_unit_sync.pot
If we receive a kit, we shouldn't write the kit purchase price on the
components price units.

TT32040

purchase_stock_price_unit_sync 13.0.1.0.1
…nded costs for the update if the stock_landed_costs addon is installed.

TT35009
Steps to reproduce:

- Create a purchase order with an storable product and confirm it.
- Validate the reception picking.
- Create a landed cost linked to the reception picking and validate it.
- Now change the unit price in the purchase order.

Result: Both SVLs (stock valuation layers), the one for the reception,
and the landed cost one, result overwritten with the new purchase unit
price, while only the reception one should.

As the landed cost SVL is put as children (through the field
`stock_valuation_layer_id`), we filter out these ones from the write.
In purchase_discount the price_unit needs to be written in order to be
able to compute the discount as the hook method isn't being used in core
(for the moment). These write should be ignored as they'll lead to an
infinite loop

TT36816
…rors when accessing stock.valuation.layer

TT45036
@AaronHForgeFlow
Copy link
Contributor

@AungKoKoLin1997 Thank you for you explanation in here: OCA/stock-logistics-workflow#1465

I created a product and set it as AVG cost with automated valuation. Then I received one @ 10USD, then I receive another @ 10 USD. Then change the price on the first PO to be 20 USD. The layer unit price was updated but not the total value:

svg_cost_sync

The cost in the product card was still 10 USD, shouldn't it be updated to 15 USD?

@AaronHForgeFlow
Copy link
Contributor

@AungKoKoLin1997 Just did the same in v15 and the behavior is the same, I see that the module product_cost_price_avco_sync is not dependency here, so please disregard my previous comment.

Copy link
Member

@victoralmau victoralmau 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 OK.

Ping @carlosdauden @sergio-teruel

TT47857

@pedrobaeza
Copy link
Member

/ocabot migration purchase_stock_price_unit_sync

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Feb 29, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 29, 2024
53 tasks
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-2137-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 47ef32e into OCA:16.0 Feb 29, 2024
7 of 9 checks passed
@AungKoKoLin1997 AungKoKoLin1997 deleted the 16.0-mig-purchase_stock_price_unit_sync branch June 12, 2024 09:30
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.

10 participants