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

[FIX][web] Stop recursively adding contexts. #13635

Closed
wants to merge 1 commit into from

Commits on Sep 29, 2016

  1. [FIX][web] Stop recursively adding contexts.

    Some lines below this patch, there is this:
    
        if (action.context) {
            c.add(action.context);
        }
        action.context = c;
    
    Since the `action` variable was coming by reference, this means that each time you press a button, it added its context to itself, making that after pressing too many times the same button, recursiveness turned the system slow.
    
    Also, a bigger side effect of this is that if you had a one2many tree view with a button on it that had a context like `{'default_other': some_field}`, the context was not being updated when you clicked on a different row.
    
    With this patch, further modifications on the action are made on a copy, so no recursion happens and the original action is kept intact.
    yajo committed Sep 29, 2016
    Copy the full SHA
    a5a5b20 View commit details
    Browse the repository at this point in the history