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] product_replenishment_cost: Migration to 16.0 (from 12.0) #174

Merged
merged 26 commits into from
Jul 25, 2023

Conversation

amarcosg
Copy link

@amarcosg amarcosg commented Jun 5, 2023

No description provided.

legalsylvain and others added 25 commits June 5, 2023 12:20
- move product_get_cost_field from unported folder to root folder; rename module;
[PORT] various changes realized in v7 branch; specially 7f3f629
[REF] OCA convention about folders;
[PORT] V8 api;
[ADD] demo data;
[FIX] set replenishment_cost as a stored field;
Currently translated at 100.0% (3 of 3 strings)

Translation: margin-analysis-12.0/margin-analysis-12.0-product_replenishment_cost
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-12-0/margin-analysis-12-0-product_replenishment_cost/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: margin-analysis-12.0/margin-analysis-12.0-product_replenishment_cost
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-12-0/margin-analysis-12-0-product_replenishment_cost/
Currently translated at 100.0% (3 of 3 strings)

Translation: margin-analysis-12.0/margin-analysis-12.0-product_replenishment_cost
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-12-0/margin-analysis-12-0-product_replenishment_cost/pt/
Currently translated at 100.0% (3 of 3 strings)

Translation: margin-analysis-12.0/margin-analysis-12.0-product_replenishment_cost
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-12-0/margin-analysis-12-0-product_replenishment_cost/it/
@amarcosg amarcosg mentioned this pull request Jun 5, 2023
10 tasks
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

Hi. Diff review ok. Thanks for porting this module.
however, I'm asking about the usefulness of this module. Why do you need this module ? is it related to the module product_cost_incl_bom ? or other use case(s) ?

@amarcosg
Copy link
Author

amarcosg commented Jun 5, 2023

Hi @legalsylvain first thanks for the review.

Ill give you and insight of the use we give it comparing it with the cost price. The cost price is the cost assigned for each product in the warehouse, the replenishment cost is the cost it would cost to buy a new product. They are different costs because the cost price depends on your valuation method and the operations you have performed while the replacement cost is determined by the current market conditions.

The price of the product in the supplier's catalog is €15/piece. Therefore, if I want to buy a new unit, my replenishment cost would be €15. But if my stock comes from having bought it in a special offer that allowed me to buy it for €10, then my cost price is €10/piece.

We use it mainly by not taking into account the cost price but calculating the replenishment cost from the suppliers' rates.

We are going to implement this logic in a module for v16, I have no problem in proposing it for this repository if as a community we see that it is useful.

@legalsylvain
Copy link
Contributor

Hi @amarcosg.
First, thanks for your explanation.

  1. I think that your comment could be a part of the DESCRIPTION.rst file, to explain better the objective of this module. (the use case with prices, for exemple).
  2. side question (not related to the current PR) : how do you update the standard_price, in your process ? I mean, if you buy 5 products at 8€ and 5 products to 12€, how do you update the standard price, to put 10€ ?

@amarcosg
Copy link
Author

amarcosg commented Jun 6, 2023

@legalsylvain Ill update the DESCRIPTION.rst to made it more clear.

Regarding the second point, it depends on the customer. Some use the average price, others as in the example I have given you would correspond to the last purchase price, which is another option we have.

In that case the cost price would correspond to the last price at which I have purchased but the replenishment cost would depend on the suppliers rates of the product.

@legalsylvain
Copy link
Contributor

Thanks for the explanation !

@rafaelbn
Copy link
Member

/ocabot migration product_replenishment_cost

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 13, 2023
@rafaelbn
Copy link
Member

Thank you!

Which is the differences with product supplierinfo?

@amarcosg
Copy link
Author

Hi @rafaelbn thank you.

In the example i give here #174 (comment) i only take into account the calculation with the supplierinfo, but it doesnt have to be like that always. It may be equal to our best supplierinfo in some cases (we mostly do it that way), but it may not. For example with bill of materials or some products we invoice at product reception an we use that price.

It allows us some flexibility and above all it gives us insight into the costs of our inventory.

Copy link

@hugo-cordoba hugo-cordoba left a comment

Choose a reason for hiding this comment

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

LGTM!

@hugo-cordoba
Copy link

hugo-cordoba commented Jul 20, 2023

Hi @legalsylvain, I saw that you commented on the PR, do you see the final result well, can you approve it and merge it?

thanks in advance, best regards!

@hugo-cordoba
Copy link

Hi, sorry for the insistence @legalsylvain, can you take a look at it?

Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

thanks !

@hugo-cordoba
Copy link

Hi @pedrobaeza!

Could you take a look this PR and merge please?

Thankss! Best regards!

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-174-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 56ee055 into OCA:16.0 Jul 25, 2023
@OCA-git-bot
Copy link
Contributor

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

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.