[MERGE] merge from trunk payroll

bzr revid: mra@mra-laptop-20110411122559-8s7vnahm7jguta5d
This commit is contained in:
Mustufa Rangwala
2011-04-11 17:55:59 +05:30
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -228,7 +228,7 @@ class hr_payslip(osv.osv):
'note': fields.text('Description'),
'contract_id': fields.many2one('hr.contract', 'Contract', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'details_by_salary_head': fields.function(_get_lines_salary_head, method=True, type='one2many', relation='hr.payslip.line', string='Details by Salary Head'),
'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"),
}
_defaults = {
'date_from': lambda *a: time.strftime('%Y-%m-01'),
@@ -248,7 +248,6 @@ class hr_payslip(osv.osv):
'line_ids': [],
'move_ids': [],
'move_line_ids': [],
'move_payment_ids': [],
'company_id': company_id,
'period_id': False,
'basic_before_leaves': 0.0,
+2 -2
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>