[IMP] stock : Remove the stock_picking_makwizard

bzr revid: sbh@tinyerp.com-20101014054259-umw0er3gzua08o40
This commit is contained in:
sbh (Open ERP)
2010-10-14 11:12:59 +05:30
parent 3fa031a5e7
commit 6c34dc63a2
4 changed files with 1 additions and 113 deletions
-1
View File
@@ -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",
+1 -1
View File
@@ -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:
-80
View File
@@ -1,80 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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:
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_stock_make_picking_wizard" model="ir.ui.view">
<field name="name">Make Picking</field>
<field name="model">stock.picking.make</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Make Picking">
<field name="picking_ids" nolabel="1" colspan="4"
width="600" height="300"/>
<separator string="" colspan="4" />
<button icon='gtk-cancel' special="cancel"
string="_Cancel" />
<button name="make_packing" string="Ok"
type="object" icon="gtk-apply" />
</form>
</field>
</record>
<record id="act_stock_make_picking_wizard" model="ir.actions.act_window">
<field name="name">Make Picking</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.picking.make</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>