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

I created a simple model x_ovh_phone to follow phone calls (data are pushed by our OVH call center).

Fields are x_date, x_description, x_call_duration and a many2one field to connect to helpdesk.ticket


In helpdesk formview, I used Studio to add a one2many field associated to the many2one of x_ovh_phone

  <xpath expr="/form[1]/sheet[1]/group[1]" position="after">

      <field name="x_studio_field_9WAxj" mode="tree">

        <tree string="Liste des appels">

          <field name="x_date"/>

          <field name="x_call_direction"/>

          <field name="x_studio_field_9Db5i"/>

          <field name="x_call_duration_display"/>

        </tree>

      </field>

    </xpath>

  </xpath>

Calls are actually listed correctly. When I edit the ticket, a button 'Add an item' is shown.

I would like to be able to show 'Search more' button instead to be only able to select a phone call fro a ticket.
Avatar
Discard
Best Answer

Olivier DUCROT

It is showing 'Add an item' because you defined One2many filed,it will not allow to select the records.

If  you want to select phone call from tickets, use Many2many or Many2one as per your requirements which will show you the 'search more' and 'create and edit' option.

If you only want to show 'search more' option,  use options = '{"no_open":True, "no_create": True}' with your Many2many or Many2one field in your view.

Note: Many2many will only show 'search more' , when many2many_tags widget is given.

Thank you

Avatar
Discard