diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index 5fa272238d5..459a2faaf84 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -48,10 +48,11 @@ Thanks to the double entry management, the inventory controlling is powerful and "wizard/stock_inventory_set_stock_zero_view.xml", "wizard/stock_fill_inventory_view.xml", "wizard/stock_invoice_onshipping_view.xml", + "wizard/stock_inventory_merge_view.xml", "wizard/stock_location_product_view.xml", "wizard/stock_inventory_line_split_view.xml", "wizard/stock_change_standard_price_view.xml", - + "wizard/stock_picking_make_view.xml", "wizard/stock_traceability_view.xml", "stock_workflow.xml", "stock_incoterms.xml", diff --git a/addons/stock/wizard/__init__.py b/addons/stock/wizard/__init__.py index 6f5a83a07b3..7c87212571c 100644 --- a/addons/stock/wizard/__init__.py +++ b/addons/stock/wizard/__init__.py @@ -23,18 +23,17 @@ import stock_traceability import stock_move import stock_partial_picking import stock_partial_move -import wizard_picking_make +import stock_picking_make import wizard_replacement import wizard_return import wizard_split_lot_line import wizard_ups -import inventory_merge +import stock_inventory_merge import stock_inventory_set_stock_zero import stock_fill_inventory import stock_inventory_line_split import stock_invoice_onshipping import stock_location_product import stock_change_standard_price - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/wizard/stock_inventory_merge.py b/addons/stock/wizard/stock_inventory_merge.py index 64620054ff8..1c11ad8e2ad 100644 --- a/addons/stock/wizard/stock_inventory_merge.py +++ b/addons/stock/wizard/stock_inventory_merge.py @@ -36,7 +36,18 @@ class stock_inventory_merge(osv.osv_memory): } def do_merge(self, cr, uid, ids, context): - + """ + To merge selected Inventories. + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param ids: List of IDs selected + @param context: A standard dictionary + + @return: + + """ invent_obj = self.pool.get('stock.inventory') invent_line_obj = self.pool.get('stock.inventory.line') @@ -46,10 +57,7 @@ class stock_inventory_merge(osv.osv_memory): raise osv.except_osv(_('Warning'), _('Please select at least two inventories.')) - - for inventory in invent_obj.browse(cr, uid, context['active_ids'], context=context): - print"-------active-ids----",context['active_ids'] if inventory.state == "done": raise osv.except_osv(_('Warning'), _('Merging is only allowed on draft inventories.')) diff --git a/addons/stock/wizard/stock_inventory_merge_view.xml b/addons/stock/wizard/stock_inventory_merge_view.xml new file mode 100644 index 00000000000..e8af34c0c71 --- /dev/null +++ b/addons/stock/wizard/stock_inventory_merge_view.xml @@ -0,0 +1,27 @@ + + + + + + stock.inventory.merge.form + stock.inventory.merge + form + +
+ +