Saturday, June 25, 2016
1 change · master
Enhancements to existing features
This update lets website and API controllers receive multiple submitted values for the same field when explicitly enabled. It simplifies handling cases like several uploaded attachments while keeping existing behavior unchanged unless the new option is used.
Original PR description
Description of the issue/feature this PR addresses: It's hard to get the parameters in a controller if you expect several kinds of input (post, get, files) and several values per parameter (such as if you want to append several attachments to a record).
Current behavior before PR: Developer should merge `request.httprequest.{files,form,args}` in a `CombinedMultiDict`, remove core keys (session_id, csrf_token...), and ignore the received `kwargs`.
Desired behavior after PR is merged:
Now if you just set `@route(multi=True)` to your controller, you will get a list of values for each `**kwarg`.
Otherwise, behavior remains the same.
##
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@Tecnativa