Skip to content

[ADD] purchase: suggested qty #12871

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Felicious
Copy link
Contributor

@Felicious Felicious commented Apr 12, 2025

Adds the Suggest feature to compute recommended reorder amounts in purchase orders based on validated delivery data.

Merge documentation to saas-18.3 after this R&D task and PR have launched.

@Felicious Felicious added the 5 label Apr 12, 2025
@Felicious Felicious self-assigned this Apr 12, 2025
@robodoo
Copy link
Collaborator

robodoo commented Apr 12, 2025

Pull request status dashboard

@Felicious Felicious requested a review from samueljlieber April 12, 2025 01:56
@C3POdoo C3POdoo requested review from a team April 12, 2025 01:57
@Felicious
Copy link
Contributor Author

Hiii @samueljlieber 🙈

I'm trying to document an unreleased feature set to deploy to saas-18.3 and thought to set the target to master, since that branch isn't available yet. However, I got that traceback issue. Do you have any idea what's going on? 😭

@samueljlieber
Copy link
Contributor

samueljlieber commented Apr 14, 2025

...I got that traceback issue. Do you have any idea what's going on?

@Felicious This traceback is caused by the new suggest.rst doc not being included in the parent folder's TOC advanced.rst. Once you add it to the TOC, the :card: reference used in the replenishment.rst doc should no longer raise this error. :)

@Felicious
Copy link
Contributor Author

@Felicious This traceback is caused by the new suggest.rst doc not being included in the parent folder's TOC advanced.rst. Once you add it to the TOC, the :card: reference used in the replenishment.rst doc should no longer raise this error. :)

OH MY GOODNESS 🙈 noob mistake. Thank you!!

@Felicious Felicious force-pushed the master-purchase-suggest-feku branch from 8ce0da4 to 84a862a Compare April 14, 2025 21:52
@Felicious Felicious force-pushed the master-purchase-suggest-feku branch from 84a862a to e10109a Compare April 14, 2025 23:39
@Felicious Felicious requested a review from jero-odoo April 18, 2025 17:03
@Felicious
Copy link
Contributor Author

Hi @jero-odoo ! Could I get your help reviewing this brand new feature coming to 18.3? 😊 You'll have to test in the master runbot!

image

Copy link
Contributor

@jero-odoo jero-odoo left a comment

Choose a reason for hiding this comment

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

Hey @Felicious great work! I had a few comments, mostly on formatting (the math markups were building oddly, I think I have fixed them but you will definitely want to take a second look!) Otherwise everything looks good to me!
one other thing to note, when I was looking through RFQs, there was a few that weren't displaying the "Suggest" button. I wasn't able to find any similarities, so I can't say for sure why or why not the button would appear. (Also it was a runbot so I can't say for sure it wasn't just an error). I am not sure if there is any other information we have on why the button would not be available but if so, that would be a nice addition.
Let me know if you have any questions, thanks!

Comment on lines +12 to +14
- *Replenish for*: Number of days to cover future demand.
- *Based on*: Period used to calculate average daily demand (e.g., last 7 days, last 30 days, last 3
months, last 12 months, or a past month/quarter).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- *Replenish for*: Number of days to cover future demand.
- *Based on*: Period used to calculate average daily demand (e.g., last 7 days, last 30 days, last 3
months, last 12 months, or a past month/quarter).
- *Replenish for*: number of days to cover future demand.
- *Based on*: period used to calculate average daily demand (e.g., last 7 days, last 30 days, last 3
months, last 12 months, or a past month/quarter).

I know we have gone back and forth on this, but I think we settled on capital letter after : if it is a full sentence, if not, lower case.


.. |RFQ| replace:: :abbr:`RFQ (request for quotation)`

For a straightforward push-based replenishment strategy the *Suggest* feature recommends quantities
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For a straightforward push-based replenishment strategy the *Suggest* feature recommends quantities
For a straightforward push-based replenishment strategy, the *Suggest* feature recommends quantities

Comment on lines +36 to +51
#. **Purchase** and **Inventory** apps must be installed
#. :ref:`Validate at least one delivery order <inventory/delivery/one-step>` for each product

Ensures there is a past delivery record so the system can calculate average daily demand.

#. :ref:`Add a vendor to the vendor pricelist <purchase/manage_deals/vendor-pricelist>` with a
purchase price for each product

The *Suggest* feature is vendor-specific, so each product needs a matching vendor for accurate
purchase quantity and price suggestions.

#. Set the *Product Type* to *Goods* and ensure the product is :ref:`Tracked by quantity
<inventory/product_management/manufacture>`

Ensures the system can manage stock levels and calculate recommended replenishment quantities for
tangible items.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#. **Purchase** and **Inventory** apps must be installed
#. :ref:`Validate at least one delivery order <inventory/delivery/one-step>` for each product
Ensures there is a past delivery record so the system can calculate average daily demand.
#. :ref:`Add a vendor to the vendor pricelist <purchase/manage_deals/vendor-pricelist>` with a
purchase price for each product
The *Suggest* feature is vendor-specific, so each product needs a matching vendor for accurate
purchase quantity and price suggestions.
#. Set the *Product Type* to *Goods* and ensure the product is :ref:`Tracked by quantity
<inventory/product_management/manufacture>`
Ensures the system can manage stock levels and calculate recommended replenishment quantities for
tangible items.
#. **Purchase** and **Inventory** apps must be installed
#. :ref:`Validate at least one delivery order <inventory/delivery/one-step>` for each product.
Ensures there is a past delivery record so the system can calculate average daily demand.
#. :ref:`Add a vendor to the vendor pricelist <purchase/manage_deals/vendor-pricelist>` with a
purchase price for each product.
The *Suggest* feature is vendor-specific, so each product needs a matching vendor for accurate
purchase quantity and price suggestions.
#. Set the *Product Type* to *Goods* and ensure the product is :ref:`Tracked by quantity
<inventory/product_management/manufacture>`.
Ensures the system can manage stock levels and calculate recommended replenishment quantities for
tangible items.

Copy link
Contributor

Choose a reason for hiding this comment

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

The formatting on this section is a little odd in the build (there are extra line breaks). I didn't make changes beyond adding some punctuation but you may want to take another look.

Comment on lines +73 to +77
- :guilabel:`Replenish for`: Number of days intended to stock products
- :guilabel:`Based on`: Historical period used to calculate average daily demand (e.g.,
:guilabel:`Last 30 Days`, :guilabel:`April 2024`)

- :guilabel:`Percentage`: Portion of historical demand to apply (e.g., 100%, 30%)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- :guilabel:`Replenish for`: Number of days intended to stock products
- :guilabel:`Based on`: Historical period used to calculate average daily demand (e.g.,
:guilabel:`Last 30 Days`, :guilabel:`April 2024`)
- :guilabel:`Percentage`: Portion of historical demand to apply (e.g., 100%, 30%)
- :guilabel:`Replenish for`: Number of days intended to stock products.
- :guilabel:`Based on`: Historical period used to calculate average daily demand (e.g.,
:guilabel:`Last 30 Days`, :guilabel:`April 2024`).
- :guilabel:`Percentage`: Portion of historical demand to apply (e.g., 100%, 30%).

.. image:: suggest/suggest-14.png
:alt: Compute suggestion for example 1.

Historical Data:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a very small nitpick, but it might be worth formatting this as a header


.. math::

Average~Daily~Demand = 40 \divide 30 \approx 1.33 \text{units/day}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Average~Daily~Demand = 40 \divide 30 \approx 1.33 \text{units/day}
Average~Daily~Demand = {40/30} \approx 1.33 \text{units/day}

This formula was formatting oddly, I think this is correct, but you will want to double check!


.. math::

Average~Daily~Demand = 40 \divide 14 \approx 5.71 \text{units/day}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Average~Daily~Demand = 40 \divide 14 \approx 5.71 \text{units/day}
Average~Daily~Demand = {40/14} \approx 5.71 \text{units/day}

Same as above, the formula formatted oddly, I think this one is correct

Best practices
==============

#. Validate Historical Data
Copy link
Contributor

Choose a reason for hiding this comment

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

This is optional, but instead of using a numbered list format, I would consider changing this to header format. That would add these to the table of contents at the side of the page, so it is easier for users to navigate/recognize them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants