12dc06ebef180ae71cc2c50f86b6b1db70e6cd39
Currently, when searching a partner through a related record using
`sudo()`, the superuser privileges are used when searching the record,
but not when searching the related partner. That's because the su flag
is lost during the call to with_user, even if it was to keep the same
user.
For instance, a code like the following wouldn't work if the current
user has no enough rights (e.g. the public user):
self.sudo().search([('partner_id', 'ilike', 'John Doe')])
To solve the above, the with_user is called only when a specific
name_get_uid is given, as done in the _search implementation.
closes odoo/odoo#97920
X-original-commit: e5e12681437ae562517cc058e4ce0fab90cd0ae7
Signed-off-by: Raphael Collet <rco@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%