Skip to Content
Menú
This question has been flagged
2 Respostes
4727 Vistes

Hi, I am testing 16 and hoping we can use the Field Services module for our installers. In creating a task in the Field Servies module, the Planned Date fields are missing. Does anyone know how the scheduling and planning is intended to work in 16?

Avatar
Descartar
Autor

Sorry, I should have said that when creating a task, the planned to and from date are not showing. Is there a setting I am missing?

This is beyond ridiculous, why is there no explanation of this to explain the logic here whatsoever on the official docs?? It stuff like this that makes me look at different software options... seriously why hide this?

Autor

I know right.
I cannot fathom how the developers think its a good ideas to hide one of the most important feature of a task - scheduling. I keep looking at this and hoping that someone with some common sense will put it back.
Some workarounds have been proposed however they are still second rate solutions. There is only one fix. Put the scheduling back on the form!

I also encountered this problem while implementing Odoo in my service company. Our consultant gave the explanation that this field was removed on purpose to avoid confusion when creating tasks, but I find that a very hard sell... My guess is that the feature is buggy and to avoid fixing it, they removed it altogether. That being said, our consultant did add it back. We have indeed encountered a small bug (if start time = end time, it doesn't show up under "my tasks").

Best Answer

Hello,

it seems to be changed in v16, you can add planned date From/To through Gant chart view

Avatar
Descartar
Autor

Thank you. I appreciate the response. Unfortunately that is not a good solution. It requires the task to be created from the gantt view only. The tasks we want to use will be created automatically from a SO. One of our Schedulers can then go in and co-ordinate the date/times for the installation to occur. We need to be able to schedule the task directly from the kanban and/or list views.

Autor

OK, I think I stumbled upon a workable solution. From list view, if the checkbox is selected, I can edit the start and end time/dates. If it is not selected, then it opens up in kanban view and you cannot see the start/end dates.
It seems quite strange to me that these fields have been hidden from the kanban view if empty. Its hard to enter data if the fields are hidden!

Basically you still can create a task from SO but in order to have a better overview of all planned tasks you could use Gant

Best Answer

I just ran across the same issue - I thought I was doing something wrong, as no matter what I changed, I couldn't access the planned date for the task level items.

Thankfully, it's easy to adapt the default views.

You can make the following changes to an inherited view for project.task.form
(Via Studio or manually creating the inherited view )

<xpath expr="//form[1]/sheet[1]/group[1]/group[2]/label[@for='planned_date_begin']" position="attributes">
    <attribute name="attrs">{}attribute>
xpath>
<
xpath expr="//form[1]/sheet[1]/group[1]/group[2]/div[@class='w-100']" position="attributes">
    <attribute name="attrs">{}attribute>
xpath>


Here is the original within project.task.view.form.inherit.project.enterprise

<label for="planned_date_begin" string="Planned Date" attrs="{'invisible': [('planned_date_begin', '=', False), ('planned_date_end', '=', False)]}"/>
<
div class="w-100" attrs="{'invisible': [('planned_date_begin', '=', False), ('planned_date_end', '=', False)]}">


Here is how you can create an inherited view without Studio:

  • Enable Developer Mode ( Settings / Activate developer mode )
  • Create the inherited view ( Settings / Technical / User Interface / Views )

    

  • Be sure to include:
    • View Name ( use anything you want, but something like Project.Task.Form.Inherited will make it easy to keep track of )
    • Model: project.task
    • Inherited View: project.task.form

        


Avatar
Descartar
Autor

Thank you for your post. Unfortunately I still cannot get the planning dates to appear on the form when creating a new entry or trying to set a time/date for one created via a SO.
I tried using Studio however I struggled to find the settings etc. I also tried using debug/creating a view as proposed which did save successfully however the fields still do not appear on a new field services task.

I just cannot believe that someone thought it would be a good idea to prevent users from scheduling a task as the task is being created. It seems so silly and completely crazy to me.

Autor

I am trying to put this into a addon module but seem to be doing something wrong. Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="project_task_view_form_inherit_project_enterprise" model="ir.ui.view">
<field name="name">project.task.form.inherited</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.task.form"/>
<field name="mode">extension</field>
<field name="view_mode">form</field>
<field name="arch" type="xml">
<data>
<xpath expr="//form[1]/sheet[1]/group[1]/group[2]/label[@for='planned_date_begin']" position="attributes">
<attribute name="attrs">{}</attribute>
</xpath>
<xpath expr="//form[1]/sheet[1]/group[1]/group[2]/div[@class='w-100']" position="attributes">
<attribute name="attrs">{}</attribute>
</xpath>
</data>
</field>
</record>
</odoo>

Any help greatly appreciated

Autor

Ok, I have my addon working now. Here is the view code:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="project_task_view_form_inherit_project_enterprise" model="ir.ui.view">
<field name="name">project.task.form.inherited</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="mode">extension</field>
<field name="arch" type="xml">
<data>
<xpath expr="//form[1]/sheet[1]/group[1]/group[2]/label[@for='planned_date_begin']" position="attributes">
<attribute name="attrs">{}</attribute>
</xpath>
<xpath expr="//form[1]/sheet[1]/group[1]/group[2]/div[@class='w-100']" position="attributes">
<attribute name="attrs">{}</attribute>
</xpath>
</data>
</field>
</record>
</odoo>

Related Posts Respostes Vistes Activitat
1
de maig 25
2450
1
d’abr. 25
3470
1
d’abr. 25
4298
1
d’abr. 25
1779
4
de març 25
6887