[IMP] hr_payroll:removed qty from demo,improved search engine,made qty mandatory and added tooltip

bzr revid: mtr@mtr-20110425095537-ewmhlikkh5i50jyg
This commit is contained in:
mtr
2011-04-25 15:25:37 +05:30
parent 51543fa458
commit 3c877bb4c7
3 changed files with 3 additions and 9 deletions
+2 -3
View File
@@ -500,7 +500,6 @@ class hr_payslip(osv.osv):
for rule in self.pool.get('hr.salary.rule').browse(cr, uid, sorted_rule_ids, context=context):
key = rule.code + '-' + str(contract.id)
localdict['result'] = None
localdict.update({'quantity': rule.quantity or None})
#check if the rule can be applied
if self.pool.get('hr.salary.rule').satisfy_condition(cr, uid, rule.id, localdict, context=context) and rule.id not in blacklist:
#compute the amount of the rule
@@ -643,7 +642,7 @@ class hr_salary_rule(osv.osv):
'name':fields.char('Name', size=256, required=True, readonly=False),
'code':fields.char('Code', size=64, required=True),
'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'),
'quantity': fields.char('Quantity', size=256),
'quantity': fields.char('Quantity', size=256, help="It is used in computation for percentage and fixed amount.For e.g. A rule for Meal Voucher having fixed amount of 1€ can have its quantity defined in expression like worked_days['WORK100']['number_of_days']."),
'category_id':fields.many2one('hr.salary.head', 'Salary Head', required=True),
'active':fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the salary rule without removing it."),
'appears_on_payslip': fields.boolean('Appears on Payslip', help="Used for the display of rule on payslip"),
@@ -715,7 +714,7 @@ result = rules['NET'] > heads['NET'] * 0.10''',
'amount_select': 'fix',
'amount_fix': 0.0,
'amount_percentage': 0.0,
'quantity': 1,
'quantity': '1',
}
def _recursive_search_of_rules(self, cr, uid, rule_ids, context=None):
-5
View File
@@ -12,7 +12,6 @@
<field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">House Rent Allowance</field>
<field name="sequence" eval="5"/>
<field name="quantity">1</field>
</record>
<record id="hr_payslip_line_convanceallowance1" model="hr.salary.rule">
@@ -22,7 +21,6 @@
<field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">Conveyance Allowance</field>
<field name="sequence" eval="10"/>
<field name="quantity">1</field>
</record>
<record id="hr_payslip_line_professionaltax1" model="hr.salary.rule">
@@ -32,7 +30,6 @@
<field name="code">PT</field>
<field name="category_id" ref="hr_payroll.DED"/>
<field name="name">Professional Tax</field>
<field name="quantity">1</field>
</record>
<record id="hr_payslip_line_providentfund1" model="hr.salary.rule">
@@ -43,7 +40,6 @@
<field name="code">PF</field>
<field name="category_id" ref="hr_payroll.DED"/>
<field name="name">Provident Fund</field>
<field name="quantity">1</field>
</record>
<record id="hr_salary_rule_ca_paolino" model="hr.salary.rule">
@@ -53,7 +49,6 @@
<field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">Conveyance Allowance For Paolino</field>
<field name="sequence" eval="15"/>
<field name="quantity">1</field>
</record>
<record id="hr_salary_rule_meal_voucher" model="hr.salary.rule">
+1 -1
View File
@@ -547,7 +547,7 @@
<field name="condition_range_max" colspan="2" attrs="{'invisible':[('condition_select','&lt;&gt;','range')], 'required':[('condition_select','=','range')]}"/>
<separator colspan="4" string="Computation"/>
<field name="amount_select"/>
<field name="quantity" attrs="{'invisible':[('amount_select','=','code')]}"/><newline/>
<field name="quantity" attrs="{'invisible':[('amount_select','=','code')], 'required':[('amount_select','!=','code')]}"/><newline/>
<field name="amount_fix" attrs="{'invisible':[('amount_select','&lt;&gt;','fix')], 'required':[('amount_select','=','fix')]}"/>
<field colspan="4" name="amount_python_compute" attrs="{'invisible':[('amount_select','&lt;&gt;','code')], 'required':[('amount_select','=','code')]}"/>
<field name="amount_percentage_base" attrs="{'invisible':[('amount_select','&lt;&gt;','percentage')], 'required': [('amount_select','=','percentage')]}"/>