Openerp , how to save and re-direct in to another form by clicking on save button
<p>I am working in <strong>hr</strong> module in Openerp and there is that requirement arises that once you click on the save button 
1. Save the data in to the DB (already happening)
2. Redirect in to leave allocation form.</p>

<p>Please help me with completing second requirement which I have no idea .</p>

<p><strong>HR - Create Profile Form</strong> 
<a href="http://i.stack.imgur.com/7h7hG.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/7h7hG.jpg" alt="enter image description here"></a></p>

<p><strong>Leave Management - Leave allocation form</strong></p>

<p><a href="http://i.stack.imgur.com/MQuIR.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/MQuIR.jpg" alt="enter image description here"></a></p>

<p>You can override the create or write function and have it return an action to bring up the other view.</p>

<p>I used super(Partner,self) you may need to replace this with something else. The pitfall with this method is that it will not work using xmlrpc. </p>

<pre><code>@api.model
def create(self, vals):
    super(Partner, self).create(vals)
    return {
        'view_type': 'form',
        'view_mode': 'form',
        'res_model': 'hr.holidays',
        'type': 'ir.actions.act_window',
        'target': 'new'
    }
</code></pre>

<p>You should be able to pass a context as well to fill in form values. </p>

<p>Another option would be to create a wizard with an almost mirror view for your form above. Have a next button which calls a method which creates the record and then returns an action similar to the example. This way you would not need to override the create function (leaving it available for xmlrpc) and redirecting to the form you want.</p>

python xml python-2.7 openerp openerp-7