Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.0] open form in edit mode #22353

Closed
yousef-soliman opened this issue Jan 18, 2018 · 3 comments
Closed

[11.0] open form in edit mode #22353

yousef-soliman opened this issue Jan 18, 2018 · 3 comments
Assignees
Labels

Comments

@yousef-soliman
Copy link

@yousef-soliman yousef-soliman commented Jan 18, 2018

Impacted versions:
11.0
Steps to reproduce:
make python function that return Action

return {
            'res_model':'res.company',
            'view_mode':'form',
            'res_id':self.env.user.company_id.id,
            'type':'ir.actions.act_window',
            'view_type':'form',
            'view_id':self.env.ref('cbpo_client_dashboard.client_dashboard_form').id, 
            'target':'current',
            'flags': {'initial_mode': 'edit'},   
        }

Current behavior:
not open form in edit mode
Expected behavior:
open form in edit mode

Video/Screenshot link (optional):

@sswapnesh

This comment has been minimized.

Copy link
Contributor

@sswapnesh sswapnesh commented Jan 18, 2018

@Yenthe666

This comment has been minimized.

Copy link
Collaborator

@Yenthe666 Yenthe666 commented Jan 19, 2018

@xmo-odoo and @mart-e for you guys to check!

@mgeubelle mgeubelle self-assigned this Jan 22, 2018
@mgeubelle

This comment has been minimized.

Copy link
Contributor

@mgeubelle mgeubelle commented Jan 22, 2018

Hi @yousef-soliman

Thanks for reporting the issue.

The flag initial_view was in fact working by chance in 10.0 because the view attribute has the same name.

We have tried to clean up the options (and even more in 12.0) to avoid multiple options for the same behavior.

You can use form_view_initial_mode in the action context to do what you described.

@sswapnesh thanks for your contribution, it helped me to understand what happened ; I will fix the issue in 11.0 (see mentioned commit).

Regards,

Martin

@mgeubelle mgeubelle closed this in 8b5440c Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.