diff --git a/addons/account_anglo_saxon/test/anglo_saxon.yml b/addons/account_anglo_saxon/test/anglo_saxon.yml index b6516f53b00..0a2dcf5f5fc 100644 --- a/addons/account_anglo_saxon/test/anglo_saxon.yml +++ b/addons/account_anglo_saxon/test/anglo_saxon.yml @@ -123,10 +123,9 @@ - Reception is ready for process so now done the reception. - - !python {model: stock.partial.picking}: | - pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001")).picking_ids - partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]}) - self.do_partial(cr, uid, [partial_id]) + !python {model: stock.picking}: | + picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001")).picking_ids[0] + picking_id.do_partial(context=context) - I check the Stock Interim account (Received) is credited successfully. - @@ -196,30 +195,30 @@ product_qty: 1.0 product_uom: product.product_uom_unit location_dest_id: stock.stock_location_customers + invoice_state: 2binvoiced move_type: direct - type: out + picking_type_id: stock.picking_type_out - I need to check the availability of the product, So I make my picking order for processing later. - !python {model: stock.picking}: | - self.draft_force_assign(cr, uid, [ref("stock_picking_out001")], {"lang": "en_US", "search_default_available": - 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", - "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), - }) + self.action_confirm(cr, uid, [ref('stock_picking_out001')], context=context) + - I check the product availability, Product is available in the stock and ready to be sent. - !python {model: stock.picking}: | - self.action_assign(cr, uid, [ref("stock_picking_out001")], {"lang": "en_US", "search_default_available": - 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", - "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), - }) + picking = self.browse(cr, uid, ref("stock_picking_out001")) + assert picking.state == "confirmed", "Picking should be confirmed." + for move_line in picking.move_lines: + assert move_line.state == "confirmed", "Move should be confirmed." + - I process the delivery. - - !python {model: stock.partial.picking}: | - partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001')]}) - self.do_partial(cr, uid, [partial_id]) + !python {model: stock.picking}: | + picking = self.pool.get('stock.picking').browse(cr, uid, ref("stock_picking_out001")) + picking.do_partial(context=context) - I check Stock Interim account (Delivery) is debited successfully. - diff --git a/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml b/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml index 8fba961f429..d4a2fbaaab1 100644 --- a/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml +++ b/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml @@ -131,10 +131,9 @@ - Reception is ready for process so now done the reception. - - !python {model: stock.partial.picking}: | - pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo")).picking_ids - partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]}) - self.do_partial(cr, uid, [partial_id]) + !python {model: stock.picking}: | + picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo")).picking_ids[0] + picking_id.do_partial(context=context) - I check the Stock Interim account (Received) is credit successfully. - @@ -198,30 +197,28 @@ product_id: product_fifo_anglo_saxon product_qty: 1.0 location_dest_id: stock.stock_location_customers + invoice_state: 2binvoiced move_type: direct - type: out + picking_type_id: stock.picking_type_out - I need to check the availability of the product, So I make my picking order for processing later. - !python {model: stock.picking}: | - self.draft_force_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available": - 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", - "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), - }) + self.action_confirm(cr, uid, [ref('stock_picking_out001_fifo')], context=context) - I check the product availability, Product is available in the stock and ready to be sent. - !python {model: stock.picking}: | - self.action_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available": - 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", - "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), - }) + picking = self.browse(cr, uid, ref("stock_picking_out001_fifo")) + assert picking.state == "confirmed", "Picking should be confirmed." + for move_line in picking.move_lines: + assert move_line.state == "confirmed", "Move should be confirmed." - I process the delivery. - - !python {model: stock.partial.picking}: | - partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001_fifo')]}) - self.do_partial(cr, uid, [partial_id]) + !python {model: stock.picking}: | + picking = self.pool.get('stock.picking').browse(cr, uid, ref("stock_picking_out001_fifo")) + picking.do_partial(context=context) - I check Stock Interim account (Delivery) is debited successfully. - diff --git a/addons/mrp/res_config.py b/addons/mrp/res_config.py index 22a14addcd1..840d6c71086 100644 --- a/addons/mrp/res_config.py +++ b/addons/mrp/res_config.py @@ -44,11 +44,6 @@ class mrp_config_settings(osv.osv_memory): Without this module: A + B + C -> D. With this module: A + B + C -> D + E. This installs the module mrp_byproduct."""), - 'module_mrp_jit': fields.boolean("Generate procurement in real time", - help="""This allows Just In Time computation of procurement orders. - All procurement orders will be processed immediately, which could in some - cases entail a small performance impact. - This installs the module mrp_jit."""), 'module_stock_no_autopicking': fields.boolean("Manage manual picking to fulfill manufacturing orders ", help="""This module allows an intermediate picking process to provide raw materials to production orders. For example to manage production made by your suppliers (sub-contracting). diff --git a/addons/mrp/res_config_view.xml b/addons/mrp/res_config_view.xml index 2c7047380a8..25f3e0b0931 100644 --- a/addons/mrp/res_config_view.xml +++ b/addons/mrp/res_config_view.xml @@ -44,10 +44,6 @@ @@ -58,6 +62,10 @@