24 Commits

Author SHA1 Message Date
OCA-git-bot
444d2c5794 Merge PR #1944 into 14.0
Signed-off-by simahawk
2024-03-26 14:16:41 +00:00
SilvioC2C
3090939dcc [IMP] stock_vertical_lift: lesser UI improvement 2024-02-26 17:31:27 +01:00
SilvioC2C
702c876a23 [IMP] stock_vertical_lift: filter notifications by screen
If the same user opens multiple shuttles operations on different screens,
notifications for a specific shuttle will be displayed on all of them,
regardless of the shuttle operation that triggered the notification.

This commit allows filtering notifications per screen, so that only
screens displaying shuttle operations related to the current notifications
will display them.

Notifications that are not shuttle-related are not filtered out.
2024-02-19 14:55:33 +01:00
Enric Tobella
6af23355e8 *: Fix pylint 2023-10-29 20:43:42 +01:00
Carlos Serra-Toro
f092b86092 [FIX] stock_vertical_lift: skip button is only for pick operation
The button to skip an operation is only implemented for the pick
operation (not for the put or for the inventory ones) but it was
shown in the screens for all the operations, yielding to a stack
trace when it was pressed from the wrong operationg. The button
has been moved now to the screen for the pick operation, only.
2021-09-16 20:17:34 +07:00
Carlos Serra-Toro
e1e417b5f7 [IMP] stock_vertical_lift: Add skip operation to vertical lift shuttles
In the screen for the vertical lift shuttles, accessible through
Inventory > Operations > Vertical Lift Shuttles, a new button has been
added to allow to skip an operation. This button can also be triggered
by scanning the barcode O-BTN.skip.svg that is inside the folder
'images'.

When a skip is done, the next stock.move.line to pick is chosen and
shown to the operator. A skipped move line is added to the end of the
list of pending move lines to be picked, so they will be shown again
in the future as soon as the other move lines have been successfully
processed.

This option was added because, sometimes, the operator can not process
a move line for whatever reason. Right now, the only way of proceeding
is to wait until he/she can effectively process it, which involves a
delay in the operations. With this new skip operation, the operator
can continue processing the rest of move lines.
2021-09-16 20:17:34 +07:00
Simone Orsi
60ab3f72a1 stock_vertical_lift: change x/y tray order 2021-09-16 20:17:33 +07:00
Simone Orsi
6a702b30bb stock_vertical_lift: packaging template more flexible
As the template is not used by JS we can pass full objects to it.
This way we can use any recordset information directly in the template
without having to override the method.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
c58d60a26d Add release (close) of vertical lift trays
* Rename methods that fetch a tray to prevent confusion
* Add methods to release a tray
* The Kardex method to fetch a tray has to send "0" in the carrier and
  carrierNext field
* The pick and inventory screens release the tray only when there is no next
  line, because the release is implicit when we fetch the next line,
  the put screen releases everytime because the operator may take time
  to start the next line and we don't know if they are going to scan a
  next line or not.
* Exiting the screen or switching screen between put/pick/put-away has
  to release the tray as well.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
7d78e8b540 Rework workflows using a small state machine
The documentation of the state machine is in
VerticalLiftOperationBase._transitions.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
d1b7a6f47c Execute the barcode scanner method as side-effect method
Instead of going through the onchange machinery.
The intended usage of onchange methods is to update something on the
screen, without side-effects in the database, then let the user save
the form with the proposed changes.

Weirdly, the barcode scanner event triggers an onchange on the field
`_barcode_scanned`.

It doesn't work well with our use case, as the whole form is read-only
and we only care about having the barcode events doing side-effects on
the backend and displaying back the changes.

This particular onchange will then be executed as a normal method, with
side-effects. However, contrarily to other actions on the form, the
frontend does not reload the view after an onchange, as it relies on the
data returned back in the values. As we cannot know which values may
have been changed in the different implementations (location
destination, state, ...), the onchange returns a read with every field.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
98988078d5 run pre-commit with new prettiers 2021-09-16 20:17:33 +07:00
Guewen Baconnier
9ae58438ad Replace custom js by 'target': 'main' 2021-09-16 20:17:33 +07:00
Guewen Baconnier
439d2bc72c [MIG] stock_vertical_lift{,_kardex}: Migration to 13.0 2021-09-16 20:17:33 +07:00
Guewen Baconnier
d9cbd996b0 [IMP] stock_vertical_lift: black, isort 2021-09-16 20:17:33 +07:00
Alexandre Fayolle
68e10cd503 [IMP] add a proxy to communicate with the kardex server 2021-09-16 20:17:33 +07:00
Alexandre Fayolle
06fa3da67f [IMP] abstract communication with shuttle 2021-09-16 20:17:33 +07:00
Guewen Baconnier
084c86b356 Add button on locations to fetch the tray 2021-09-16 20:17:33 +07:00
Guewen Baconnier
abb323ce89 Implement inventory screen 2021-09-16 20:17:33 +07:00
Guewen Baconnier
fcd1c6b766 Add Put-Away workflow 2021-09-16 20:17:33 +07:00
Guewen Baconnier
7d582b450f Add default views to re-open the screen views properly
When we refresh the page on the browser when we are using the "screen"
view, odoo loses the information that we want the view to be headless,
fullscreen, etc. so it's displayed pretty badly.  This view is a
work-around: its priority is lower, so it will be picked up by default
on loading, and a button allows to re-open the screen view with the
proper options.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
4d3ce20810 Split the shuttle operations in different models/views
Namely, the pick/put/inventory operations are now split in
different models.

Pick and Put share a model and customize their behavior, which is pretty
similar. The inventory operation will have a different view and
different workflow.

This changes will ease a lot the customization of the different
workflows and views.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
4e00019c7d Add method on location to fetch a tray
* Add vertical_lift_shuttle_id field on stock.location, help to find the
shuttle for a location
* Add StockLocation.fetch_vertical_lift_tray(), that needs to be
implemented in addons to send commands to the hardward to fetch a tray,
and if existing show a cell (laser pointer, ...)
* Add helpers on stock.move.line fetch_vertical_lift_tray_source() and
fetch_vertical_lift_tray_dest() that fetch the tray directly from a move
line's source or destination location
2021-09-16 20:17:33 +07:00
Guewen Baconnier
fc52390b14 Add stock_vertical_lift module 2021-09-16 20:17:33 +07:00