Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3051 Ansichten

In the Employees module, the Work Email field has Enable Ordered Tracking check box is disabled and greyed out. How do enable this to allow tracking of changes in the chatter? Same question for Working Hours. Also, how do I enable tracking for custom many-to-many fields created in Odoo Studio? Using Odoo.sh, so in-depth modifications to python code not possible

Avatar
Verwerfen
Beste Antwort

The "Enable Ordered Tracking" checkbox is disabled and greyed out for fields that are not set as track_visibility in the corresponding model. To enable tracking for the Work Email and Working Hours fields in the Employees module, you can create a custom module and add the track_visibility attribute to the fields.

Here's an example of how to add track_visibility to the Work Email field:

Create a new custom module or use an existing one.
In the models directory of your module, create a new Python file and import the necessary modules:

javascript

from odoo import fields, models

Define a new model that extends the hr.employee model:

arduino

class HrEmployee(models.Model):
_inherit = 'hr.employee'

Add the track_visibility attribute to the Work Email field:
 

Save the file and update your custom module.
Install the module and restart the Odoo server.

Repeat the same steps for the Working Hours field.

For custom many-to-many fields created in Odoo Studio, you can follow similar steps by adding the track_visibility attribute to the field definition in the Studio interface. To do this, open the Studio app, navigate to the model that contains the many-to-many field, and click on the field to edit its properties. In the "Advanced Properties" tab, you can add the track_visibility attribute and set it to 'onchange'.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 22
3192
1
Aug. 21
3499
0
Juni 23
1640
1
Mai 25
201
2
Okt. 24
1153