From 6c34dc63a27d1d95fa3cdfeb09a35065ef374983 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 14 Oct 2010 11:12:59 +0530 Subject: [PATCH] [IMP] stock : Remove the stock_picking_makwizard bzr revid: sbh@tinyerp.com-20101014054259-umw0er3gzua08o40 --- addons/stock/__openerp__.py | 1 - addons/stock/wizard/__init__.py | 2 +- addons/stock/wizard/stock_picking_make.py | 80 ------------------- .../stock/wizard/stock_picking_make_view.xml | 31 ------- 4 files changed, 1 insertion(+), 113 deletions(-) delete mode 100644 addons/stock/wizard/stock_picking_make.py delete mode 100644 addons/stock/wizard/stock_picking_make_view.xml diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index 79d6c860e65..0b85511050d 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -58,7 +58,6 @@ Thanks to the double entry management, the inventory controlling is powerful and "wizard/stock_splitinto_view.xml", "wizard/stock_inventory_line_split_view.xml", "wizard/stock_change_standard_price_view.xml", - 'wizard/stock_picking_make_view.xml', 'wizard/stock_return_picking_view.xml', "stock_workflow.xml", "stock_incoterms.xml", diff --git a/addons/stock/wizard/__init__.py b/addons/stock/wizard/__init__.py index f6021e0fbe2..485059b83bf 100644 --- a/addons/stock/wizard/__init__.py +++ b/addons/stock/wizard/__init__.py @@ -34,6 +34,6 @@ import stock_location_product import stock_change_standard_price import stock_picking_make import stock_return_picking -import stock_picking_make + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/wizard/stock_picking_make.py b/addons/stock/wizard/stock_picking_make.py deleted file mode 100644 index 9d26595f00e..00000000000 --- a/addons/stock/wizard/stock_picking_make.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from osv import fields, osv -import netsvc - -class stock_picking_make(osv.osv_memory): - _name = 'stock.picking.make' - _description = "Make Picking" - - _columns = { - 'picking_ids': fields.many2many('stock.picking', 'stock_picking_ids', 'parent_id', 'child_id', 'Pickings'), - } - - def default_get(self, cursor, user, fields, context): - """ - To get default values for the object. - @param self: The object pointer. - @param cr: A database cursor - @param uid: ID of the user currently logged in - @param fields: List of fields for which we want default values - @param context: A standard dictionary - @return: A dictionary which of fields with values. - """ - res = super(stock_picking_make, self).default_get(cursor, user, fields, context=context) - record_ids = context and context.get('active_ids',False) or False - if record_ids: - picking_obj = self.pool.get('stock.picking') - picking_ids = picking_obj.search(cursor, user, [ - ('id', 'in', record_ids), - ('state', '<>', 'done'), - ('state', '<>', 'cancel')], context=context) - res['picking_ids'] = picking_ids - return res - - def make_packing(self, cursor, user, ids, context): - """ - Make Picking. - @param self: The object pointer. - @param cr: A database cursor - @param uid: ID of the user currently logged in - @param fields: List of fields for which we want default values - @param context: A standard dictionary - @return: A dictionary which of fields with values. - """ - record_ids = context and context.get('active_ids',False) or False - wkf_service = netsvc.LocalService('workflow') - picking_obj = self.pool.get('stock.picking') - data = self.read(cursor, user, ids[0]) - pick_ids = data['picking_ids'] - picking_obj.force_assign(cursor, user, pick_ids) - picking_obj.action_move(cursor, user, pick_ids) - for picking_id in ids: - wkf_service.trg_validate(user, 'stock.picking', picking_id, - 'button_done', cursor) - return {} - -stock_picking_make() - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/stock/wizard/stock_picking_make_view.xml b/addons/stock/wizard/stock_picking_make_view.xml deleted file mode 100644 index 4ecebed1031..00000000000 --- a/addons/stock/wizard/stock_picking_make_view.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Make Picking - stock.picking.make - form - -
- - -