Daily updates from Odoo
Navigate
Branch
Wednesday, August 30, 2023
14 changes
Security fixes and vulnerability patches
Portal users no longer get direct access to subscription recurrence data. The subscription portal still shows the needed information, but it now uses controlled internal access where required, reducing unnecessary exposure of business data.
Original PR description
…oral.recurrence Before this commit, the sale.temporal.recurrence records had security rules for portal users. It was only needed to display the list of sale.order in the /my/subscription page. We decide to remove this portal access and to use sudo when necessary. The /my/subscription/<int:order_id> is using the sudoed record, therefore no change is needed in that view. taskid: 3221012
Enhancements to existing features
Odoo’s document extraction features now point to the newer IAP service address format. This keeps invoice, expense, and recruitment document processing aligned with the current service infrastructure without changing the user workflow.
Original PR description
https://www.odoo.com/web#id=3436884&cids=1&menu_id=4720&action=333&active_id=2068&model=project.task&view_type=form
The customer portal now presents the main overview as clearer card-style sections with counts and descriptions across several business apps. Account and address pages were also aligned with the new layout, and subscriptions gained a search option to help customers find records faster.
Original PR description
WIP ;D
Resolved issues and error corrections
The Planning calendar now opens correctly after fixing a translation lookup that could cause an error. This prevents users from hitting a crash when viewing planning slots in the calendar.
Original PR description
Before this commit, a traceback is occured when the calendar view of `planning.slot` model is loaded because `this.env._t` is `undefined`, the reason is because `_t` is no longer in `this.env` and so it should be imported to be used. This commit imports `_t` function and replace `this.env._t` by `_t` to be able to translate the term as before.
The Appointment app no longer adds its own Calendar menu entry because the Calendar app already provides it. This prevents users from seeing two identical Calendar options when Appointment is installed, making navigation clearer.
Original PR description
https://github.com/odoo/odoo/pull/126329 introduced a menuitem in the calendar module for returning to the calendar main screen. However, we already had this menuitem in appointment, so it was showing two "Calendar" menuitems when appointment was installed. This commit removes the menuitem from appointment as it is already present in the calendar module.
This update fixes missed translation label changes so text can continue to display correctly across languages. It is a small cleanup that helps maintain consistent localization behavior in the Planning area.
Original PR description
Related to previous commit c07181b20bf4f06b783136ffdb3b7a304be6b136, this commit fixed missed remplacments of this.env._t by _t. Community : https://github.com/odoo/odoo/pull/133503
Miscellaneous changes
Oops ! Forward-Port-Of: odoo/enterprise#46449
Original PR description
Oops ! Forward-Port-Of: odoo/enterprise#46449
Currently the Barcode App tab in picking.type show for all picking types, but it doesn't make sense for the newly added Dropship picking type code (as of saas-16.2 odoo/odoo#109511, before that we have no way of hiding it for this picking type) and any other picking types that aren't accessible in the barcode app (i.e. as of saas-16.4 for Repair picking type odoo/odoo#106911 and manufacturing until saas-16.4) Therefore let's hide it. Note that additional logic is needed in saas-16.4 onwards s
Original PR description
Currently the Barcode App tab in picking.type show for all picking types, but it doesn't make sense for the newly added Dropship picking type code (as of saas-16.2 odoo/odoo#109511, before that we have no way of hiding it for this picking type) and any other picking types that aren't accessible in the barcode app (i.e. as of saas-16.4 for Repair picking type odoo/odoo#106911 and manufacturing until saas-16.4) Therefore let's hide it. Note that additional logic is needed in saas-16.4 onwards so that the setting shows for mrp (i.e. when mrp barcode feature was added) Task: 3441559 Forward-Port-Of: odoo/enterprise#45568
In commit https://github.com/odoo/odoo/commit/d832fcf0cebbbf6b4720ba9a2dcb0aa1cd34030c, the `many2one_avatar_user` widget has been added in various places, sometimes repeating the avatar where it isn't needed. Some occurrences come next to the avatar's name which is called via a `t-esc`, but the option `display_avatar_name` is available and has been used instead. task-3470340 part of task-3326263 Community PR: https://github.com/odoo/odoo/pull/132244 Forward-Port-Of: odoo/enterprise#4
Original PR description
In commit https://github.com/odoo/odoo/commit/d832fcf0cebbbf6b4720ba9a2dcb0aa1cd34030c, the `many2one_avatar_user` widget has been added in various places, sometimes repeating the avatar where it isn't needed. Some occurrences come next to the avatar's name which is called via a `t-esc`, but the option `display_avatar_name` is available and has been used instead. task-3470340 part of task-3326263 Community PR: https://github.com/odoo/odoo/pull/132244 Forward-Port-Of: odoo/enterprise#45917
…unit of recurrence Before this commit, the time unit would always be displayed in lowercase. It is incompatible with some languages like german. task id: 3470210 Forward-Port-Of: odoo/enterprise#46467 Forward-Port-Of: odoo/enterprise#45948
Original PR description
…unit of recurrence Before this commit, the time unit would always be displayed in lowercase. It is incompatible with some languages like german. task id: 3470210 Forward-Port-Of: odoo/enterprise#46467 Forward-Port-Of: odoo/enterprise#45948
## Issue Clicking on "Reconcile X items" from the main dashboard in our internal database can take upward to a minute to open the view. ## Analysis When we are preparing the auto balance lines, we are retrieving the partner_id, which is a compute calling `_retrieve_partner`. If we didn't find a partner from the statement line or the bank account, we are searching for the partner based on his name. This domain uses an `ilike`, which would benefit from the presence of a trigram index on said
Original PR description
## Issue Clicking on "Reconcile X items" from the main dashboard in our internal database can take upward to a minute to open the view. ## Analysis When we are preparing the auto balance lines, we…
## Issue
Clicking on "Reconcile X items" from the main dashboard in our internal database can take upward to a minute to open the view.
## Analysis
When we are preparing the auto balance lines, we are retrieving the partner_id, which is a compute calling `_retrieve_partner`. If we didn't find a partner from the statement line or the bank account, we are searching for the partner based on his name. This domain uses an `ilike`, which would benefit from the presence of a trigram index on said field. Sadly this is not the case on our production database, but we have already an index on `display_name`, as it's already a search criteria in the `_rec_names_search` of the `res.partner` model. Adding another trigram index on `name` would be too heavy as the table is already really large, and `display_name` contains `name`, and in this use-case, they are most likely equal, as the partner we are looking for don't have a parent.
## Solution
Change the domain criteria to be based on the `display_name` instead of the `name`.
## Results
On our test database, the search
```py
self.env['res.partner'].search([
(X, '=', 'some_partner_name'),
('company_id', '=', False),
('parent_id', '=', False)],
limit=1)
```
takes:
- *Before* (X = `'name'`): we were hitting an unrelated index (a btree index on display_name + id) and then filtering based on the name. This was churning through 48GB of data, and taking in the ballpark of **19s** to complete
- *After* (X = `'display_name'`): we are hitting the trigram index first, then sorting on the result row instead, only taking **360ms**.
A **50x** speed improvement.
## Reference
task-3479202
Forward-Port-Of: odoo/enterprise#46448
Forward-Port-Of: odoo/enterprise#46338Improve the date and comparison filter and replace float with flex. Forward-Port-Of: odoo/enterprise#45063
Original PR description
Improve the date and comparison filter and replace float with flex. Forward-Port-Of: odoo/enterprise#45063
Impacted Version: - 16.4 and above This commit improve below features: - Change "Tax Report" to "BAS Report" task-3419980 Forward-Port-Of: odoo/enterprise#45757
Original PR description
Impacted Version: - 16.4 and above This commit improve below features: - Change "Tax Report" to "BAS Report" task-3419980 Forward-Port-Of: odoo/enterprise#45757
The Error is generated when the `_sync_pickings()` method is executed for the cron job` Amazon: sync delivery orders`. It is because the value of `partner_id (location_)` here is False. https://github.com/odoo/enterprise/blob/32a838252a93e180293f30b34447d21f21f1041e/sale_amazon/models/stock_picking.py#L236 link to the PR from where the issue is generated: [#29378](https://github.com/odoo/enterprise/pull/29378/files#diff-36fff3c417ab5ebfcd2ce305afdd6c84ba8af4c577c1475a581effda06764272R236)
Original PR description
The Error is generated when the `_sync_pickings()` method is executed for the cron job` Amazon: sync delivery orders`. It is because the value of `partner_id (location_)` here is False.…
The Error is generated when the `_sync_pickings()` method is executed
for the cron job` Amazon: sync delivery orders`. It is because the value of
`partner_id (location_)` here is False.
https://github.com/odoo/enterprise/blob/32a838252a93e180293f30b34447d21f21f1041e/sale_amazon/models/stock_picking.py#L236
link to the PR from where the issue is generated: [#29378](https://github.com/odoo/enterprise/pull/29378/files#diff-36fff3c417ab5ebfcd2ce305afdd6c84ba8af4c577c1475a581effda06764272R236)
traceback:
```
TypeError: 'bool' object is not subscriptable
File "odoo/tools/safe_eval.py", line 362, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(821,)", line 1, in <module>
File "home/odoo/src/enterprise/saas-16.3/sale_amazon/models/stock_picking.py", line 165, in _sync_pickings
pickings._confirm_shipment(account)
File "home/odoo/src/enterprise/saas-16.3/sale_amazon/models/stock_picking.py", line 243, in _confirm_shipment
xml_feed = amazon_utils.build_feed(account, 'OrderFulfillment', build_feed_messages)
File "home/odoo/src/enterprise/saas-16.3/sale_amazon/utils.py", line 369, in build_feed
messages_builder(root, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.3/sale_amazon/models/stock_picking.py", line 238, in build_feed_messages
ElementTree.SubElement(ship_from_, 'Name').text = location_.name[:30]
ValueError: <class 'TypeError'>: "'bool' object is not subscriptable" while evaluating
'model._sync_pickings()'
File "odoo/addons/base/models/ir_cron.py", line 373, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "odoo/addons/base/models/ir_actions.py", line 702, in run
res = runner(run_self, eval_context=eval_context)
File "addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "odoo/addons/base/models/ir_actions.py", line 559, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "odoo/tools/safe_eval.py", line 376, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
```
This commit solves the issue by providing the current company location when
the warehouse does not have a location.
sentry-4369020199
Forward-Port-Of: odoo/enterprise#45360