This question has been flagged
2 Replies
3754 Views

Hi,

I need to make the new created button send me to my app Dossier, any idea? Thank you!


new created button (in sale module):

        <record id="view_order_form_inherited" model="ir.ui.view">

            <field name="name">sale.order.form.inherited</field>

            <field name="model">sale.order</field>

            <field name="inherit_id" ref="sale.view_order_form"/>

            <field name="arch" type="xml">

                <xpath expr="//button[@name='action_cancel']" position="after">

                        <button name="dossier_forms" type="object" string="Dossier"/>

                </xpath>

            </field>

        </record>


my new app: (module name: dossier)

<odoo>

    <menuitem id="dossier_menu"

              name="Dossier" />


    <act_window id="action_forms"

      name="Formularios"

      res_model="dossier.forms"

      view_mode="tree,form"/>


    <menuitem id="menu_dossier_forms"

              name="Formulario"

              action="action_forms"

              parent="dossier_menu" />

</odoo>


I tried this solution but no effect:

<button name="dossier_forms" action="action_forms" type="object" string="Dossier"/>

Avatar
Discard
Best Answer

Hello Jakub,

Please try the below code:

<button name="%(module_name.action_forms)d" type="action" string="Dossier"/>

Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard
Author

an error pops up:

odoo.tools.convert.ParseError: "External ID not found in the system: dossier.action_dossier"

any idea why? Thank you.

Hello Jakub,

You can take the reference of this action id='act_res_partner_2_sale_order' in addons/sale/views/res_partner_views.xml and also don't forgot to add your 'action_forms' file in manifest.