Skip to Content
Menu
This question has been flagged
1267 Views

Hi there,

how can i filter the tasks depending on project select in hr_timesheet modul, where employee is follower to this task ?

What i tried did not work .....

<record model="ir.ui.view" id="view_order_timsheet_tree">

    <field name="name">TimesheetsMod</field>

    <field name="model">account.analytic.line</field>

    <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>

    <field name="arch" type="xml">

       <xpath expr="//field[@name='project_id']" position="replace">

          <field name="project_id" required="1" domain="[('message_is_follower', '=', True)]"/>

       </xpath>

       <xpath expr="//field[@name='task_id']" position="replace">

          <field name="task_id" required="1" context="{'default_project_id': project_id}" options="{'no_create_edit': True}" 

                             domain="[('project_id', '=', project_id),('message_is_follower', '=', True)]"/>

       </xpath>

    </field>

</record>

Kind regards,

Franz

Avatar
Discard