Skip to Content
Menu
This question has been flagged

I'm trying to remove Kanban view from "contacts.action_contacts" action. I've inherited the action window with the code below, leaving only "tree" as a view_mode (code in comments)

This alone didn't help, so I tried to overwrite ir\.actions\.act_window\.view,\ linking\ it\ to\ another\ act_window\ as\ suggested here, with code in the comments.

However, after applying the changes I receive this error - 

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 698, in _tag_root
    f(rec)
  File "/home/odoo/src/odoo/odoo/tools/convert.py", line 533, in _tag_record
    raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'base.action_partner_form_view1'

I've verified that base.action_partner_form_view1 exists in ir_model_data table, and I have dependency on 'base' in my manifest file, so this shouldn't be an issue.

Any help would be much appreciated, I run out of ideas on how to fix it.

Avatar
Discard
Author

action window cod:

<record id="contacts.action_contacts" model="ir.actions.act_window">
<field name="name">Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_mode">tree</field>
<field name="context">{'res_partner_search_mode': 'customer'}</field>
<field name="search_view_id" ref="base.view_res_partner_filter"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create an Account in your address book
</p><p>
Odoo helps you track all activities related to your contacts.
</p>
</field>
</record>

Author

Code to link view to another action window that I used:

<!-- create a dummy window action -->
<record model="ir.actions.act_window" id="dummy_or_whatever_you_want">
<field name="name">Dummy</field>
<field name="res_model">res.partner</field>
<field name="view_mode">kanban,form</field>
<field name="context">{}</field>
</record>

<record id="base.action_partner_form_view1" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">kanban</field>
<field name="view_id" ref="base.res_partner_kanban_view"/>
<field name="act_window_id" ref="dummy_or_whatever_you_want"/>
</record>

Author Best Answer

I figured it out. I used wrong " view_id ", the correct " view_id " to use is "contacts.action_contacts_view_kanban". With this modification, the solution above works well

Avatar
Discard
Related Posts Replies Views Activity
3
Apr 23
2466
2
Aug 24
2972
2
Jan 24
988
1
Nov 23
1389
1
Dec 24
3624