单击一个按钮弹出一个form表单,怎么不刷新原表单?
-
@萧云飞 def create(self, cr, uid, vals, context=None):
print "==============winbo=========create"
print vals
super(stock_picking_in_winbo, self).write(cr, uid, picking_id, vals, context=context)
# self.draft_force_assign_winbo(self, cr, uid,picking_id)return picking_id def draft_force_assign_winbo(self, cr, uid, ids, context=None): if context is None: context = {} stock_obj = self.browse(cr, uid, ids) """Open the partial picking wizard""" context.update({ 'active_model': self._name, 'active_ids': ids, 'active_id': len(ids) and ids[0] or False, 'ref_id': 13 }) mod_obj = self.pool.get('ir.model.data') res = mod_obj.get_object_reference(cr, uid, 'starmerx_stock', 'starmerx_stock_partial_picking_form') # raise osv.except_osv(_('无法保存 !'), _('字段值有错误!')) return { 'view_type': 'form', 'view_mode': 'form', 'view_id': [res and res[1] or False], 'res_model': 'stock.partial.picking', 'type': 'ir.actions.act_window', 'target': 'new', 'context': context, 'nodestroy': True, }
我的这个场景可能跟你的不一样,我之前也以为要在create里面调用我的方法,但其实不用
-