project_task.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="custom_project_project_task_form" model="ir.ui.view">
  5. <field name="name">custom_project_project_task_form</field>
  6. <field name="model">project.task</field>
  7. <field name="inherit_id" ref="project_enterprise.project_task_view_form"/>
  8. <field name="arch" type="xml">
  9. <xpath expr="//div[@id='date_deadline_and_recurring_task']" position="attributes">
  10. <attribute name="invisible">1</attribute>
  11. </xpath>
  12. <xpath expr="//label[@for='date_deadline'][1]" position="attributes">
  13. <attribute name="invisible">1</attribute>
  14. </xpath>
  15. <xpath expr="//label[@for='date_deadline'][2]" position="attributes">
  16. <attribute name="invisible">1</attribute>
  17. </xpath>
  18. <xpath expr="//field[@name='recurring_task']" position="replace"/>
  19. <xpath expr="//div[@id='date_deadline_and_recurring_task']" position="after">
  20. <label for="x_start_date" string="Fechas planeadas"/>
  21. <div id="planned_date_task" class="d-inline-flex w-100">
  22. <field name="x_end_date" invisible="1" required="1"/>
  23. <field name="x_start_date" required="1" widget="daterange" options="{'end_date_field': 'x_end_date'}"/>
  24. <field name="recurring_task" nolabel="1" class="ms-0" style="width: fit-content;" widget="boolean_icon" options="{'icon': 'fa-repeat'}" invisible="not active or parent_id" groups="project.group_project_recurring_tasks"/>
  25. </div>
  26. <field name="x_days_duration"/>
  27. </xpath>
  28. <xpath expr="//field[@name='child_ids']/list//field[@name='date_deadline']" position="attributes">
  29. <attribute name="column_invisible">1</attribute>
  30. </xpath>
  31. <xpath expr="//field[@name='child_ids']/list//field[@name='date_deadline']" position="after">
  32. <field name="x_end_date" column_invisible="1" required="1"/>
  33. <field name="x_start_date" string="Fechas planeadas" required="1" widget="daterange" options="{'end_date_field': 'x_end_date'}" optional="show"/>
  34. <field name="x_days_duration" optional="show"/>
  35. </xpath>
  36. </field>
  37. </record>
  38. </data>
  39. </odoo>