Skip to Content
Menu
This question has been flagged
1 Reply
2301 Views

Good afternoon.

I want to develop a module that will inherit from project.

When using hr_timesheet after creating a task, you can enter "Initially Planned Hours" in it.

How to make it so that during task creation, in addition to "Task Title" and "Assigned to", you can immediately write "Initially Planned Hours"?

Do I understand correctly that it is possible not to copy the code "Originally scheduled hours", otherwise it is possible to add it when creating the module?


Avatar
Discard
Best Answer

Hello Nikita,

There the view that you are after is called "project.task.form.quick_create". To get here, go to Technical->Views and search for the name "project.task.form.quick_create". 

From here you can click on "Inherited Views" tab and create a new inherited view. 
Copy this code into the "Architecture":

<?xml version="1.0"?>
<xpath expr="//field[@name='user_id']" position="after">
  <field name="planned_hours"/>
</xpath>

And then give the name something like: project.task.form.quick_create_planned_hours

Save and refresh the task view, the planned hours field is now on the quick create view.

EDIT:

If doing this in a module, you just need to inherit the view and paste the same code as the arch. Reference

I hope this help,

Thanks, 

Avatar
Discard