[IMP] hr_payroll: few modifications

bzr revid: qdp-launchpad@openerp.com-20110322160808-1voe9ad36u1dot1b
This commit is contained in:
Quentin (OpenERP) 2011-03-22 17:08:08 +01:00
parent 5f84f53e4f
commit 9e5609adb5
2 changed files with 24 additions and 22 deletions

View File

@ -344,7 +344,7 @@ class hr_salary_head(osv.osv):
'user_id':fields.char('User', size=64, required=False, readonly=False),
'state':fields.char('Label', size=64, required=False, readonly=False),
'company_id':fields.many2one('res.company', 'Company', required=False),
'dispaly_payslip_report': fields.boolean('Display on payslip report', help="Used for the display of head on Payslip Report"),
# 'dispaly_payslip_report': fields.boolean('Display on payslip report', help="Used for the display of head on Payslip Report"),
# 'computation_based':fields.selection([
# ('rules','List of Rules'),
# ('exp','Expression'),
@ -355,7 +355,7 @@ class hr_salary_head(osv.osv):
'company_id': lambda self, cr, uid, context: \
self.pool.get('res.users').browse(cr, uid, uid,
context=context).company_id.id,
'dispaly_payslip_report': 1,
# 'dispaly_payslip_report': 1,
}
hr_salary_head()
@ -1259,8 +1259,8 @@ class hr_payslip_line(osv.osv):
'name':fields.char('Name', size=256, required=True, readonly=False),
'base':fields.char('Formula', size=1024, required=False, readonly=False),
'code':fields.char('Code', size=64, required=False, readonly=False),
'category_id':fields.many2one('hr.salary.head', 'Category', required=True),
'type':fields.many2one('hr.salary.head.type', 'Type', required=True, help="Used for the reporting purpose."),
'category_id':fields.many2one('hr.salary.head', 'Salary Head', required=True),
'type':fields.related('category_id','type', 'Salary Head Type', store=True), #many2one('hr.salary.head.type', 'Type', required=True, help="Used for the reporting purpose."),
'amount_type':fields.selection([
('per','Percentage (%)'),
('fix','Fixed Amount'),
@ -1303,6 +1303,7 @@ class hr_salary_rule(osv.osv):
required=False
),
'gratuity':fields.boolean('Use for Gratuity ?', required=False),
'condition_select': fields.selection([('range', 'Range'), ('python', 'Python Expression')], "Condition based on"),
'computational_expression':fields.text('Computational Expression', required=True, readonly=False, help='This will use to computer the % fields values, in general its on basic, but You can use all heads code field in small letter as a variable name i.e. hra, ma, lta, etc...., also you can use, static varible basic'),
'conditions':fields.char('Condition', size=1024, required=True, readonly=False, help='Applied this head for calculation if condition is true'),
'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'),
@ -1400,4 +1401,4 @@ class hr_employee(osv.osv):
hr_employee()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -163,7 +163,7 @@
<group col="2" colspan="2">
<separator colspan="4" string="Calculations"/>
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<!--<field name="type"/>-->
<field name="amount_type"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','code')]}"/>
<field name="sequence" groups="base.group_extended"/>
@ -346,7 +346,7 @@
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="type" select="1"/>
<field name="dispaly_payslip_report"/>
<!--<field name="dispaly_payslip_report"/>-->
</group>
<separator colspan="4" string="Description"/>
<field name="note" colspan="4" nolabel="1"/>
@ -597,6 +597,7 @@
<group col="6" colspan="6">
<field name="name"/>
<field name="code" select="1"/>
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="active"/>
<field name="sequence" />
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
@ -605,15 +606,23 @@
<notebook colspan="6">
<page string="General">
<group col="6" colspan="6">
<group col="2" colspan="4">
<separator colspan="4" string="Computational Expression"/>
<field name="computational_expression" colspan="4" nolabel="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Calculations"/>
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<!--<field name="type"/>-->
<field name="condition_select"/>
<field name="conditions" attrs="{'invisible':[('condition_select','=','range')]}"/>
<field name="condition_range_min" attrs="{'invisible':[('condition_select','=','python')]}" colspan="1"/>
<field name="condition_range_max" attrs="{'invisible':[('condition_select','=','python')]}" colspan="1"/>
<field name="amount_type"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','code')]}"/>
<field name="conditions"/>
<field name="condition_range_min"/>
<field name="condition_range_max"/>
<field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'invisible':[('amount_type','=','code')]}"/>
<group col="2" colspan="2" attrs="{'invisible':[('amount_type','&lt;&gt;','code')]}">
<separator colspan="2" string="Compute Code"/>
<field colspan="2" name="python_compute" nolabel="1" attrs="{'readonly':[('amount_type','!=','code')], 'required':[('amount_type','=','code')]}"/>
</group>
</group>
<group col="2" colspan="2">
<group col="2" colspan="2">
@ -626,21 +635,13 @@
<field name="company_contrib"/>
</group>
</group>
<group col="2" colspan="4">
<separator colspan="4" string="Computational Expression"/>
<field name="computational_expression" colspan="4" nolabel="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Compute Code"/>
<field colspan="2" name="python_compute" nolabel="1" attrs="{'readonly':[('amount_type','!=','code')], 'required':[('amount_type','=','code')]}"/>
</group>
</group>
</group>
</page>
<page string="Child Rules">
<separator colspan="4" string="Children definition"/>
<field name="child_depend"/>
<field name="display_child_rules"/>
<!--<field name="display_child_rules"/>-->
<field colspan="4" name="child_ids" nolabel="1"/>
</page>
<page string="Description">