[MIG] stock_move_location: Migration to 15.0

This commit is contained in:
Bernat Puig Font
2021-12-21 08:37:54 +01:00
parent 0fd1ca1ab4
commit 5809d3dede
8 changed files with 10 additions and 12 deletions

View File

@@ -5,7 +5,7 @@
{
"name": "Move Stock Location",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"author": "Julius Network Solutions, Odoo Community Association (OCA)",
"summary": "This module allows to move all stock "
"in a stock location to an other one.",

View File

@@ -14,6 +14,7 @@ class StockMove(models.Model):
@api.depends("location_move")
def _compute_show_details_visible(self):
super()._compute_show_details_visible()
res = super()._compute_show_details_visible()
for move in self.filtered(lambda x: x.location_move):
move.show_details_visible = True
return res

View File

@@ -1,4 +1,4 @@
* A new menu item Stock > Move from location... opens a wizard
* A new menu item Operations > Move from location... opens a wizard
where 2 locations can be specified.
* Select origin and destination locations and press "IMMEDIATE TRANSFER" or "PLANNED TRANSFER"
* Press `ADD ALL` button to add all products available
@@ -11,7 +11,7 @@
If you want to transfer a full quant:
* Go to `Inventory > Master Data > Products` and click "On hand" smart button
* Go to `Inventory > Products > Products` and click "On hand" smart button
or `Inventory > Reporting > Inventory`, the quants view will be
opened.

View File

@@ -5,7 +5,7 @@
from odoo.tests import common
class TestsCommon(common.SavepointCase):
class TestsCommon(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()

View File

@@ -68,7 +68,7 @@ class TestMoveLocation(TestsCommon):
"""Test planned transfer."""
wizard = self._create_wizard(self.internal_loc_1, self.internal_loc_2)
wizard.onchange_origin_location()
wizard = wizard.with_context({"planned": True})
wizard = wizard.with_context(planned=True)
wizard.action_move_location()
picking = wizard.picking_id
self.assertEqual(picking.state, "assigned")

View File

@@ -57,8 +57,8 @@ class StockMoveLocationWizard(models.TransientModel):
picking_id = fields.Many2one(
string="Connected Picking", comodel_name="stock.picking"
)
edit_locations = fields.Boolean(string="Edit Locations", default=True)
apply_putaway_strategy = fields.Boolean(string="Apply putaway strategy")
edit_locations = fields.Boolean(default=True)
apply_putaway_strategy = fields.Boolean()
@api.depends("edit_locations")
def _compute_readonly_locations(self):

View File

@@ -45,7 +45,6 @@
mode="tree,kanban"
>
<tree
string="Inventory Details"
editable="bottom"
decoration-info="move_quantity != max_quantity"
decoration-danger="(move_quantity &lt; 0) or (move_quantity > max_quantity)"

View File

@@ -41,9 +41,7 @@ class StockMoveLocationWizardLine(models.TransientModel):
max_quantity = fields.Float(
string="Maximum available quantity", digits="Product Unit of Measure"
)
reserved_quantity = fields.Float(
string="Reserved quantity", digits="Product Unit of Measure"
)
reserved_quantity = fields.Float(digits="Product Unit of Measure")
custom = fields.Boolean(string="Custom line", default=True)
@staticmethod