From e69b3596d0caf4e5333ed37f0c60768409e87612 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 23 Jun 2010 16:27:04 +0530 Subject: [PATCH] [REF] purchase bzr revid: mra@mra-laptop-20100623105704-y2ad6iuqllbxuiu5 --- .../purchase/wizard/purchase_order_group.py | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/addons/purchase/wizard/purchase_order_group.py b/addons/purchase/wizard/purchase_order_group.py index 8c4e0784a7b..d9778dceb47 100644 --- a/addons/purchase/wizard/purchase_order_group.py +++ b/addons/purchase/wizard/purchase_order_group.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,46 +15,39 @@ # 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 . +# along with this program. If not, see . # ############################################################################## +import time from osv import fields, osv -from service import web_services import netsvc import pooler -import time -import wizard from osv.orm import browse_record, browse_null class purchase_order_group(osv.osv_memory): _name = "purchase.order.group" - _description = "Purchase Wizard" - _columns = { - - } + _description = "Purchase Order Merge" def merge_orders(self, cr, uid, ids, context): - """ + """ To merge similar type of purchase orders. - + @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in - @param ids: the ID or list of IDs - @param context: A standard dictionary - + @param ids: the ID or list of IDs + @param context: A standard dictionary + @return: purchase order view - - """ + + """ order_obj = self.pool.get('purchase.order') mod_obj =self.pool.get('ir.model.data') result = mod_obj._get_id(cr, uid, 'purchase', 'view_purchase_order_filter') id = mod_obj.read(cr, uid, result, ['res_id']) - allorders = order_obj.do_merge(cr, uid, context.get('active_ids',[]), context) - return { 'domain': "[('id','in', [" + ','.join(map(str, allorders)) + "])]", @@ -66,5 +59,7 @@ class purchase_order_group(osv.osv_memory): 'type': 'ir.actions.act_window', 'search_view_id': id['res_id'] } + purchase_order_group() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file