From a5cf4d0b238b9101baf4cf936ac94b531a133535 Mon Sep 17 00:00:00 2001 From: Joan Sisquella Date: Mon, 9 Dec 2019 12:58:58 +0100 Subject: [PATCH] [11.0][FIX] stock_move_location: * fix test as per migration * fix inconsistency in reserved quantity for planned transfers --- stock_move_location/README.rst | 10 +++- .../i18n/stock_move_location.pot | 47 +++++++++++++++++++ .../static/description/index.html | 9 +++- .../tests/test_move_location.py | 1 - .../wizard/stock_move_location.py | 5 +- 5 files changed, 65 insertions(+), 7 deletions(-) diff --git a/stock_move_location/README.rst b/stock_move_location/README.rst index 07d549935..910d68111 100644 --- a/stock_move_location/README.rst +++ b/stock_move_location/README.rst @@ -36,8 +36,8 @@ another and move only selected quants. Usage ===== -* A new menuitem Stock > Move from location... opens a wizard - where 2 location ca be specified. +* A new menu item Stock > Move from location... opens a wizard + where 2 location can be specified. * Select origin and destination locations and press "IMMEDIATE TRANSFER" or "PLANNED TRANSFER" * Press `ADD ALL` button to add all products available * Those lines can be edited. Move quantity can't be more than a max available quantity @@ -55,6 +55,10 @@ If you want to transfer a full quant: * Select the quants which you want move to another location +If you go to the Inventory Dashboard you can see the button "Move from location" +in each of the picking types (only applicable to internal transfers). Press it +and you will be directed to the wizard. + Known issues / Roadmap ====================== @@ -90,6 +94,8 @@ Contributors * Mykhailo Panarin * Sergio Teruel * Joan Sisquella +* Jordi Ballester Alomar +* Lois Rilo Maintainers ~~~~~~~~~~~ diff --git a/stock_move_location/i18n/stock_move_location.pot b/stock_move_location/i18n/stock_move_location.pot index b2755cd4f..839240c9d 100644 --- a/stock_move_location/i18n/stock_move_location.pot +++ b/stock_move_location/i18n/stock_move_location.pot @@ -46,12 +46,23 @@ msgstr "" msgid "Destination Location" msgstr "" +#. module: stock_move_location +#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__destination_location_disable +msgid "Destination Location Disable" +msgstr "" + #. module: stock_move_location #: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__display_name #: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line__display_name msgid "Display Name" msgstr "" +#. module: stock_move_location +#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__edit_locations +#: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location +msgid "Edit Locations" +msgstr "" + #. module: stock_move_location #: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__id #: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location_line__id @@ -101,6 +112,11 @@ msgstr "" msgid "Move Location lines" msgstr "" +#. module: stock_move_location +#: model_terms:ir.ui.view,arch_db:stock_move_location.stock_picking_type_kanban +msgid "Move On Hand" +msgstr "" + #. module: stock_move_location #: model:ir.actions.act_window,name:stock_move_location.wiz_stock_move_location_action #: model:ir.ui.menu,name:stock_move_location.menuitem_move_location @@ -124,11 +140,22 @@ msgstr "" msgid "Origin Location" msgstr "" +#. module: stock_move_location +#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__origin_location_disable +msgid "Origin Location Disable" +msgstr "" + #. module: stock_move_location #: model:ir.model.fields,field_description:stock_move_location.field_stock_move__location_move msgid "Part of move location" msgstr "" +#. module: stock_move_location +#: model:ir.model,name:stock_move_location.model_stock_picking_type +#: model:ir.model.fields,field_description:stock_move_location.field_wiz_stock_move_location__picking_type_id +msgid "Picking Type" +msgstr "" + #. module: stock_move_location #: model_terms:ir.ui.view,arch_db:stock_move_location.view_wiz_stock_move_location_form_stock_move_location msgid "Planned Transfer" @@ -149,6 +176,16 @@ msgstr "" msgid "Quantity to move" msgstr "" +#. module: stock_move_location +#: model:ir.model.fields,field_description:stock_move_location.field_stock_picking_type__show_move_onhand +msgid "Show Move On hand stock" +msgstr "" + +#. module: stock_move_location +#: model:ir.model.fields,help:stock_move_location.field_stock_picking_type__show_move_onhand +msgid "Show a button 'Move On Hand' in the Inventory Dashboard to initiate the process to move the products in stock at the origin location." +msgstr "" + #. module: stock_move_location #: model:ir.model,name:stock_move_location.model_stock_move msgid "Stock Move" @@ -174,3 +211,13 @@ msgstr "" msgid "Wizard move location line" msgstr "" +#. module: stock_move_location +#: model:ir.model.fields,help:stock_move_location.field_wiz_stock_move_location__destination_location_disable +msgid "technical field to disable the edition of destination location." +msgstr "" + +#. module: stock_move_location +#: model:ir.model.fields,help:stock_move_location.field_wiz_stock_move_location__origin_location_disable +msgid "technical field to disable the edition of origin location." +msgstr "" + diff --git a/stock_move_location/static/description/index.html b/stock_move_location/static/description/index.html index c2a64bff9..1ffd8d51e 100644 --- a/stock_move_location/static/description/index.html +++ b/stock_move_location/static/description/index.html @@ -387,8 +387,8 @@ another and move only selected quants.

Usage

    -
  • A new menuitem Stock > Move from location… opens a wizard -where 2 location ca be specified.
  • +
  • A new menu item Stock > Move from location… opens a wizard +where 2 location can be specified.
  • Select origin and destination locations and press “IMMEDIATE TRANSFER” or “PLANNED TRANSFER”
  • Press ADD ALL button to add all products available
  • Those lines can be edited. Move quantity can’t be more than a max available quantity
  • @@ -405,6 +405,9 @@ or Inventory > Reporting > Inventory, the quants view will be opened.
  • Select the quants which you want move to another location
+

If you go to the Inventory Dashboard you can see the button “Move from location” +in each of the picking types (only applicable to internal transfers). Press it +and you will be directed to the wizard.

Known issues / Roadmap

@@ -439,6 +442,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Mykhailo Panarin <m.panarin@mobilunity.com>
  • Sergio Teruel <sergio.teruel@tecnativa.com>
  • Joan Sisquella <joan.sisquella@eficent.com>
  • +
  • Jordi Ballester Alomar <jordi.ballester@eficent.com>
  • +
  • Lois Rilo <lois.rilo@eficent.com>
  • diff --git a/stock_move_location/tests/test_move_location.py b/stock_move_location/tests/test_move_location.py index be2286571..4c7f2bb60 100644 --- a/stock_move_location/tests/test_move_location.py +++ b/stock_move_location/tests/test_move_location.py @@ -100,7 +100,6 @@ class TestMoveLocation(TestsCommon): """Test planned transfer.""" wizard = self._create_wizard(self.internal_loc_1, self.internal_loc_2) wizard.onchange_origin_location() - wizard.add_lines() wizard = wizard.with_context({'planned': True}) wizard.action_move_location() picking = wizard.picking_id diff --git a/stock_move_location/wizard/stock_move_location.py b/stock_move_location/wizard/stock_move_location.py index 287b727f8..d7049fb63 100644 --- a/stock_move_location/wizard/stock_move_location.py +++ b/stock_move_location/wizard/stock_move_location.py @@ -151,8 +151,9 @@ class StockMoveLocationWizard(models.TransientModel): move = self.env["stock.move"].create( self._get_move_values(picking, lines), ) - for line in lines: - line.create_move_lines(picking, move) + if not self.env.context.get("planned"): + for line in lines: + line.create_move_lines(picking, move) return move @api.multi