[IMP] hr_payroll: refund payslip feature improved

bzr revid: qdp-launchpad@openerp.com-20110411121046-7r0dzzqiw6hv6hkl
This commit is contained in:
Quentin (OpenERP) 2011-04-11 14:10:46 +02:00
parent 3e1f543b78
commit 7080f2b5f3
2 changed files with 3 additions and 3 deletions

View File

@ -246,7 +246,7 @@ class hr_payslip(osv.osv):
'paid': fields.boolean('Made Payment Order ? ', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'note': fields.text('Description'),
'contract_id': fields.many2one('hr.contract', 'Contract', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'credit_note': fields.boolean('Credit Note', help="It indicates that the payslip has been refunded", readonly=True),
'credit_note': fields.boolean('Credit Note', help="Indicates this payslip has a refund of another"),
#TODO put me back
# 'details_by_salary_head': fields.function(_get_salary_rules, method=True, type='one2many', relation='hr.salary.rule', string='Details by Salary Head', multi='details_by_salary_head'),
}

View File

@ -196,6 +196,7 @@
<field name="struct_id" groups="base.group_extended" attrs="{'required':[('contract_id','&lt;&gt;',False)]}"/>
<field name="date_to"/>
<field name="name" colspan="4"/>
<field name="credit_note" readonly="1"/>
</group>
<notebook colspan="4">
<page string="Salary Computation" >
@ -273,7 +274,6 @@
</page>
</notebook>
<field name='credit_note' />
<group col="10" colspan="4">
<field name="state"/>
<button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm"/>
@ -282,7 +282,7 @@
<button string="Approve Sheet" icon="terp-camera_test" name="final_verify_sheet" states="hr_check"/>
<button string="Pay Salary" icon="terp-dolar_ok!" name="process_sheet" states="confirm"/>
<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="done" type='object'/>
<button string="Refund" icon="gtk-execute" name="refund_sheet" states="confirm,done" type='object'/>
</group>
</form>
</field>