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

[11.0][IMP] stock_orderpoint_generator: auto values #764

Conversation

chienandalu
Copy link
Member

@chienandalu chienandalu commented Nov 20, 2019

Now minimum and maximum quantity fields can be computed automatically
if desired for the set of products and according to the desired criteria for
the time range given. To do so:

  1. In an Orderpoint template, check "Auto minimum" or "Auto maximum" or both.
  2. The criteria fields for either one or another are visible now.
  3. Select a time range of moves to evalute. For every product a history of
    the resulting stock for every move in such range and the location given
    on the Orderpoint template will be obtained.
  4. Select a criteria method to compute the minimum o maximum quantity:
    • Maximum: the maximum stock value for the given period.
    • Most frequent: the median of the history of stock values for the specified
      range. Useful when a large amount of history values are obtained, as it
      tends to avoid deviation caused by extreme values in a common avarage.
    • Average: Arithmetic mean of the stock history.
    • Minimum: the minimum stock value for the given period.
  • Add tests

cc @Tecnativa TT18618

@pedrobaeza pedrobaeza added this to the 11.0 milestone Nov 20, 2019
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.

Tests are failing

stock_orderpoint_generator/README.rst Show resolved Hide resolved
stock_orderpoint_generator/models/orderpoint_template.py Outdated Show resolved Hide resolved
stock_orderpoint_generator/models/orderpoint_template.py Outdated Show resolved Hide resolved
stock_orderpoint_generator/models/orderpoint_template.py Outdated Show resolved Hide resolved
stock_orderpoint_generator/models/orderpoint_template.py Outdated Show resolved Hide resolved
stock_orderpoint_generator/models/orderpoint_template.py Outdated Show resolved Hide resolved
@pedrobaeza pedrobaeza changed the title [IMP] stock_orderpoint_generator: auto values [11.0][IMP] stock_orderpoint_generator: auto values Nov 20, 2019
@chienandalu chienandalu force-pushed the 11.0-imp-stock_orderpoint_generator-variable-qty branch 2 times, most recently from b25ec35 to 52037bc Compare November 21, 2019 16:02
@pedrobaeza
Copy link
Member

Travis is still red

@chienandalu chienandalu force-pushed the 11.0-imp-stock_orderpoint_generator-variable-qty branch from 52037bc to 7c65185 Compare November 25, 2019 17:37
@chienandalu
Copy link
Member Author

Hopefully full coverage now

@pedrobaeza
Copy link
Member

Well, if it goes green maybe 😝

@chienandalu chienandalu force-pushed the 11.0-imp-stock_orderpoint_generator-variable-qty branch from 7c65185 to 9d7acea Compare November 26, 2019 08:45
Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

Functionally tested 👍

@chienandalu
Copy link
Member Author

CIs pending on this incidental issue #769

@chienandalu chienandalu force-pushed the 11.0-imp-stock_orderpoint_generator-variable-qty branch from 9d7acea to 0980382 Compare November 26, 2019 16:45
@chienandalu chienandalu force-pushed the 11.0-imp-stock_orderpoint_generator-variable-qty branch from 0980382 to a738549 Compare December 2, 2019 08:31
@chienandalu
Copy link
Member Author

Green now

@pedrobaeza
Copy link
Member

/ocabot merge major

OCA-git-bot added a commit that referenced this pull request Dec 2, 2019
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 11.0-ocabot-merge-pr-764-by-pedrobaeza-bump-major, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@chienandalu
Copy link
Member Author

mm, the bot didn't merge the branch

@pedrobaeza
Copy link
Member

Let's try again

/ocabot merge major

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 11.0-ocabot-merge-pr-764-by-pedrobaeza-bump-major, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Dec 3, 2019
Signed-off-by pedrobaeza
@OCA-git-bot OCA-git-bot merged commit a738549 into OCA:11.0 Dec 3, 2019
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a04a339. 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.

None yet

5 participants