Commit Graph
6 Commits
Author SHA1 Message Date
Arnold Moyaux 6eaa4a2ae3 [IMP] (purchase_)stock: suppliers information in replenishment
Infobox to help the user with the replenishment. Allow those actions:
- See the different supplier with their lead time, price and quantity
- Be able to select a supplier and set it on the orderpoint
⁻ See the last delivery by mmonth for the product
- Last purchase date for each supplier

Technicaly it use a wizard and a fields char with JSON used by
a widget to display a static template. Also it creates directly
the wizard in backend instead of just let the view manage the new
object since we need a button on a one2many and if the records do
not have an id, it's not possilbe to use it.

closes odoo/odoo#72039

Task: 2519761
Related: odoo/upgrade#2596
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-29 07:41:12 +00:00
Rémy Voet (ryv) d17743e198 [IMP] purchase: add populate 2020-11-30 12:50:09 +00:00
Tiffany Chang (tic) d25d320e0e [IMP] mrp,(purchase_)stock: allow replenishment with only stock module
This commit makes it so products can be replenished without any other
module. This is achieved by adding a "pull" rule to the default receipt
route generated when a warehouse is created. "Pull" rule is added to 1-,
2-, and 3-step receipt routes. Previous to this commit, an additional
module (e.g. purchase, mrp, etc.) was needed for a pull rule to trigger
with the existing receipt route rules. Replenishments can be triggered
via "Replenish" button in product form, recording rules (auto trigger),
and replenishment (manual trigger).

Additionally, this commit makes it so when other modules (mrp, purchase)
that handle replenishment are installed, this additional "pull" rule is
removed from the default receipt route to prevent undesired behavior
(e.g. MTO manufacturing components magically being received from no
where). Unfortunately this means 2 undesirable situations:

1. If a user adds adds/changes rules to the receipt route and then installs
   mrp or purchase then their additions/changes will be removed.
2. If a user removes either (when only 1 installed) or both of these
   modules then stock module will again not be able to replenish as the
   pull rule will not be re-added to the receipt route.

It is expected that these 2 cases do not need to be handled in most
cases or can be handled by advanced users.

Stock tests have also been updated to accomodate this new pull rule.

Specification 4 of overall inventory onboarding improvement task.
Task: 2220129
Related Enterprise PR: odoo/enterprise#10719
2020-06-18 08:33:22 +00:00
Arnold Moyaux 1e160dffd3 [IMP] stock, mrp: picking before and after manufacturing
Currently MRP do not handle multi locations for components. In order to
be able to use both feature at the same time, we could:
- Improve mrp in order to handle multiple stock.move.line for a
componenet stock.move
- Add a rule that allow to bring all the good from multiple location to
a single location. (was already possible but it requires some
configuration)
This commit introduce a checkbox on the warehouse in order to
automatically configure all the routes/rules/locations/picking_types,...
necessary to bring all the components to a single location before
running the manufacturing order.

Technically it also refactor some stock_warehouse.py methods in order to
easily override the picking_type, rules and routes creation.

Thank to Hetashree Chauhan <hch@odoo.com> for his help.

task_id: 27785
2018-08-13 15:38:34 +02:00
Arnold Moyaux 202b0515c8 [FIX] purchase_stock: post init hook for warehouses rules 2018-07-19 14:43:08 +02:00
jem-odoo 8d4609a1db [MOV] purchase: move file in purchase_stock 2018-05-23 10:13:48 +02:00