mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[MIG] rma_put_away: Migration to 16.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "RMA Put Away",
|
"name": "RMA Put Away",
|
||||||
"version": "15.0.1.0.0",
|
"version": "16.0.1.0.0",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"category": "RMA",
|
"category": "RMA",
|
||||||
"summary": "Allows to put away the received products in odoo",
|
"summary": "Allows to put away the received products in odoo",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class RmaOperation(models.Model):
|
|||||||
default="no",
|
default="no",
|
||||||
)
|
)
|
||||||
put_away_route_id = fields.Many2one(
|
put_away_route_id = fields.Many2one(
|
||||||
comodel_name="stock.location.route",
|
comodel_name="stock.route",
|
||||||
string="Put Away Route",
|
string="Put Away Route",
|
||||||
domain=[("rma_selectable", "=", True)],
|
domain=[("rma_selectable", "=", True)],
|
||||||
default=lambda self: self._default_routes(),
|
default=lambda self: self._default_routes(),
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class TestRmaPutAway(common.SingleTransactionCase):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
cls.lot = cls.env["stock.production.lot"].create(
|
cls.lot = cls.env["stock.lot"].create(
|
||||||
{
|
{
|
||||||
"name": "Lot for tests",
|
"name": "Lot for tests",
|
||||||
"product_id": cls.product_2.id,
|
"product_id": cls.product_2.id,
|
||||||
@@ -49,7 +49,7 @@ class TestRmaPutAway(common.SingleTransactionCase):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
cls.route1 = cls.env["stock.location.route"].create(
|
cls.route1 = cls.env["stock.route"].create(
|
||||||
{
|
{
|
||||||
"name": "Transfer WH1",
|
"name": "Transfer WH1",
|
||||||
"rma_selectable": True,
|
"rma_selectable": True,
|
||||||
@@ -62,7 +62,7 @@ class TestRmaPutAway(common.SingleTransactionCase):
|
|||||||
"name": "Transfer",
|
"name": "Transfer",
|
||||||
"route_id": cls.route1.id,
|
"route_id": cls.route1.id,
|
||||||
"location_src_id": cls.stock_rma_location.id,
|
"location_src_id": cls.stock_rma_location.id,
|
||||||
"location_id": cls.put_away_loc.id,
|
"location_dest_id": cls.put_away_loc.id,
|
||||||
"action": "pull",
|
"action": "pull",
|
||||||
"picking_type_id": cls.wh.int_type_id.id,
|
"picking_type_id": cls.wh.int_type_id.id,
|
||||||
"procure_method": "make_to_stock",
|
"procure_method": "make_to_stock",
|
||||||
@@ -185,7 +185,7 @@ class TestRmaPutAway(common.SingleTransactionCase):
|
|||||||
res = rma.action_view_in_shipments()
|
res = rma.action_view_in_shipments()
|
||||||
picking = self.env["stock.picking"].browse(res["res_id"])
|
picking = self.env["stock.picking"].browse(res["res_id"])
|
||||||
picking.action_assign()
|
picking.action_assign()
|
||||||
for mv in picking.move_lines:
|
for mv in picking.move_ids:
|
||||||
mv.quantity_done = mv.product_uom_qty
|
mv.quantity_done = mv.product_uom_qty
|
||||||
picking._action_done()
|
picking._action_done()
|
||||||
wizard = self.rma_make_put_away_wiz.with_context(
|
wizard = self.rma_make_put_away_wiz.with_context(
|
||||||
|
|||||||
Reference in New Issue
Block a user