[IMP] hr{|_hourly_cost}: move employee currency field

This commit moves the currency_id field on the
employee model from hr_hourly_cost to hr in order
for it to be used in payroll localisations.

task-3029348

closes odoo/odoo#113992

X-original-commit: 60599b735568c1873fdfde85e667b05347432382
Related: odoo/enterprise#37661
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Dossogne Bertrand
2023-03-01 23:28:18 +01:00
committed by Yannick Tivisse
parent d1d3992dc0
commit 13c575afde
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -122,6 +122,7 @@ class HrEmployeePrivate(models.Model):
id_card = fields.Binary(string="ID Card Copy", groups="hr.group_hr_user")
driving_license = fields.Binary(string="Driving License", groups="hr.group_hr_user")
private_car_plate = fields.Char(groups="hr.group_hr_user", help="If you have more than one car, just separate the plates by a space.")
currency_id = fields.Many2one('res.currency', related='company_id.currency_id', readonly=True)
_sql_constraints = [
('barcode_uniq', 'unique (barcode)', "The Badge ID must be unique, this one is already assigned to another employee."),
+1 -2
View File
@@ -7,5 +7,4 @@ class HrEmployee(models.Model):
_inherit = 'hr.employee'
hourly_cost = fields.Monetary('Hourly Cost', currency_field='currency_id',
groups="hr.group_hr_user", default=0.0)
currency_id = fields.Many2one('res.currency', related='company_id.currency_id', readonly=True)
groups="hr.group_hr_user", default=0.0)