Commit Graph

1044 Commits

Author SHA1 Message Date
Guewen Baconnier
912a3e9239 Fix test incompatibility with stock_reserve_rule
The rules created in demo data of stock_reserve_rule make the tests of
stock_vertical_lift (and possibly other modules) fail because the
transfers can't be made available.

Deactivate the rule in stock_reserve_rule and activate it only in its
tests. Users can still activate the rule manually to test.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
3f68e5caaf Putaway: show rainbow man when all the lines are putaway 2020-08-27 11:50:34 +02:00
Guewen Baconnier
c16a5e308b Ignore storage types constraints on quants in cells
When the putaway selects a tray and a cell according to the storage
type, we still want the user to be able to override the selection by
scanning another tray type.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
e01d754e93 Extract methods to allow more precise overrides 2020-08-27 11:50:34 +02:00
Guewen Baconnier
823e11fafd Ask to scan a tray type when no storage type is configured
The use cases we want to cover are:

1. Putaway for a package/good without storage type
2. Putaway for a package with a storage type configured to be
   stored in a tray (associated with a tray type)
3. Putaway for a package with a storage type NOT configured on a tray
   type

The case 1. is implement in "stock_vertical_lift", the 2. was already
implement in this module, this commit implements the case 3.

A typical flow is:

* We configure a generic Kardex Box storage type, not associated with
  any tray type, that is set on the package at reception (the reception
  person doesn't know the tray type at this point). this Kardex Box
  storage type is set on the Vertical Lift view (above the shuttles).
* On the putaway transfer, as per the configuration above, the putaway
  changes the destination location to the Vertical Lift view.
* When we scan the package in the shuttle's screen, as we have a storage
  type which is not configured on any locations in the shuttle
  (reminder, if we had, it would select the tray automatically), the
  user is asked to scan a tray type of the correct size.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
5fa7e38e0a 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.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
1c56825b1a 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.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
feb1aa1d80 Rework workflows using a small state machine
The documentation of the state machine is in
VerticalLiftOperationBase._transitions.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
cf71354644 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.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
4dfc22f11b 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
2020-08-27 11:50:34 +02:00
Alexandre Fayolle
318f101787 [FIX] laser position are integers 2020-08-27 11:50:34 +02:00
Alexandre Fayolle
63dd8a5c3b [IMP] raise exceptions when config NOK
we need a level to fetch a tray
we need the tray dimensions to point a cell
2020-08-27 11:50:34 +02:00
Alexandre Fayolle
8c283b3ab3 [FIX] command key must be a string
not a list
2020-08-27 11:50:34 +02:00
Alexandre Fayolle
97375bd90f [FIX] laser pointer command
The parameter was not passed in the method chain, loosing track
of the cell to which the laser pointer should be pointed at.
2020-08-27 11:50:34 +02:00
Alexandre Fayolle
d5e8767067 stock_vertical_lift_kardex: add missing dependency
we use the `level` field to materialize the tablar index -> this
field is provided by `stock_location_position`
2020-08-27 11:50:34 +02:00
Alexandre Fayolle
55c6e662e7 [IMP] Fix naming of the shuttle address
we hardcode the ID of the gate for now, hence we support
only a single gate.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
6b4c0045fe run pre-commit with new prettiers 2020-08-27 11:50:34 +02:00
Guewen Baconnier
44576e6932 Add +x on kardex-proxy.py script 2020-08-27 11:50:34 +02:00
Guewen Baconnier
141a0e6c75 Replace custom js by 'target': 'main' 2020-08-27 11:50:34 +02:00
Guewen Baconnier
b574c829c1 [MIG] stock_vertical_lift{,_kardex}: Migration to 13.0 2020-08-27 11:50:34 +02:00
Guewen Baconnier
e6733ddf73 [IMP] stock_vertical_lift: black, isort 2020-08-27 11:50:34 +02:00
Alexandre Fayolle
86e9e62306 [IMP] add a proxy to communicate with the kardex server 2020-08-27 11:50:34 +02:00
Guewen Baconnier
bbeb506db3 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.
2020-08-27 11:50:34 +02:00
Alexandre Fayolle
82e5c5b087 [IMP] abstract communication with shuttle 2020-08-27 11:50:34 +02:00
Guewen Baconnier
fc995a9410 Add button on locations to fetch the tray 2020-08-27 11:50:34 +02:00
Guewen Baconnier
aeb3cfa59f 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).
2020-08-27 11:50:34 +02:00
Guewen Baconnier
0c9f88d953 Implement inventory screen 2020-08-27 11:50:34 +02:00
Guewen Baconnier
bcfb269e2f Add Put-Away workflow 2020-08-27 11:50:34 +02:00
Guewen Baconnier
178b45604f 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.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
ab764e13fc 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.
2020-08-27 11:50:34 +02:00
Guewen Baconnier
e3020a2567 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
2020-08-27 11:50:34 +02:00
Guewen Baconnier
311fb24447 Add stock_vertical_lift module 2020-08-27 11:50:34 +02:00
OCA-git-bot
3eb8429ef8 stock_available 13.0.1.0.1 2020-08-24 11:40:09 +00:00
OCA-git-bot
9bc77dfa9f [ADD] setup.py 2020-08-24 11:40:09 +00:00
oca-travis
aa4696f03d [UPD] Update stock_available.pot 2020-08-24 10:20:29 +00:00
OCA-git-bot
b2015553e1 Merge PR #802 into 13.0
Signed-off-by rousseldenis
2020-08-24 09:34:41 +00:00
OCA-git-bot
7798fd25d1 Merge PR #950 into 13.0
Signed-off-by rousseldenis
2020-08-18 07:17:06 +00:00
Denis Roussel
de47e05472 [13.0][IMP] README.md: Show Weblate status 2020-08-17 14:17:25 +02:00
OCA Transbot
ef8981604e Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_inventory_preparation_filter
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_inventory_preparation_filter/
2020-08-16 11:39:06 +00:00
OCA Transbot
5fb0b7b8bb Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_cycle_count
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_cycle_count/
2020-08-16 11:36:34 +00:00
OCA Transbot
4282fa15c0 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_request_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_request_tier_validation/
2020-08-16 11:32:53 +00:00
OCA Transbot
bf35863996 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_request_purchase
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_request_purchase/
2020-08-16 11:32:30 +00:00
OCA Transbot
d75afea3d1 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_request_kanban
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_request_kanban/
2020-08-16 11:32:23 +00:00
OCA Transbot
80fff0c5dd Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_location_zone
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_location_zone/
2020-08-16 11:32:08 +00:00
OCA Transbot
390b867b5a Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_request
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_request/
2020-08-16 11:32:00 +00:00
OCA Transbot
caf4b7617c Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_inventory_discrepancy
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_inventory_discrepancy/
2020-08-16 11:29:29 +00:00
OCA Transbot
6bee39ed5b Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_secondary_unit
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_secondary_unit/
2020-08-16 11:28:29 +00:00
OCA Transbot
27cc6fb5d5 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_move_location/
2020-08-16 11:27:57 +00:00
OCA Transbot
d978cdc5d0 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_orderpoint_uom
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_orderpoint_uom/
2020-08-16 11:27:43 +00:00
OCA Transbot
f2d5dda450 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_demand_estimate
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_demand_estimate/
2020-08-16 11:25:12 +00:00