Commit Graph
313 Commits
Author SHA1 Message Date
Arnold Moyaux 2d1f56381a [FIX] stock(_account): traceback with stock user on forecast report
2 issues:
- When going to the report forecast the value of the stock is computed.
However the stock user should not be able to access the valuations
- Since an access error is return the graph view is not instanciate and
the javascript code try to amend an empty result to the DOM. It results
with a traceback on top of 403 page

closes odoo/odoo#82074

X-original-commit: dbc6b1999ad478d0fdb5774624fd50ca4018be22
Related: odoo/enterprise#23185
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-03 10:52:45 +00:00
Nicolas Pierre bec3c58df3 [IMP] stock: Inventory Adjustments improvements
Improvements of the Inventory Adjustements page, among which:
 - Add a new 'Apply All' button (without the need to select a record)
 - Show the date at which the last count was done
 - Add warning icon next to duplicated SN
 - Allows to change the lot_id when empty and no quantities are set

closes odoo/odoo#78361

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-17 10:10:45 +00:00
William Henrotin 6a23b9bcd6 [REF] *stock*: rename model stock.production.lot into stock.lot
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:05 +00:00
Vishal Thacker a317d12d50 [IMP] stock: do not open reserve/unreserve action in new breadcrumb
Before this commit: when reserve/unreserve button were clicked, it was
opening action in new breadcrumb while it should not open new breadcrumb
instead it should display in self.

After this commit: reserve/unreserve button will open action and replace
current action and will not open new breadcrumb everytime we click.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:25 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Achraf (abz) 612b705975 [FIX] stock: Don't try to load reports from unselected companies
If we have two companies A and B with B selected and we try to access the Forecast Report via a product, company A's warehouse is automatically selected, which of course creates a security error.

This fix modifies the ´get_warehouses´ method in order to return only the warehouses whose company is selected.

opw-2688135

closes odoo/odoo#80021

X-original-commit: 088e97aa3214578de99abbd47bd6aeccff244855
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2021-11-18 15:11:26 +00:00
stefanorigano (SRI) d063d99e15 [REF] product, *: update demo-data images
task#2667024

Part-of: odoo/odoo#79651
2021-11-16 13:03:03 +00:00
Tiffany Chang (tic) 9a67190e3e [IMP] stock: improve buttons for reception report
When reception report is viewed in a mobile screen, the "Print Label(s)"
buttons do not fit well, therefore we use a print icon instead of text
when in a mobile view. To ensure it looks good, we also update the
buttons to have equal width/height where applicable.

Part of Task: 2632884

X-original-commit: fadc2dddf12521b0f81096b6225d67951584b714
Part-of: odoo/odoo#79408
2021-11-05 13:48:50 +00:00
Tiffany Chang (tic) 1c97b75c97 [IMP] mrp,stock: always show product in reception report labels
Previously the reception report > "print labels" would only print the
picking name (or SO if provided) + delivery address (if provided) when
not for a MO. Label has been updated to include the product name.

During this update a few other related improvements were made:
- make the label based on stock.move (so extending is no longer
  needed in MRP)
- formatting of label is improved so now address will be truncated
  instead of wrapping (and potentially losing lines at end of address)
- line padding is reduced so we can fit more lines in the label
- "Print Labels" button at source level will now be enabled when its
  corresponding "Assign All" button is pushed (previously only the
  "Print Label"s of each moves' line was enabled.

Part of Task: 2632884

X-original-commit: 9774c1ab1d68cf095b64a82b56f100d747fc8a56
Part-of: odoo/odoo#79408
2021-11-05 13:48:50 +00:00
b63ee52552 [FIX] *: remove scss 'extend' from dropdown components
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.

Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.

In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.

Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.

// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
  <button class="dropdown-item" type="button">Action</button>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
  <li class="o_dropdown_item">
     <span>Action</span>
  </li>
  <li class="o_dropdown_item">
     <a href="#">Another action</a>
  </li>
</ul>

// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
  <span class="dropdown-item">Action</span>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)

closes odoo/odoo#77649

X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2021-10-04 07:57:00 +00:00
Rémy Voet (ryv) 9779efa93e [FIX] stock: fix lazy list views
- Avoid traceback when click on priority widget
- Also, fetch directly the lazy column if the web client read one record
(happen when we modify a single record).

closes odoo/odoo#77402

X-original-commit: eb26406cff7a0c61768c287a0525c2b6bc123f9e
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-29 13:39:56 +00:00
Rémy Voet (ryv) ac14fd4819 [IMP] stock,mrp: add lazy column in tree view
It allows to read some fields (slow computation) after the render
of the list without blocking the UI.

task-2579011

Part-of: odoo/odoo#77092
2021-09-24 14:00:23 +00:00
Lucas Perais (lpe) 56dda82a5f [REF] web, *: legacy: lazy loading of legacy reporting views
Since commit 0134495ba5 the reporting
views pivot, graph, cohort are written in full new framework.

Some applications still need the legacy ones, so this commit just implements
the lazy loading of those views.

In stock, report_stock_forecasted has been adapted in order to avoid having
a GraphView override: we now modify the canvas' height in pure JS.

*: board, stock

closes odoo/odoo#76931

Related: odoo/enterprise#21054
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-22 12:22:46 +00:00
Arnold Moyaux 0e2c4becf2 [FIX] stock: avoid breaking global scss for thead
commit bc1a6faa51fef60bb64ea09f4e43f1120f9855bd add a rule to fix
tracability report but on a global level. However we won't this behavior
everywhere in odoo or at least if it's the case it shouldn't be specify
there

closes odoo/odoo#76713

X-original-commit: f96c78f701831ed7aa1798765e3e5f81d1a689c1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-20 10:53:56 +00:00
Nasreddin Boulif (bon) 6d20d54479 [FIX] stock: Display only one table header in traceability report
Steps to reproduce:

  - Install Manufacturing module
  - Go to Manufacturing -> Operations -> Manufacturing Orders
  - Create a new one and add at least 10 product components
  - Move it to Done stage
  - Click on stat button Traceability
  - Unfold the components
  - Print report

Issue:

  Table header on 2nd page overlap table content.

Cause:

  Wkhtmltopdf does not handle well table on multiple pages.
  More info here: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2367

Solution:

  Do not duplicate table header on next pages.

opw-2634492

closes odoo/odoo#76535

X-original-commit: 8cc791e2de0f708ff7d69574cc8a8a40ef61c02b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-14 23:38:52 +00:00
242b1caa65 [IMP] web,*: new GraphView component
*hr_timesheet,project,stock

Part-of: odoo/odoo#73311
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-09-07 10:04:38 +00:00
Tiffany Chang (tic) 53cc41016f [IMP] mrp, product, {purchase_, sale_}stock{_picking_batch}: add reception report
New reception report added for non-outgoing transfers. This is intended
to support easier stock allocations by allowing dynamic MTO
assignment/unassignment, e.g. if we have an incoming transfer with
products we want to assign to an existing outgoing transfer, then we can
use the report to create a MTO link to the specific outgoing moves. To
support this assignment flow, the report also allows printing of labels
to place on the product so stock workers know which transfer/MO the
product has been assigned to.

Expected use case is when a product is purchased to fulfil a sale.
Demo data has been added so reception report can be immediately
seen/used for this flow.

Implementation Notes:
- Report has been made flexible to work with batch transfers.
- Only done moves can be assigned to moves that already have quants
  reserved (prevents undesired behavior + this makes sense logically)
- Confirmed (+ Done and everything inbetween) moves can be assigned to
  any confirmed moves that are not already assigned.
- Report does not affect quant reservation/unreservation at all. It
  works only with linking moves (i.e. move_orig_id/move_dest_id) so
  move/transfer linkage traceability is stored within db (i.e. this
  isn't possible with quants)

Limitations: To keep code simple for now, this assignment flow will
  break in certain cases:
1. Done amount of an assigned move is less than the Demand amount
   (linked move will not autoreserve correctly when assigned move is
   validated, same issue already occurs in multi-step transfer).
2. If a linked move is unreserved after its assigned move is
   validated, then another move can reserve its quants and its
   assignment link will not be accurate.
3. Already reserved SNs + assign move, may lead to mismatching SNs
   between report and what's actually reserved.
4. Changing a linked move's Demand amount after a move is assigned to
   it.
5. Potential moves to assign to are only checked for being in same
   warehouse, not in a matching source location to destination location.
   User is expected to make this match on their own.

Task: 2500844
ENT PR: odoo/enterprise#18268
Upgrade PR: odoo/upgrade#2731

closes odoo/odoo#70669

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-17 11:42:23 +00:00
Martin Trigaux c6be07e893 [FIX] stock: lazy loading of translation
The term was untranslated
Export missing stock terms

Forward-port of fb0383f8c1d4ef5817cf67

closes odoo/odoo#75155

X-original-commit: 4a0d1dfd2b48ecad107a687093ac34a3b0d67d60
Related: odoo/enterprise#20247
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-16 13:11:30 +00:00
Quentin Wolfs e2f59a6dd1 [IMP] stock: traceability report origin
Add reference of the traceability report's origin (production.lot,
manufacturing order, picking, ...) to the end of the
report.
Change the layout a bit so the data isn't squashed by
the border.

Task-2467686

closes odoo/odoo#74120

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-16 08:14:09 +00:00
Xavier Morel 5ff6faa67f [FIX] mrp, stock, purchase_stock: d-t-raw-ify leadDaysPopOver
And convert the `t-esc` in the template to `t-out` while at it.

So this was a bit of a bummer initially, the PopoverWidgetField gets a
pile of JSON as its value (so from the server), and that pile contains
a template name (optionally) and... the template context,
basically. For leadDaysPopOver the issue was some of that context is
supposed to be rendered HTML to straight inject into the template,
marking that as HTML-safe would be a bit of an issue (having the JSON
specify which parts of the value it returns are HTML-safe being a bit
of a conflict of interest).

However turns out the thing is way over-complicated and
over-engineered: `lead_days_description` necessarily has a very
regular structure owing to being injected as a set of table rows, so
the various overrides to `_get_lead_days` just make their own lives
complicated by formatting the values they want to return into table
rows matching the format of an unrelated template.

Instead we can change the signature of `_get_lead_days` so the
"description" is a list of values to inject in the table (list of
pairs, each pair matching the corresponding columns of the table). The
template can then take care of formatting those values into table rows
the usual way, removing the need for any injection of raw content.

This also makes for better / clearer translation strings.
2021-07-20 05:41:35 +00:00
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
stefanorigano (SRI) 1fb2cd9af7 [FIX] web, *: drop o_dropdown_toggler_btnclasses
Drop `o_dropdown_toggler_btn` class in favor of `o_dropdown_toggler`.
o_dropdown_toggler_btn was initially introduced in ~13.3, but it's now
obsolete.
2021-06-18 21:31:32 +02:00
Aaron Bohy a5091fee99 [REF] *: rework webclient test helpers
This commit splits the 'getActionManagerTestConfig' helper into 2:
'setupWebClientServiceRegistry' and 'getActionManagerServerData'.

The first one is now automatically called by the 'createWebClient'
helper, as it properly setups the service registry with all services
required by the WebClient component.

The second one generates a few data (menus, actions, views...) that
can be used in tests. That helper is mainly useful for action tests
(formerly ActionManager tests) in web. With this refactoring, they
are no longer generated for each test in the whole codebase that
spawns a webclient, as before this commit.

closes odoo-dev/odoo#906

Related: odoo-dev/enterprise#161
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-18 21:31:30 +02:00
+1 14bffd983e [REF] *: adapt code to new owl webclient
This commit adapts the community codebase to the rewriting of the
/web application in owl.

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-06-18 21:31:27 +02:00
Nicolas Pierre 262b49d85a [IMP] stock: Inventory adjustments improvements
General improvements of the new Inventory Adjustment mechanism, among which:

From the Inventory Adjustment page
 - A new inventory_quantity_set Boolean field is used to hide the Counted Quantity when not set instead of showing 0.
 - Possibile to set 0 as a Counted Quantity directly (not using the set button).
 - Allows to provide a name for the Inventory Adjustment when using the Apply button at the top of the tree view. This name is applied on the corresponding stock moves.
 - Add warnings when trying to Apply/Set on multiple records when some records are not set/already set.
 - Highlight lines when there is a mismatch between Quantity / Counted Quantity / Difference. If the user still tries to Apply, shows the option to either keep the current Difference or the current Counted Quantity for all records.
 - Set the user when directly inserting a Counted Quantity (before only when using the Set button)
 - Add the possibility to import records.
 - Add "To Apply" filter.
 - Add a 'Reset' button at the top of the tree view for multiple records.
From the Update Quantity page of a product
 - Remove the "Updated on Hand Quantity" and can directly change "On Hand" quantity
 - Pre-fill a default location (Last used location for tracked products or default destination location in single WH environment)
From the Inventory Report
 - Remove the "Updated on Hand Quantity" and can directly change "On Hand" quantity

closes odoo/odoo#71199

Task-id: 2495664
Pr-community: 71199
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-31 13:15:54 +00:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
Adrien Widart c322a8b537 [FIX] stock: make warehouse list scrollable
On a product's Forecasted Report page, if the company has a lot of
warehouses, when the user opens the drop-down list to select another
warehouse, the list will exceeds the window height and won't be
scrollable. The user will have to zoom out to see the rest of the list.

`o_dropdown_menu` class is used to add required attributes:
https://github.com/odoo/odoo/blob/a622936ab09497086f43715e546a1b33418d0ee3/addons/web/static/src/scss/dropdown_menu.scss#L7-L8

OPW-2480784

closes odoo/odoo#69672

X-original-commit: aaf8192180846162ebacf3309ca8fb06677e520d
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-22 11:24:03 +00:00
Arnold Moyaux bdcb3d192b [REF] stock: move stock.inventory feature into stock.quant
This commit removes stock.inventory(.line) and moves its general
functionality into stock.quant. Some features are lost during this
switch as well.

Feature Additions:
- New single list view for inventory adjustments (no more multiple
  inventory adjustment records to keep track of!)
- Improved cyclic counts (annual inventory day setting) + next inventory
  dates are immediately viewable in view (vs auto-generated inventories
  based only on location)
- Specific quants (i.e. counts) can be assigned to users for more
  flexibility (vs only able to restrict by location + product
  combinations)
- Counts can be requested (i.e. bulk assigned to user/for a specific
  inventory date)

Feature Removals:
- Can no longer look at previous inventory adjustments linked to a
  specific record. Each quant has a history button to show inventory
  related moves. [relevant account moves are also now harder to see via
  stock as well]

Other changes:
- Bulk of changes were for demo/test
- Some changes were done to ensure "Update Quantity"/"Inventory Report"
  views still mainly function the same as before with the exception of a
  new column added to support updating quant quantities in these views.

Task: 2440026
ENT PR: odoo/enterprise#17329
Upgrade PR: odoo/upgrade#2326

closes odoo/odoo#68409

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-02 11:51:38 +00:00
Tiffany Chang (tic) 0d61d3fccb [IMP] mrp, stock: update reservation logic
This commit adds 2 small feature additions to reservation logic:

1. Add another # days parameter for reserve "before scheduled date"
   option for priority moves (i.e. so they can be marked for reservation
   earlier)
2. Add Reserve button in the forecast report

It also cleans up some auto-reserving logic:
- 'at confirm' now has a reservation_date = day of confirmation:
  - removes need to check `reservation_method` when doing automated
    _action_assign (i.e. in scheduler + completed incoming move).
  - allows ordering by reservation_date during automated _action_assign
    for more consistent and logical reservations.

Task: 2418907
Upgrade PR: odoo/upgrade#2143
2021-03-29 06:54:30 +00:00
nouraellm 2f3978bab7 [FIX] mrp: fix reserved_qty precision issue with forecast availability
Description of the issue/feature this PR addresses:
- Fix tends to fix reserved_qty if the precision of product_uom_qty is higher than 0.5

Current behavior before PR:
- If the precision of product_uom_qty is higher than 0.5 reserved_qty (components availability) appears to be not available although there is enough qty in the stock.

Desired behavior after PR is merged:
- Unless there's no enough qty in the stock, reserved_qty is available.

opw-2425473
opw-2459650
opw-2448443
opw-2446985
opw-2440853
opw-2464507

closes odoo/odoo#67116

X-original-commit: e406e7b2512b52bd45c9c825981678cd2bbd3128
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-03-03 08:58:47 +00:00
Michael Mattiello (mcm)andged-odoo 7086488064 [REF] web, *: remove patchMixin + imp utils.patch
* hr, hr_holidays, im_livechat, mail, snailmail, website,
  website_livechat

This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.

`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.

closes odoo/odoo#65967

Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
2021-02-26 10:39:21 +00:00
Romeo Fragomeli 9de025b410 [FIX] stock: traceability report mounted called twice
Before this commit, the 'mounted' method of the ControlPanel in
the traceability report was called twice.

It happened because the traceability report updated the ControlPanel
before being actually mounted, so mounted was called once when the
traceability report was mounted, and once when the update was applied.

Ideally, this should not be an issue (this isn't an issue with owl).
However, in Odoo, we mix layers of Owl Components and legacy
widgets. In these situations, the above scenario isn't properly
handled (and can't be).

As a consequence, in mobile (enterprise), it crashed because an
handler bound in mounted (thus twice) was only unbound once.

This commit avoids the issue as the update was actually useless.

Steps to reproduces (Mobile):
* Go to Manufacturing (MRP)
* Open the "burger menu"
* Select "Products" -> "Lots/Serial Numbers"
* Select one product in the list (unfold group first)
* Click on the "Traceability" ("stat button")
* Select one line to go to the form view
* Go back to the previous view using breadcrumb
* Optional: Go to another app if the screen can't scroll (e.g. go to Sales)
* Scroll the view => Bug

X-original-commit: bbcd8ce097e62bd1d9ba3a61608324a80a111c24
2021-02-18 16:46:55 +00:00
Nicolas Pierre b03e900a40 [IMP] stock(_*), mrp: highlight PO/SO links on forecast report
Replenishment is great to replace MTO but misses the direct link between SO and PO (smart buttons on both SO and PO to link to the corresponding PO and SO).
The info is actually there in the forecasted report but it is not accessible directly from the PO and in the case of the SO does not highlight the corresponding line of the SO.

This adds a graph icon in the PO, MO and receipt form to directly access the forecasted report (it already exists for SO and delivery).
The information linked to the SO/PO/MO/receipt/delivery is also sent to the forecasted report to highlight the corresponding line.
Note that in the case of the SO, the information needs to go first through the qty_at_date widget (which contains the link to the forecast report).

The graph icon for the PO, receipts and MO turns red when the forecasted quantity at expected date is negative. This is done using the new 'forecasted_issue' field.

closes odoo/odoo#62264

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-02-09 13:41:27 +00:00
svs-odoo 2c49e56d30 [FIX] stock: click on forecast widget
Before this commit, once a field has the 'forecast_widget', the user is
redirect to the forecast report also when they clicks on the field.

How to reproduce:
  - Creates/Opens a delivery;
  - In Operations list, clicks on the reserved qty. field of one of the
    line -> It opens the forecast report.

The wanted behaviour is the user is redirected to the report only if
they clicks on the widget's button, not on the field itself.

task-2415918

closes odoo/odoo#64575

X-original-commit: 22a2845909c6cf96536aa4e664fca5d1ff3fb589
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-01-14 17:41:22 +00:00
JF Aubert 718d16f386 [FIX] stock: multiwarehouses bugfix
Ease multiple warehouses per company creation.
Clarify unique warehouse code constraint message.

task: 2371755

Fix Replenishment Forecasted Report incorrect warehouse & quantity display.

closes odoo/odoo#62601

Task: 2401496 (ticket: 2393320)
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-01-07 10:37:25 +00:00
Adrien Dieudonne 89beb798ff [REF] *: o_button_import doesn't exist anymore
closes odoo/odoo#42082

Related: odoo/enterprise#15492
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-12-29 13:41:25 +00:00
svs-odoo 298ccf560a [FIX] stock: refresh forecast report
Before this commit, refresh the forecast report can lead to error if
this report refer to a product variant (`product.product`).
As it lost to which model the report is supposed to refer, it take the
one by default (`product.template`) which can lead to error (display a
traceback if the ID doesn't exist or display the report for another
product if the ID exists).

How to reproduce:
Open the Forecasted Report for a `product.product` (from the stat button
or from the `sale.order.line` widget for example) then refresh the page.

task-2362313
issue #59924

closes odoo/odoo#62668

X-original-commit: 5b07432af890794742697641a593fc649630316f
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-12-01 14:43:19 +00:00
yhu-odoo 0b4f9124f1 [IMP] stock: impove replenishment empty screen
1. change the empty image
2. move the image upforward to the middle of the screen

closes odoo/odoo#61701

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-13 08:36:05 +00:00
JF Aubert c6847d9110 [IMP] stock: add priority star in forecasted report
see and set priority on sales orders and manufacturing orders in forecasted report
without having to go to the SO/MO

add the priority star icon in front of the SO/MO reference
changing priority should reload the page with reordered SO's/Mo
add a unreserve button next to 'reserved from stock' in the replenishment column
add total order and customer amount in used by column
remove time in delivery/receipt dates
change column headers (Quantity -> the UoM of the product, Expected Receipt -> Receipt, Expected Delivery -> Delivery)
change 'Draft SO' -> 'Quotations' and 'Draft PO' -> 'Requests for quotation' and add links
mobile view: display KPI's on new line
check decimals on quantities, must be 2

closes odoo/odoo#60578

Task: 2349142
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-09 16:44:18 +00:00
Rémy Voet (ryv) 86fd789846 [FIX] stock: disabled forecasted button new line
In One2many tree of stock.move, the forecasted button trigger
a traceback in case of new line because there isn't a target record.
Also, don't show forecasted information when the state of the move
is 'cancel'.

X-original-commit: a1285d16ff32fb31f202ebe01a6afa83e14b9c14
2020-10-19 10:51:04 +00:00
Julien Mougenot db41d41739 [REF] board,stock: adaptation to graph Owl
To reflect the changes on the graph renderer, some class names have been
adapted and the graph views in stock reports are now properly
instantiated.
2020-10-12 07:43:43 +00:00
svs-odoo 9178d9f9c7 [IMP] stock: popover widget new forecasted report
In the replenishment view, the popover widget allows to open the product
forecasted report.
Before this commit, it opened only the forecasted report graph.
Now it opens the new forecasted report (graph + operations table).

Also, moves the widget next to the forecast qty field.

task-2328830

X-original-commit: 36af5e95eddaa18886c9584865e5620494c93e16
2020-10-07 11:22:57 +00:00
Rémy Voet (ryv) 55fdd74587 [IMP] (sale_)stock: forecast button with warehouse
In case of multi-warehouse, the forecast button won't
take in account the related warehouse and redirect to the
forecast report of first warehouse of the company.
To ease the understand of the forecast report redirect
with the right warehouse in the context.

closes odoo/odoo#58837

X-original-commit: 53468d71b913211b38f4856f2bdb62594ee24ea8
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-09-29 14:54:50 +00:00
Rémy Voet (ryv) 01e1ca3468 [FIX] stock: fix empty forecasted report.
When there was no data, the graph overlaps
the empty table. Remove force height in css.

X-original-commit: 8a73dc7776b08a32c70c2492f0044a87f52342dc
2020-09-21 10:36:27 +00:00
Rémy Voet (ryv) f0ac3db667 [FIX] stock: forecasted info change
In reserved field of stock move, instead of showing expected
date of coming moves without enough quantity,
show "Not Availaible".

closes odoo/odoo#58003

X-original-commit: 54c326e87ef2ed43cc89180c4f53baef0fcd569d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-09-18 08:59:06 +00:00
Rémy Voet (ryv) 43cc68c405 [IMP] (sale_)stock: review forecasted information
Remove the json_forecast of the sale order line,
it was a duplicate of information with the qty_at_date_widget.
But improve this one:
- Use the forecasted move information in case of confirmed SO.
- Change the icon (i) to chart.
- Link to the forcasted change to target new forcasted report
(Unfortunately we loose the feature to see components product forcasted
of a kit)
- Change information print in the popover in case of confirmed SO.

Also refactor the json_forcasted of `stock.move` into multiple fields
to avoid to dump/loads for other model who needed the forcasted data.

task-2324039

closes odoo/odoo#56425

closes odoo/odoo#57526

Related: odoo/enterprise#13063
Related: odoo/enterprise#13160
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-15 08:12:37 +00:00
Martin Trigaux d823b90220 [FIX] base: add fake fields
Values for "context" and "data" key were injected into the action
dictionnary by report_action to be used by the /report controller
later

Courtesy of William Henrotin (whe) for the test

X-original-commit: 4d43a301fd10cfeb498d9bf6b614779e26e12d16
2020-09-04 16:21:41 +00:00
svs-odoo 8a7cf5045f [FIX] stock: display forecast btn only for product
The `forecast_widget` will display the forecast report button only for
lines with a storable product.

closes odoo/odoo#55826

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-08-20 15:32:14 +00:00
Rémy Voet (ryv) 57f805f71e [IMP] stock*,mrp*: Dates Refactor
- The deadline of MO generated via procurements is calculated differently.
Now, it doesn't take anymore in account the manufacturing_lead
of the company (Security Lead Time of MO). The computation of planned date remains unchanged.
- The date_expected fields was duplicated with the date fields
except when the move was done. Merge both fields.
The only information lost is: we can't know what was the
scheduled date before processing move (`state` == done).
Indeed, the date becomes the actual move processing datetime.
- The `date` in `stock.picking` field contained the time of
(purchase) order `date_order` (`purchase.order`).
This field is was wrongly used in the kanban view where we
expected to see date_planned instead. Also, the `_order` used
this date instead of date_planned too.
- The `delay_alert` is activate independently of stock rules.
Then it is now activate in all case.
- Remove the auto-reschedulting process of stock move via
the stock rule (`propagate_date` and `propagate_date_minimum_delta`).
Replace it by a automatic deadline date (`date_deadline`) propagation.
The deadline is the promise done to/by vendor/client (SO/PO)
then it is a readonly fields on picking/move and MO.
- Now the Scheduled date (`date`) of stock move is never propagate
and it is only related to the Scheduled date of
related document (MO or picking).
- Now when a move is created from procurement (sale),
`date_planned` = `date_deadline` - `security_lead`.
- The `delivery_date` of sale is no editable after confirmation
and propagate as the deadline to related stock move linked to order_line
- Adapt filter and decoration of MO and picking.
- Because we are the client in case of purchase (PO), the promise of vendor
can be not respected. Then we add the lead security to the deadline
(inverse the sale order logic) of PO picking (promise reciept date
+ security lead) to match with the replenishment.

task-2246665
2020-08-18 07:48:27 +00:00
Anousone Phaysomphot 4c7ede7c50 [IMP] stock: add new digest tips
PURPOSE

Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.

SPECIFICATIONS

“Speed up inventory operations with barcodes”

See code for specifications.

LINKS

Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139

X-original-commit: d679b6f2807b937c1765f20b8a4fb796aec821a7
2020-08-12 12:23:02 +00:00