Skip to content

Commit

Permalink
[IMP] hr{|_hourly_cost}: move employee currency field
Browse files Browse the repository at this point in the history
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#113992

X-original-commit: 60599b7
Related: odoo/enterprise#37661
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
  • Loading branch information
Bertrand2 authored and tivisse committed Mar 1, 2023
1 parent d1d3992 commit 13c575a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions addons/hr/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand Down
3 changes: 1 addition & 2 deletions addons/hr_hourly_cost/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 13c575a

Please sign in to comment.