Skip to Content
Menu
This question has been flagged

How can one rename the "Employee" label to "Staff" throughout the application?

Avatar
Discard

Hi Foster, Are you using odoo in odoo cloud or your own server??

Which model? u just use xpath for that, to rename.

Author

I'm running v8 on my local server. We need to change the label "employee" to "staff" as we have many contractors that we use the HR module to keep track of, however, for legal reasons, they can not be referred to as an employee.

Best Answer

Couldn't you just make a custom Language (based on the default English)?

  1. export the English Translation you have to a csv file (>Settings >Translations >Import/Export)

  2. find & replace 'Employee' with 'staff'

  3. import your custom language to odoo

  4. use it (>Settings >Translations >Load a Translation)

Avatar
Discard
Author

That is a good ideal! I'll try that as soon as I can. Thank you.

fell free to check or upvote the answer if it actually works

Best Answer

You can change the label by 2 ways:

1. Inherit the FORM view using XML (Preferred)

 <record id="view_attendance_form_inherit" model="ir.ui.view">
	<field name="name">hr.attendance.form</field>
	<field name="model">hr.attendance</field>
	<field name="inherit_id" ref="hr_attendance.view_attendance_form" />
	<field name="arch" type="xml">
		<xpath expr="//field[@name='employee_id']" position="attributes">
			<attribute name="string">Staff</attribute>
		</xpath>
	</field>
</record>
2. change the attribute with PY file

class hr_attendance(models.Model):
    _inherit='hr.attendance'
    employee_id = fields.Many2one(string="Staff")
Avatar
Discard
Author

Thanks for you answer! I'm a newbie here and am still learing the in and outs. So in the first listed solution, could you point me towards how to "inherit the form view"? I'm excited to finish getting my installation dialed in and deployed.

copy the record available in Option1 to a view.xml file and add this file in __openerp__.py file. for more info check on how to create a basic module: https://www.odoo.com/documentation/8.0/howtos/backend.html

Related Posts Replies Views Activity
1
Mar 21
1398
1
Jul 23
1251
0
Mar 23
1307
3
Jan 23
4622
1
Mar 15
3959