Openerp workflow doesn't show last transition button
<p>I tried to edit my holiday work-flow and up do '<strong>validate</strong>' state it is working fine. But then I have added new node with transition , then the transition button does not appear to validate the work-flow. Please help me with this and relevant codes are bellow.</p>

<p><strong><em>The last two nodes</em></strong> - hr_holidays_workflow.xml</p>

<pre><code>  &lt;record model="workflow.activity" id="act_validate"&gt; &lt;!-- accepted --&gt;
        &lt;field name="wkf_id" ref="wkf_holidays" /&gt;
        &lt;field name="name"&gt;validate&lt;/field&gt;
        &lt;field name="kind"&gt;function&lt;/field&gt;
        &lt;field name="action"&gt;holidays_validate()&lt;/field&gt;
    &lt;/record&gt;

    &lt;record model="workflow.activity" id="act_new_validate"&gt; &lt;!-- last --&gt;
        &lt;field name="wkf_id" ref="wkf_holidays" /&gt;
        &lt;field name="name"&gt;new_validate&lt;/field&gt;
        &lt;field name="kind"&gt;function&lt;/field&gt;
        &lt;field name="action"&gt;action_new_function()&lt;/field&gt;
    &lt;/record&gt;
</code></pre>

<p><strong><em>The last transition</em></strong> </p>

<pre><code>&lt;record model="workflow.transition" id="holiday_new_validate"&gt; 
        &lt;field name="act_from" ref="act_validate" /&gt;
        &lt;field name="act_to" ref="act_new_validate" /&gt;
        &lt;field name="signal"&gt;signal_last_validate&lt;/field&gt;
        &lt;field name="group_id" ref="base.group_hr_user"/&gt;
    &lt;/record&gt;
</code></pre>

<p><strong><em>Transition Button</em></strong> - hr_holidyas_view.xml</p>

<pre><code>    &lt;button string="Approved" type="workflow" name="last_validate" states="new_validate" class="oe_highlight"/&gt;

    &lt;field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate,new_validate" statusbar_colors='{"confirm":"blue","validate1":"blue","new_validate":"blue","refuse":"red"}'/&gt;
</code></pre>

<p><strong>State declaration</strong> - hr_holidays.py</p>

<pre><code> 'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate2', 'First Approval'),('validate1', 'Second Approval'), ('validate', 'Approval'),('new_validate','Appl')],
            'Status', readonly=True, #track_visibility='onchange',
</code></pre>

<p><strong><em>The function</em></strong> - hr_holidays.py</p>

<pre><code>def action_new_function(self, cr, uid, ids, context=None):

        res = self.write(cr, uid, ids, {'state': 'last_validate'}, context=context)    
        return res
</code></pre>

<p><strong><em>UI</em></strong>
Only refuse button is there not the "signal_last_validate" button
<a href="http://i.stack.imgur.com/DFwXH.png" rel="nofollow"><img src="http://i.stack.imgur.com/DFwXH.png" alt="enter image description here"></a></p>

<p>It was just I have used a wrong state in the button. </p>

<pre><code>&lt;button string="Approved" type="workflow" name="last_validate" states="**new_validate**" class="oe_highlight"/&gt;
</code></pre>

<p>changed in to:</p>

<pre><code>&lt;button string="Approved" type="workflow" name="last_validate" states="**validate**" class="oe_highlight"/&gt;
</code></pre>

python xml openerp