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
In stock:
1. remove string of action_show_details button, only show icon
2. late filer have been megered with planning issues filer,
update the name. (also in mrp)
3. add width to json_lead_days_popover field to show it properly
4. change inventory adjustment empty screen image.
In purchase:
1. in reminder mail, show "undefined" when no date. This will
only be shown in preview. When no date, we won't send reminder mail to
the vendor.
2. remove old book icon for document in setting.
3. check if there is date_planned when craete a confirm date url
4. RFQs late filter now show all late RFQs with in state "draft",
"sent", and "to approve".
5. improve the the words in KIP and empty screen and list view
Task 2298950
PR #55155closesodoo/odoo#55740
Related: odoo/enterprise#12344
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Adds the Replenishment Report, a printable report on product variants
and product templates. This report displays all draft and planned moves.
It has also the purpose to be overridden to handle purchase and sale
lines, and product's consumptions/productions of manufacturing orders.
Documents listed in the report can be accessed by clicking on their name.
task-2058495
Co-authored-by: sle-odoo <sle@odoo.com>
1. Batch transfers: set demo data backgroud for Kanban & Tree
2. Packages: set demo data backgroud for Kanban & Tree, update the
helper message.
3. Lot/SN: improve helper message.
4. Stock inventory: use a scanner instead of the smilling face in the
helper.
5. Replenishment: Enable sample data and use new helper image.
6. mrp: Enable sample date and use new helper image for workorder.
Task 2253588
PR #54415closesodoo/odoo#54741
X-original-commit: 7c75ec9951f6d55121d6dc8cb4942e96641b4a66
Related: odoo/enterprise#11957
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit updates the orderpoint (replenishment) view with the
following changes:
- group "Min Quantity", "Max Quantity", and "To Order" together
- make preferred route "selection" only (note that widget="selection"
does not work in list view => standard workaround applied)
- renaming of order buttons: "Order" => "Order Once" and "Order Always"
=> "Automate Orders"
- add a link to forecasted inventory report for the product (note this
link will show even if there is no data to show in the report)
- remove class decorates from replenishing related buttons ("Order
Once", "Automate Orders", and "Snooze")
Specifications 14 and 15 of inventory usability task.
Task: 2206279
Related Enterprise PR: odoo/enterprise#10723closesodoo/odoo#51681
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit adapts tests following recent changes on the helpers.
The main change is that addMockEnvironment (and all functions using
it) are now async, as they need to wait for services to be started.
The virtual record have their date and forecast at date recompute
after creation. It means that the popover saying today is False since
it took the date with lead days.
closesodoo/odoo#51507
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Activate the multi-warehouse automatically when there is more than 1 in
a company. Then remove the multi-warehouse setting in the config, and
allow to create warehouse. Because create a warehouse can change
groups of the user, we reload the page when there is any modification.
Update warehouse demo data accordingly (remove the second warehouse
of the second company).
task-2196687
closesodoo/odoo#49625
Related: odoo/upgrade#1253
Related: odoo/enterprise#9934
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Set the padding on the write for date. Modify the text to be consistent
with the manual and automatic orderpoint. Explains the min, max
and quantity to order mechanism.
closesodoo/odoo#48536
Task: 2161378
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
New report to easily order missing products in each warehouse.
Orderpoint have a new type: 'manual'. Manual orderpoint are not
trigger by the scheduler but the user could create replenishment
from the report directly. The report use the forecast report in
order to detect missing quantity for today (it does not search
depending the lead time for each product warehouse due to lake
of performance). It compares missing quantity with incoming RFQ
and other ongoing orderpoint. If it still missing a new entry
for replenihsment is created (it's also automaticaly deleted if
the replenihsment has been done another way).
Task: 2161378
Related to 18e5416636
Due to changes made into the related commit, the buttons to start or
continue an inventory adjustment no more work.
closesodoo/odoo#47795
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit, the control panel of the stock traceability report actions was
updated before being instantiated.
Now, only the props of the control panel are updated before its first rendering.
Added a test asserting that the action is properly working.
closesodoo/odoo#47823
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Adaptation of the code throughout all modules to properly instantiate the newly
refactored control panel and update it accordingly.
Part of task 2196029
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
At the moment, when a rule has a supply method "Take from stock, if
unavailable, trigger another rule", it is displayed as a "take from
stock" rule
In order to differentiate the rule supply method, we should rather show,
thanks to a vertical bar, when a rule is in take from stock, and use
both a vertical bar and the three dots when it is in "take from stock,
if unavailable, trigger another rule"
task-2205748
closesodoo/odoo#47541
X-original-commit: e1c1093c3d5fb7be69e8d1d26bcac184b5dc07b2
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The hover effect on popover is the following: the popup is opened when
passing the mouse cursor on the icon and closed once it leave the icon.
The issue is if the popup has a button inside, clicking the button
freeze the popup. It cannot be closed unless the entire page is
refreshed
Task : 2199078
closesodoo/odoo#47408
X-original-commit: 25947264929a602256bd7febafa074ef7dabf7bd
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
For stock, purchase, repair and mrp modules, do a small clean of ACL:
Remove duplication and useless line.
Also improve the readability of the stock traceability report.
task-2172399
closesodoo/odoo#45055
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The icon of the json popover become a warning icon
when there is a issue. Also, create a
field show_json_popover in mrp_production
to avoid using d-none to put in invisible the popover.
task-2178494
closesodoo/odoo#45420
X-original-commit: 270e8d34b2adec07e8ae3b8952514184d2a00b59
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Since 94a3919, the report_location_barcode.scss asset is never loaded.
The report_stock_rule has the same template id than the report_location_barcode
one. This later is so always overridden.
This commit delete the barcode location css as it was not really usefull
closesodoo/odoo#45340
X-original-commit: 9b610d066d25007561ac469f7caf5919c0aa4092
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>