From d5a340e25469f91f60e902b7f1b8ef53f8b5c510 Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Tue, 27 Dec 2022 10:13:20 +0630 Subject: [PATCH] [FIX] stock_move_location --- stock_move_location/wizard/stock_move_location.py | 7 +++---- stock_move_location/wizard/stock_move_location.xml | 1 - stock_move_location/wizard/stock_move_location_line.py | 5 +---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/stock_move_location/wizard/stock_move_location.py b/stock_move_location/wizard/stock_move_location.py index 4bd7e2601..3dc97a3dc 100644 --- a/stock_move_location/wizard/stock_move_location.py +++ b/stock_move_location/wizard/stock_move_location.py @@ -47,11 +47,10 @@ class StockMoveLocationWizard(models.TransientModel): required=True, domain=lambda self: self._get_locations_domain(), ) - stock_move_location_line_ids = fields.Many2many( + stock_move_location_line_ids = fields.One2many( + "wiz.stock.move.location.line", + "move_location_wizard_id", string="Move Location lines", - comodel_name="wiz.stock.move.location.line", - column1="move_location_wiz_id", - column2="move_location_line_wiz_id", ) picking_type_id = fields.Many2one( comodel_name="stock.picking.type", default=_get_default_picking_type_id diff --git a/stock_move_location/wizard/stock_move_location.xml b/stock_move_location/wizard/stock_move_location.xml index 63a36b791..fd4b27006 100644 --- a/stock_move_location/wizard/stock_move_location.xml +++ b/stock_move_location/wizard/stock_move_location.xml @@ -41,7 +41,6 @@ diff --git a/stock_move_location/wizard/stock_move_location_line.py b/stock_move_location/wizard/stock_move_location_line.py index ae374d826..261901f3e 100644 --- a/stock_move_location/wizard/stock_move_location_line.py +++ b/stock_move_location/wizard/stock_move_location_line.py @@ -11,12 +11,9 @@ class StockMoveLocationWizardLine(models.TransientModel): _name = "wiz.stock.move.location.line" _description = "Wizard move location line" - move_location_wizard_id = fields.Many2many( + move_location_wizard_id = fields.Many2one( string="Move location Wizard", comodel_name="wiz.stock.move.location", - column1="move_location_line_wiz_id", - column2="move_location_wiz_id", - readonly=True, ) product_id = fields.Many2one( string="Product", comodel_name="product.product", required=True