Commit Graph

2726 Commits

Author SHA1 Message Date
Guewen Baconnier
f2553e0fc3 Allow changing a putaway tray type after assigned
When the shuttle screen propose a tray based on a tray type and we
are in the 'save' step, where we are supposed to physically putaway
the good and save, we should still be able to change the tray type
to fetch another tray.
2021-09-16 20:17:33 +07:00
Guewen Baconnier
abdde7cbf5 Add stock_vertical_lift_storage_type
Compatibility module between stock_vertical_lift and stock_storage_type
(in OCA/wms).

In the vertical lift's Putaway screen, when a good is scanned for a putaway, the
user has to scan the tray type of the corresponding size, so an empty place in a
matching tray is found. When we use storage types, we should know what tray is
compatible with the storage type.

Changes with this module:

* The storage types of trays cannot be selected in the locations form, they have
  to be set in the Tray types.
* In the lift put-away screen, when a package has a storage type, the user isn't
  asked to scan a tray type, instead, the putaway of the Package Storage Type is
  applied.
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
5fb25caed4 Fix issues in Pick mode
* The change of destination location was not updated on the screen when
  the barcode was scanned (it was when the "manual barcode wizard" is
  used though)
* We should be able to pick partially available move lines
* prevent to scan a location when no move line is selected or the move
  line has already been set to done
2021-09-16 20:17:33 +07:00
Alexandre Fayolle
b3ffc206ce [FIX] command key must be a string
not a list
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
Guewen Baconnier
cf5848c2c3 Add method to refresh a shuttle screen
Example of usage in an odoo shell, when a screen is open:

>>> self.env['vertical.lift.shuttle'].browse(1)._operation_for_mode().operation_descr = 'foo'
>>> self.env['vertical.lift.shuttle'].browse(1)._send_notification_refresh()
>>> env.cr.commit()

Provided the longpolling is correctly configured with a proxy, the
screen should immediately refresh with 'foo' as operation description.
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
d9d0dc8d63 Fix 'fetch' buttons on move lines
There is no such action as 'ir.actions.do_nothing', it kinda works,
until you look into the js console and stares at the errors.

There is a nice OCA module that serves this purpose (more or less,
because it reloads the window, this is not an issue).
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
Dũng (Trần Đình)
4920bf655c [IMP] stock_orderpoint_route: black, isort, prettier 2021-09-16 14:58:30 +07:00
OCA-git-bot
f0b3736c43 [UPD] README.rst
[UPD] Update stock_orderpoint_route.pot
2021-09-16 14:58:30 +07:00
mreficent
4a6e0aafae [UPD] Eficent -> ForgeFlow 2021-09-16 14:57:40 +07:00
OCA-git-bot
514a866d10 [UPD] README.rst 2021-09-16 14:57:40 +07:00
Guewen Baconnier
a53fd653c3 Improve code after reviews
* performance (less queries executed)
* disable tracking in tests (faster)
* use with_user instead of sudo
* the double for loop in _compute_route_ids actually generates one more
  query as the simple one in this commit (thanks to the cache)
* extract a method
* the parent locations can be found using 'parent_of' which will use the
  parent_path under the hood (example: 1/7/8 will return locations 1, 7,
  8)

[UPD] Update stock_orderpoint_route.pot
2021-09-16 14:57:38 +07:00
Guewen Baconnier
2d09392b16 run pre-commit with new prettiers 2021-09-16 11:56:54 +07:00
Guewen Baconnier
6b6cf92d46 [MIG] stock_orderpoint_route: Migration to 13.0 2021-09-16 11:56:54 +07:00
Guewen Baconnier
ba113edfc9 [IMP] stock_orderpoint_route: black, isort 2021-09-16 11:56:54 +07:00
Guewen Baconnier
68f5dd2b7c Use SavepointCase in tests
To avoid executing the setup for each test
2021-09-16 11:56:54 +07:00
Guewen Baconnier
b2756120ae Migrate stock_orderpoint_route to 12.0 2021-09-16 11:56:54 +07:00
Jordi Ballester Alomar
530f360c8c [11.][ADD] stock_orderpoint_route 2021-09-16 11:56:54 +07:00
Tran Thanh Phuc
94da4efcf2 [IMP] stock_location_bin_name: black, isort, prettier 2021-09-16 08:27:57 +07:00
Guewen Baconnier
fb6cde34fe run pre-commit with new prettiers 2021-09-16 08:27:57 +07:00
Guewen Baconnier
28e8b83563 [MIG] stock_location_bin_name: Migration to 13.0 2021-09-16 08:27:56 +07:00
Guewen Baconnier
1d2f33d966 [IMP] stock_location_bin_name: black, isort 2021-09-16 08:27:56 +07:00
Guewen Baconnier
8af14c98a2 Change the area field as a related field
It is not stored because we only need it for the generation of the name.
It slows creation of locations for no value.
If we need to search on it, we can use a search method.
2021-09-16 08:27:56 +07:00
Akim Juillerat
9e6885b574 12.0 Add stock_location_bin_name (split from stock_location_zone) 2021-09-16 08:27:56 +07:00
OCA-git-bot
bcdef7301b [ADD] setup.py 2021-09-15 06:08:49 +00:00
OCA-git-bot
fc739c2cd3 [UPD] README.rst 2021-09-15 06:08:48 +00:00
OCA-git-bot
0eb2f5f0dd [UPD] addons table in README.md 2021-09-15 06:08:44 +00:00
oca-travis
5526cb1444 [UPD] Update stock_measuring_device_zippcube.pot 2021-09-15 05:51:55 +00:00
OCA-git-bot
fb1fb058c5 Merge PR #1243 into 14.0
Signed-off-by simahawk
2021-09-15 05:45:15 +00:00
Hai Lang
ab84020d82 [MIG] stock_measuring_device_zippcube: Migration to 14.0 2021-09-14 21:11:55 +07:00
Hai Lang
442d2a8980 [IMP] stock_measuring_device_zippcube: black, isort, prettier 2021-09-14 21:11:55 +07:00
Matthieu Méquignon
25eb29388f stock_measuring_device: Auto-refresh zipcube wiz when measurement is done 2021-09-14 21:11:55 +07:00
Matthieu Méquignon
02281cf8a9 Zippcube measure update
When the measure update is call from somewhere else than the
device wizard, an exception is raised.
2021-09-14 21:11:55 +07:00
Alexandre Fayolle
db6e0e5142 [ADD] stock_measuring_device_zippcube
support for Bosche Zippcube measuring devices
2021-09-14 21:11:55 +07:00
OCA Transbot
024a598047 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_available_mrp/
2021-09-14 13:56:56 +00:00
OCA-git-bot
d1e2219b3e [ADD] setup.py 2021-09-14 13:56:47 +00:00