0
votes

I'm working on contracts management module where the user must choose the contrat which he/she has to work on.

The scenario is:

  • The user clicks on the parent menu (the module menu on the top menus bar) then a wizard is dispalyed to choose the contract

  • After some processing i have to return a window action to display a list view (of contract model) matching a certain domain

Here is an example of the returned action

return { 'type': 'ir.actions.act_window', 'name': 'Contracts', 'res_model': 'gc.contract', 'view_type': 'form', 'view_mode': 'tree,form', 'target': '', }

I've tried all available values for the target attribute but it does not work as i want.

The new, inline and inlineview value are out of scope for me here, with current it displays the contract's list but the form name is wrong for example if the user is working on the accounting module (i.e Customer Refunds) then i get Customer Refunds/Contracts as form name and the Contacts menu on the left panel is not highlighted.

How can i solve this problem??

1

1 Answers

1
votes

As far as I understand, you may need to get the view_id of the view you want for that specific menu is pointed at.

view_id = self.env.ref('module.view_id_name').id
return {..., 'view_id': view_id, ...}