Before this commit, in a form view, from the second opening of a
selection dialog by clicking on the "Search More..." button of a
many2one with a "search_default_..." in its context opened the selection
view without the filter corresponding to the "search_default_...".
Why:
The search model removes the "search_default_..." keys from the context
it is given.
Solution:
Clone the received context so as not to modify it.
How to reproduce:
- Go to a form view with a many2one field having in its context "search_default_..."
- Click on the m2o
- Click on "Search More..."
The search dialog opens with the filter corresponding to "search_more_..."
- Close the dialog
- Click on the m2o
- Click on "Search More..."
Before this commit:
The search dialog opens without the filter corresponding to "search_more_..."
After this commit:
The search dialog opens with the filter corresponding to "search_more_..."
closesodoo/odoo#110342
X-original-commit: 82293c5f4d0955c4688a619bf69e3f0049f10fb6
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>