Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3121 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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'.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iul. 22
3294
1
aug. 21
3558
0
iun. 23
1705
1
mai 25
252
2
oct. 24
1302