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
closesodoo/odoo#82074
X-original-commit: dbc6b1999ad478d0fdb5774624fd50ca4018be22
Related: odoo/enterprise#23185
Signed-off-by: Arnold Moyaux <arm@odoo.com>
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
closesodoo/odoo#78361
Signed-off-by: Arnold Moyaux <arm@odoo.com>
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
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
closesodoo/odoo#80021
X-original-commit: 088e97aa3214578de99abbd47bd6aeccff244855
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
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
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
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)
closesodoo/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>
- 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).
closesodoo/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>
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
closesodoo/odoo#76931
Related: odoo/enterprise#21054
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#76713
X-original-commit: f96c78f701831ed7aa1798765e3e5f81d1a689c1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
closesodoo/odoo#76535
X-original-commit: 8cc791e2de0f708ff7d69574cc8a8a40ef61c02b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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#2731closesodoo/odoo#70669
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
The term was untranslated
Export missing stock terms
Forward-port of fb0383f8c1d4ef5817cf67
closesodoo/odoo#75155
X-original-commit: 4a0d1dfd2b48ecad107a687093ac34a3b0d67d60
Related: odoo/enterprise#20247
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
closesodoo/odoo#74120
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
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.
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.
closesodoo/odoo#72039
Task: 2519761
Related: odoo/upgrade#2596
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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.
closesodoo-dev/odoo#906
Related: odoo-dev/enterprise#161
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
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>
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
closesodoo/odoo#71199
Task-id: 2495664
Pr-community: 71199
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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#2326closesodoo/odoo#68409
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
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
closesodoo/odoo#67116
X-original-commit: e406e7b2512b52bd45c9c825981678cd2bbd3128
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
* 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.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
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
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.
closesodoo/odoo#62264
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
closesodoo/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>
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 #59924closesodoo/odoo#62668
X-original-commit: 5b07432af890794742697641a593fc649630316f
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
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
closesodoo/odoo#60578
Task: 2349142
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
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
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.
closesodoo/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>
In reserved field of stock move, instead of showing expected
date of coming moves without enough quantity,
show "Not Availaible".
closesodoo/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>
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
closesodoo/odoo#56425closesodoo/odoo#57526
Related: odoo/enterprise#13063
Related: odoo/enterprise#13160
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
- 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
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