Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3298 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 22
3485
1
sie 21
3717
0
cze 23
1880
1
maj 25
518
2
paź 24
1551