[FIX] crm: Put action_cancel method for closing wizard of schedule call to opportunity

bzr revid: ron@tinyerp.com-20111123065501-l6pj4oymx21qx7f2
This commit is contained in:
ron@tinyerp.com 2011-11-23 12:25:01 +05:30
parent 3debb307be
commit 1098a57e13
2 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,12 @@ class crm_partner2opportunity(osv.osv_memory):
'partner_id': fields.many2one('res.partner', 'Partner'),
}
def action_cancel(self, cr, uid, ids, context=None):
"""
Closes Partner 2 Opportunity
"""
return {'type':'ir.actions.act_window_close'}
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values

View File

@ -16,7 +16,7 @@
<field name="probability"/>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="make_opportunity" string="Create Opportunity" type="object" icon="gtk-ok"/>
</group>
</form>