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

[8.0] [NEW] stock_orderpoint_manual_procurement #210

Merged

Conversation

JordiBForgeFlow
Copy link
Member

Stock Orderpoint Manual Procurement

This module allows users to manually start procurements from the list of
reordering rules, based on the quantity that is recommended to be procured.

Usage

Go to 'Configuration / Reordering Rules' and review the quantity recommended
to be procured. You can now start the procurement for a single or a list of
reordering rules.

The recommended quantity to procure is adjusted to the procurement unit of
measure indicated in the reordering rule.

@JordiBForgeFlow
Copy link
Member Author

Depends on merging #209

@andhit-r
Copy link
Member

@jbeficent thanks for your contributions. Few questions:

  1. Why do you need to depend on stock_orderpoint_uom?
  2. Why user can adjust qty procured? Why not just read min max qty? Isn't that defeat the purpose of order point?

@JordiBForgeFlow
Copy link
Member Author

@andhit-r
I want to depend on stock_orderpoint_uom because I want to show the recommended qty to procure in the procurement_uom, if the user maintained it.

The orderpoints min and max quantity become recommendations. The user can stick to them, or propose his own procurement. That's the beauty of it. You DON'T have to stick to what the reordering rule recommends in order to properly manage your warehouse.

@andhit-r
Copy link
Member

@jbeficent having a feature to change procure qty surely has it own benefit. I am 100% agree with that. But procurement rule are agreement between department (purchase, warehouse, finance). You can not change it easily.

My propose alternatives is to restrict qty changes to specific group

@JordiBForgeFlow
Copy link
Member Author

@andhit-r This module introduces the possibility to control WHEN and HOW MUCH to procure, and converts the reordering rules in recommendations to reorder. But the user has the last word on both parameters.

If a company does not want to let users have this level of control, they should not install this module.

Perhaps this does not make sense to you know from a business perspective. It is part of a bigger scheme that I'm putting in place to empower users to better plan and execute the logistics in order to reach the optimum stock levels. Give me a few days and you'll see other modules that go in this same direction.

This module is, IMHO, formally correct, and has a valid business case.

@andhit-r
Copy link
Member

@jbeficent i also have a business case that require manual procurement, but the manual procurement has to respect procurement rule. That's why i suggest the additional group to change qty. If user belong to that group then the select qty table showed and if not than the select qty table is invisible.

…ommended procure quantity when a manual procurement order is created.
@JordiBForgeFlow
Copy link
Member Author

@andhit-r I have incorporated your feedback comments regarding the group allowed to change the quantity. And I also added tests.

@andhit-r
Copy link
Member

@jbeficent thanks for the changes. 👍

@JordiBForgeFlow
Copy link
Member Author

cc @eficent

@api.onchange('product_id')
def onchange_product_id(self):
for rec in self:
rec.procure_uom_id = rec.product_id.uom_id
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm getting an error when selecting the product in the procurement form: "TypeError: 'int' object is not iterable". May the cause of this error be here?

continue
if float_compare(prods, op.product_min_qty,
precision_rounding=op.product_uom.rounding) < 0:
qty = max(op.product_min_qty, op.product_max_qty) - prods
Copy link
Contributor

Choose a reason for hiding this comment

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

I've created a Reordering rule for the product [DVD] Blank DVD-RW with the following values:
Minimum Quantity 5.000
Maximum Quantity 25.000
Quantity Multiple 1.000
Unit of measure: Dozens
The quantity on hand is 0.00 and the forecasted quantity is 0.00 dozens.

When I create a procurement and I select the product and then the unit of measure, the quantity proposed is the maximum quantity in the reordering rule and the unit of measure is Dozens.

It works as expected, however why do we choose the maximum instead of the minimum?

Copy link
Member

Choose a reason for hiding this comment

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

@aheficent minimum qty is a trigger to let procurement engine start procuring. So if the stock level drop below minimum qty it will trigger procurement. Max qty will tell procurement engine how many will it procure. Here are few links regarding stock level:

https://www.lokad.com/min-max-inventory-planning-definition
http://accountlearning.blogspot.co.id/2010/05/minimum-level-or-safety-stock-and-its.html

@andhit-r
Copy link
Member

andhit-r commented Dec 3, 2016

@mikevhe18 @azmimr67 @m-sani would you kindly help review this PR. Many thanks.

@m-sani
Copy link

m-sani commented Dec 6, 2016

👍

1 similar comment
@mikevhe18
Copy link

👍

@JordiBForgeFlow JordiBForgeFlow merged commit b6b3675 into OCA:8.0 Dec 22, 2016
@JordiBForgeFlow
Copy link
Member Author

Thanks all for your reviews! This is now merged.

cc @lreficent can you port to v9?

@LoisRForgeFlow
Copy link
Contributor

@jbeficent This module depends on stock_orderpoint_uom module, which is not available in v9. Might we migrate that one first?

LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Dec 23, 2016
[ADD] stock_orderpoint_procure_uom
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Dec 23, 2016
[ADD] stock_orderpoint_procure_uom
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jan 20, 2017
[ADD] stock_orderpoint_procure_uom
yk2kus pushed a commit to thinkopensolutions/oca-stock-logistics-warehouse that referenced this pull request Mar 16, 2017
…reserve

Revert PR OCA#123 - Dispatch optimisation is not V8 compatible
gfcapalbo pushed a commit to gfcapalbo/stock-logistics-warehouse that referenced this pull request Jun 29, 2017
[ADD] stock_orderpoint_procure_uom
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Dec 27, 2017
[ADD] stock_orderpoint_procure_uom
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jan 2, 2018
[ADD] stock_orderpoint_procure_uom
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jan 12, 2018
[ADD] stock_orderpoint_procure_uom
bodedra pushed a commit to ursais/stock-logistics-warehouse that referenced this pull request Feb 27, 2018
[ADD] stock_orderpoint_procure_uom
bodedra pushed a commit to ursais/stock-logistics-warehouse that referenced this pull request Mar 8, 2018
[ADD] stock_orderpoint_procure_uom
bodedra pushed a commit to ursais/stock-logistics-warehouse that referenced this pull request Mar 9, 2018
[ADD] stock_orderpoint_procure_uom
tschanzt pushed a commit to tschanzt/stock-logistics-warehouse that referenced this pull request Apr 25, 2018
[ADD] stock_orderpoint_procure_uom
kittiu pushed a commit to kittiu/stock-logistics-warehouse that referenced this pull request Mar 16, 2019
[ADD] stock_orderpoint_procure_uom
@LoisRForgeFlow LoisRForgeFlow deleted the 8.0-stock_orderpoint_manual_procurement branch December 17, 2019 09:11
JoanSForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jan 20, 2020
[ADD] stock_orderpoint_procure_uom
HviorForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Feb 26, 2020
[ADD] stock_orderpoint_procure_uom
HviorForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Mar 4, 2020
[ADD] stock_orderpoint_procure_uom
dzungtran89 pushed a commit to trobz/stock-logistics-warehouse that referenced this pull request Jan 11, 2021
[ADD] stock_orderpoint_procure_uom
dzungtran89 pushed a commit to trobz/stock-logistics-warehouse that referenced this pull request May 6, 2021
[ADD] stock_orderpoint_procure_uom
DavidBForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request May 28, 2021
[ADD] stock_orderpoint_procure_uom
CarlosRoca13 pushed a commit to Tecnativa/stock-logistics-warehouse that referenced this pull request Aug 16, 2021
[ADD] stock_orderpoint_procure_uom
hailangvn pushed a commit to trobz/stock-logistics-warehouse that referenced this pull request Aug 31, 2021
[ADD] stock_orderpoint_procure_uom
dzungtran89 pushed a commit to chucorp/stock-logistics-warehouse that referenced this pull request Sep 30, 2021
[ADD] stock_orderpoint_procure_uom
nilshamerlinck pushed a commit to nilshamerlinck/stock-logistics-warehouse that referenced this pull request Oct 1, 2021
[ADD] stock_orderpoint_procure_uom
hailangvn pushed a commit to trobz/stock-logistics-warehouse that referenced this pull request Oct 1, 2021
[ADD] stock_orderpoint_procure_uom
ernesto-garcia-tecnativa pushed a commit to Tecnativa/stock-logistics-warehouse that referenced this pull request Feb 16, 2023
[ADD] stock_orderpoint_procure_uom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants