Meera Trambadia (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-payroll-decimal-precision-mtr into
lp:~openerp-dev/openobject-addons/trunk-payroll.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-payroll-decimal-precision-mtr/+merge/63349
hr_payroll: created decimal_precision for Payroll and improved dp in hr_payroll.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-payroll-decimal-precision-mtr/+merge/63349
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-payroll-decimal-precision-mtr into
lp:~openerp-dev/openobject-addons/trunk-payroll.
=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py 2011-05-27 10:13:22 +0000
+++ hr_payroll/hr_payroll.py 2011-06-03 09:32:29 +0000
@@ -759,8 +759,8 @@
('fix','Fixed Amount'),
('code','Python Code'),
],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),
- 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Account'),),
- 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Account'), help='For example, enter 50.0 to apply a percentage of 50%'),
+ 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),
+ 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll'), help='For example, enter 50.0 to apply a percentage of 50%'),
'amount_python_compute':fields.text('Python Code'),
'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
@@ -920,10 +920,10 @@
'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
'contract_id':fields.many2one('hr.contract', 'Contract', required=True),
- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
- 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account')),
- 'company_contrib': fields.float('Company Contribution', readonly=True, digits_compute=dp.get_precision('Account')),
- 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Account'),store=True ),
+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),
+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),
+ 'company_contrib': fields.float('Company Contribution', readonly=True, digits_compute=dp.get_precision('Payroll')),
+ 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),
}
hr_payslip_line()
@@ -965,7 +965,7 @@
_columns = {
'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
- 'total_wage': fields.function(_calculate_total_wage, method=True, type='float', string='Total Basic Salary', digits_compute=dp.get_precision('Account'), help="Sum of all current contract's wage of employee."),
+ 'total_wage': fields.function(_calculate_total_wage, method=True, type='float', string='Total Basic Salary', digits_compute=dp.get_precision('Payroll'), help="Sum of all current contract's wage of employee."),
}
hr_employee()
=== modified file 'hr_payroll/hr_payroll_data.xml'
--- hr_payroll/hr_payroll_data.xml 2011-05-27 10:13:22 +0000
+++ hr_payroll/hr_payroll_data.xml 2011-06-03 09:32:29 +0000
@@ -72,5 +72,12 @@
<field name="company_id" ref="base.main_company"/>
</record>
+ <!-- Decimal Precision -->
+
+ <record forcecreate="True" id="decimal_payroll" model="decimal.precision">
+ <field name="name">Payroll</field>
+ <field name="digits">2</field>
+ </record>
+
</data>
</openerp>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp