[IMP]hr_payroll : Added state and buttons on top bar

bzr revid: mma@tinyerp.com-20120503132018-dohip75it2rwgqmm
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-05-03 18:50:18 +05:30
parent 70c7252b2c
commit acfd8ab255
1 changed files with 26 additions and 19 deletions

View File

@ -260,8 +260,19 @@
<field name="model">hr.payslip</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payslip">
<group col="6" colspan="4">
<form layout="manual">
<div class="oe_form_topbar">
<button string="Confirm" icon="terp-camera_test" name="hr_verify_sheet" states="draft"/>
<button string="Refund" icon="gtk-execute" name="refund_sheet" states="confirm,done" type='object'/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft" states="cancel"/>
<button string="Compute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" type="object" states="draft"/>
<button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm,verify"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</div>
</div>
<sheet string="Payslip" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="employee_id" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/>
<field name="number"/>
<field name="date_from" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/>
@ -362,16 +373,8 @@
<separator colspan="4" string="Notes"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm,verify"/>
<button string="Compute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" type="object" states="draft"/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft" states="cancel"/>
<button string="Refund" icon="gtk-execute" name="refund_sheet" states="confirm,done" type='object'/>
<button string="Confirm" icon="terp-camera_test" name="hr_verify_sheet" states="draft"/>
</group>
</sheet>
</form>
</field>
</record>
@ -720,8 +723,17 @@
<field name="model">hr.payslip.run</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payslips Batches">
<group col="6" colspan="4">
<form layout="manual">
<div class="oe_form_topbar">
<button name="close_payslip_run" type="object" icon="terp-camera_test" string="Close" states="draft"/>
<button name="%(action_hr_payslip_by_employees)d" type="action" states="draft" icon="gtk-execute" string="Generate Payslips" />
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft_payslip_run" type="object" states="close"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1"/>
</div>
</div>
<sheet string="Payslips Batches" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
<field name="name" colspan="4"/>
<field name="credit_note"/>
<field name="date_start"/>
@ -732,12 +744,7 @@
<field name="slip_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
<group col="6" colspan="4">
<field name="state"/>
<button name="%(action_hr_payslip_by_employees)d" type="action" states="draft" icon="gtk-execute" string="Generate Payslips" />
<button name="close_payslip_run" type="object" icon="terp-camera_test" string="Close" states="draft"/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft_payslip_run" type="object" states="close"/>
</group>
</sheet>
</form>
</field>
</record>