Commit 620b857
committed
[FIX] web: tests - allow custom responses in onRpc
Before this commit, when an 'onRpc' handler would return a 'Response'
object, it would still be wrapped in a JSON-RPC payload (under the
'result' key) if the "content-type" header specified that it was a
JSON-RPC.
However, if a 'Response' object is returned by the handler, it usually
means that the response should be that object as-is, as it was created
with the desired final parameters.
This commit ensures that 'Response' values are returned as they are,
instead of being wrapped in a JSON-RPC payload object.
Since this is also in the scope of mock server responses, this commit
removes the use of '{ pure: true }' RPC handlers that are not necessary.
closes odoo#233199
X-original-commit: a2cab03
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>1 parent 1128361 commit 620b857
File tree
8 files changed
+35
-40
lines changed- addons
- calendar/static/tests
- web/static/tests
- _framework/mock_server
- mock_server
- views/fields
8 files changed
+35
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 59 | + | |
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
| |||
Lines changed: 5 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
| 544 | + | |
547 | 545 | | |
548 | 546 | | |
549 | 547 | | |
| |||
553 | 551 | | |
554 | 552 | | |
555 | 553 | | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
565 | 557 | | |
566 | 558 | | |
567 | 559 | | |
| |||
794 | 786 | | |
795 | 787 | | |
796 | 788 | | |
797 | | - | |
| 789 | + | |
798 | 790 | | |
799 | 791 | | |
800 | 792 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | 156 | | |
158 | | - | |
159 | | - | |
| 157 | + | |
| 158 | + | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
174 | 187 | | |
175 | 188 | | |
176 | 189 | | |
| |||
188 | 201 | | |
189 | 202 | | |
190 | 203 | | |
| 204 | + | |
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
| |||
320 | 334 | | |
321 | 335 | | |
322 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
323 | 344 | | |
324 | 345 | | |
325 | 346 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
| |||
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 79 | + | |
86 | 80 | | |
87 | 81 | | |
88 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 117 | + | |
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
| |||
0 commit comments