1

I want users to be able to edit a specific sequence. So I created a new manuitem:

<menuitem
    id="aimed_purchase_order_sequence" name="Sequence BCV"
    parent="purchase.menu_purchase_config" action="open_apo_sequence_form_view"/>

and this action:

<record id="open_apo_sequence_form_view" model="ir.actions.act_window">
    <field name="name">Sequence Bons de commande</field>
    <field name="res_model">ir.sequence</field>
    <field name="view_mode">tree</field>
    <field name="res_id" ref="base.sequence_view_tree"/>
    <field name="domain">[('code','=','aimed.purchase.order')]</field>
</record>

This code gave me a tree view with a unique record. And I can't edit anything. How can I make it load the form view and can actually edit it's values?

Thank you.

Tessnim
  • 434
  • 9
  • 29
  • 1
    Use `form` instead of `tree`. Or for future use, if it's needed to edit more than one sequence use `tree,form` instead. – CZoellner Aug 02 '21 at 11:27
  • @CZoellner that solved my problem, which means this is not an access issue, it's a view type issue. Thanks. Create an answer if you want so I validate it. – Tessnim Aug 02 '21 at 13:18

1 Answers1

1

Use form instead of tree. Or for future use, if it's needed to edit more than one sequence use tree,form instead.

If you want to enable more than one view type, use commas like in my example tree,form. Important: don't uses spaces.

CZoellner
  • 13,553
  • 3
  • 25
  • 38