Saturday, June 10, 2023
10 changes · master
Miscellaneous changes
Steps to reproduce ================== - Switch odoo to french - Go to projects - Click on the three dots -> Got duplicate key in t-foreach: Violet Cause of the issue ================== Since [0], the colors have been renamed. In french, both Purple and Violet translates to Violet. Color is a LazyTranslatedString and its string representation is the translation. Solution ======== Use the index for the t-key [0]: https://github.com/odoo/odoo/commit/ef313061301948693bfbe
Original PR description
Steps to reproduce ================== - Switch odoo to french - Go to projects - Click on the three dots -> Got duplicate key in t-foreach: Violet Cause of the issue ================== Since [0], the colors have been renamed. In french, both Purple and Violet translates to Violet. Color is a LazyTranslatedString and its string representation is the translation. Solution ======== Use the index for the t-key [0]: https://github.com/odoo/odoo/commit/ef313061301948693bfbeb16e8ccca786e5251f4#diff-df052c03baba52d267dcf7714eb1a1d03f1eddf85f096ff1c8d016f12f71a6b5L40-L53 opw-3358597 Forward-Port-Of: odoo/odoo#124458
The confirmation dialog component uses `t-esc` thereby preventing the use of markup for the body prop. With this commit, we use `t-out` instead and thereby allowing markup. The same applies for the AlertDialog [IMP] web: enhance extensibility of form/list confirmation dialog when deleting records To extend the functionality of the delete confirmation in the form and list controllers, a lot of code has to be copied. This commit separates the props into a getter, making it easier to be ex
Original PR description
The confirmation dialog component uses `t-esc` thereby preventing the use of markup for the body prop. With this commit, we use `t-out` instead and thereby allowing markup. The same applies for the AlertDialog [IMP] web: enhance extensibility of form/list confirmation dialog when deleting records To extend the functionality of the delete confirmation in the form and list controllers, a lot of code has to be copied. This commit separates the props into a getter, making it easier to be extended. Forward-Port-Of: odoo/odoo#124221 Forward-Port-Of: odoo/odoo#123532
Allow timesheeting on sub-tasks with no project_id set. Instead, refer to the project_id set on its parent_id, and so on, recursively. task-3336215 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#122520
Original PR description
Allow timesheeting on sub-tasks with no project_id set. Instead, refer to the project_id set on its parent_id, and so on, recursively. task-3336215 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#122520
Desired behavior after PR is merged: Sign the CLA to make more contribution --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#124562
Original PR description
Desired behavior after PR is merged: Sign the CLA to make more contribution --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#124562
Send a request to any json-rpc route with a HTTP header `Content-Type: application/json-rpc` but send non-json or non-jsonrpc data in the body. The application crashes with a 500 Internal Server Error instead of a 400 Bad Request one. Closes: #122048 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odo
Original PR description
Send a request to any json-rpc route with a HTTP header `Content-Type: application/json-rpc` but send non-json or non-jsonrpc data in the body. The application crashes with a 500 Internal Server Error instead of a 400 Bad Request one. Closes: #122048 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#122437
Task: 3336403 Forward-Port-Of: odoo/enterprise#41334
Original PR description
Task: 3336403 Forward-Port-Of: odoo/enterprise#41334
* Allow today's timesheet validation. * Allow users to timesheet today, even if last validation is today. * Adapt Error Message when no timesheet to validate. task-3284604 Forward-Port-Of: odoo/enterprise#42239 Forward-Port-Of: odoo/enterprise#41118
Original PR description
* Allow today's timesheet validation. * Allow users to timesheet today, even if last validation is today. * Adapt Error Message when no timesheet to validate. task-3284604 Forward-Port-Of: odoo/enterprise#42239 Forward-Port-Of: odoo/enterprise#41118
Fixes 2 different bug, more details in each commit - all timesheets > on searching project/task filter > traceback - my timesheet > list view > group by "project" > start > create a project > stop > Traceback Task-3292566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#40786
Original PR description
Fixes 2 different bug, more details in each commit - all timesheets > on searching project/task filter > traceback - my timesheet > list view > group by "project" > start > create a project > stop > Traceback Task-3292566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#40786
The associated community PR makes a change to the confirmation dialog template, which is extended in documents_spreadsheet. This commit fixes the xpath target Forward-Port-Of: odoo/enterprise#42279
Original PR description
The associated community PR makes a change to the confirmation dialog template, which is extended in documents_spreadsheet. This commit fixes the xpath target Forward-Port-Of: odoo/enterprise#42279
While creating a post on 'social_twitter' if we upload a corrupted image or when the API sends improper response after clicking on post button it will show image uploading status failed in the Kanban view below and when we click on retry we will encouter 'AttributeError: 'UserError' object has no attribute 'name'' . Steps to produce: 1) In 'social_twitter' click on new post. 2) Add a particular mesage and upload a corrupted image. 3) Now click on post. 5) In the Knaban view below it will s
Original PR description
While creating a post on 'social_twitter' if we upload a corrupted image or when the API sends improper response after clicking on post button it will show image uploading status failed in the Kanban…
While creating a post on 'social_twitter' if we upload a corrupted image or when the API sends improper response after clicking on post button it will show image uploading status failed in the Kanban view below and when we click on retry we will encouter 'AttributeError: 'UserError' object has no attribute 'name'' .
Steps to produce:
1) In 'social_twitter' click on new post.
2) Add a particular mesage and upload a corrupted image. 3) Now click on post.
5) In the Knaban view below it will show image uploading status 'Failed'. 6) Click on retry.
By following above steps you will be able to encounter error.
Traceback:
```
UserError: We could not upload your image, try reducing its size and posting it again (error: ).
File "home/odoo/src/enterprise/saas-16.2/social_twitter/models/social_live_post.py", line 92, in _post_twitter
images_attachments_ids = account._format_attachments_to_images_twitter(post.image_ids)
File "home/odoo/src/enterprise/saas-16.2/social_twitter/models/social_account.py", line 167, in _format_attachments_to_images_twitter
return self._format_images_twitter([{
File "home/odoo/src/enterprise/saas-16.2/social_twitter/models/social_account.py", line 193, in _format_images_twitter
media_id = self._init_twitter_upload(image)
File "home/odoo/src/enterprise/saas-16.2/social_twitter/models/social_account.py", line 221, in _init_twitter_upload
raise UserError(_("We could not upload your image, try reducing its size and posting it again (error: %s).", generic_api_error))
AttributeError: 'UserError' object has no attribute 'name'
File "odoo/http.py", line 2115, in __call__
response = request._serve_db()
File "odoo/http.py", line 1698, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1922, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 32, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.2/social/models/social_live_post.py", line 74, in action_retry_post
self._post()
File "home/odoo/src/enterprise/saas-16.2/social_youtube/models/social_live_post.py", line 73, in _post
super(SocialLivePostYoutube, (self - youtube_live_posts))._post()
File "home/odoo/src/enterprise/saas-16.2/social_twitter/models/social_live_post.py", line 78, in _post
twitter_live_posts._post_twitter()
File "home/odoo/src/enterprise/saas-16.2/social_twitter/models/social_live_post.py", line 96, in _post_twitter
'failure_reason': e.name
```
This commit will fix the Attribute error by using a proper value for 'failure_reason'. Also the file size of image can be upto 20 MB according to our current R & D.
sentry- 4147783585
Forward-Port-Of: odoo/enterprise#40754