Friday, July 31, 2020
26 changes · master
Enhancements to existing features
This update separates test-related assets for IAP, Mail Bot, and Snailmail so they can be managed more cleanly. It supports smoother maintenance and safer upgrades by keeping testing resources organized without changing day-to-day user workflows.
Original PR description
Necessary to merge in saas-13.4: https://github.com/odoo/odoo/pull/53826
This update adds support files for testing the Approvals app, helping ensure future changes can be checked more reliably. It is an internal quality improvement and should not change day-to-day user workflows.
Original PR description
Necessary to merge in saas-13.4: https://github.com/odoo/enterprise/pull/11523
Resolved issues and error corrections
This change removes reliance on an outdated accounting test setup that was causing localization build failures. It makes automated tests more reliable across accounting, expenses, purchasing, point of sale, sales, manufacturing, and stock-related workflows, reducing false failures in delivery pipelines.
Original PR description
Miscellaneous changes
### Issue - Install Projects, Dashboard - Project > All tasks > Graph view - Add to dashboard - Refresh & go to dashboard The graph is small and it's hard to read it ### Cause We have no min-height & chartJS computes a height which is too small Already fixed in previous versions with 9214d7815267d but now the class `o_graph_svg_container` seems to be used nowhere ### Solution Change the class name & adjust height a bit **OPW-2303224** -- I confirm I
Original PR description
### Issue - Install Projects, Dashboard - Project > All tasks > Graph view - Add to dashboard - Refresh & go to dashboard The graph is small and it's hard to read it ### Cause We have no min-height & chartJS computes a height which is too small Already fixed in previous versions with 9214d7815267d but now the class `o_graph_svg_container` seems to be used nowhere ### Solution Change the class name & adjust height a bit **OPW-2303224** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#55018
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
- doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
- doesn't setup a testing user then all tests are done using the superuser.
- doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
- is run sometimes at-install.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe calendar app now handles cases where an optional scheduling helper is not installed, instead of causing an error. This improves reliability for deployments that do not include that extra dependency.
Original PR description
Don't crash if vobject python module not installed. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Tooltip help text now keeps intended line breaks, making longer guidance easier to read. This restores a previous display behavior so users can understand tooltip information more quickly.
Original PR description
The commit e69c72f93b0279402c1bfc581f69ad62c6aad0ca removed the line breaks into tooltip help text. This commit re-add them for the sake of readability.
This update removes an unreliable shared testing setup that was causing localization build failures across payroll, field service, Mexican e-invoicing, sales, and subscriptions. The tests now use more appropriate setup data, improving build stability and reducing false failures in automated validation.
Original PR description
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it: - doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates... - doesn't setup a testing user then all tests are done using the superuser. - doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc... - is run sometimes at-install.
After 9ddfc18b4132daa395c4fa1591b1c001b8fb2628 an user with recruitment/officer (user) permission on hr_recruitment could not create applications anymore because doing so imply a write to hr.recruitment.stage opw-2305646 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#55207
Original PR description
After 9ddfc18b4132daa395c4fa1591b1c001b8fb2628 an user with recruitment/officer (user) permission on hr_recruitment could not create applications anymore because doing so imply a write to hr.recruitment.stage opw-2305646 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#55207
- Set the following access rights to a user A: Point of Sale: User Invoicing: Billing Inventory: User - Create a product P, FIFO + Automated - Add some stock for P - As user A, open the POS - Sell one unit of P - Close the POS and validate entries An access error is raised because the user doesn't have the right to read the `stock.valuation.layer` object. We can retreive the value as `sudo` in this case. opw-2305446 Description of the issue/feature this PR addresses:
Original PR description
- Set the following access rights to a user A: Point of Sale: User Invoicing: Billing Inventory: User - Create a product P, FIFO + Automated - Add some stock for P - As user A, open the POS - Sell one unit of P - Close the POS and validate entries An access error is raised because the user doesn't have the right to read the `stock.valuation.layer` object. We can retreive the value as `sudo` in this case. opw-2305446 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#55201
Forward-Port-Of: odoo/odoo#55067 Forward-Port-Of: odoo/odoo#54824
Original PR description
Forward-Port-Of: odoo/odoo#55067 Forward-Port-Of: odoo/odoo#54824
Create a mail alias with non-ascii characters like 'foß', send an email from your personal email account to that alias. The delivery fails because Odoo SA servers don't support the SMTPUTF8 extension which is required to parse the local-part ("display" <local-part@domain>) part of a From header. While external providers may create international, very weird, emails and we should support receiving/sending emails from/to them. Our policy is to only create very basic email addresses. That i
Original PR description
Create a mail alias with non-ascii characters like 'foß', send an
email from your personal email account to that alias. The delivery fails
because Odoo SA servers don't support the SMTPUTF8 extension which is
required to parse the local-part ("display" <local-part@domain>) part of
a From header.
While external providers may create international, very weird, emails
and we should support receiving/sending emails from/to them. Our policy
is to only create very basic email addresses. That is all ASCII,
letters, digits and a limited set of punctuation characters.
Restricting what aliases can be created, we ensure no advanced extension
should be enabled on SMTP servers.
opw-2293336
Closes #53403
Forward-Port-Of: odoo/odoo#55134
Forward-Port-Of: odoo/odoo#54224- store `x2many` values as `Set`. This is conceptually more correct because duplicates were already not allowed, and using a `Set` allows for much faster operations such as checking the presence of a record in the relation, which is done at every write, for every linked record. - `stringify` in `write` was slow and unnecessary because we can always assume that new non-primitive should be provided to `write` - remove field values from store, in favor of just storing a counter, w
Original PR description
- store `x2many` values as `Set`. This is conceptually more correct because duplicates were already not allowed, and using a `Set` allows for much faster operations such as checking the presence of a…
- store `x2many` values as `Set`. This is conceptually more correct because duplicates were already not allowed, and using a `Set` allows for much faster operations such as checking the presence of a record in the relation, which is done at every write, for every linked record. - `stringify` in `write` was slow and unnecessary because we can always assume that new non-primitive should be provided to `write` - remove field values from store, in favor of just storing a counter, which is enough to trigger renders. This allows to get rid of one Proxy level around data, which was slower, but which also prevented from using `Set`. - write in store exactly once per update cycle, to trigger one `useStore` call on each component. Records keep `__state` but as a local counter, to let `useStore` know which records have been updated (easier to compare a counter than comparing each and every field value). Results ======= The worse case test (using a lot of x2m) that was used to benchmark this PR `form_renderer_tests.js` of `mail_enterprise` went from taking around 4s before this commit, to around 2.5s after this commit. And the worse `_setRelationLinkMany2Many` previously took around 250ms, and it now takes around 50ms. The whole `mail` QUnit suite took around 55s before, now around 42s. Part of task-2308312 Forward-Port-Of: odoo/odoo#55108
Wrong use of self.batch_id in an api.model method. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54675
Original PR description
Wrong use of self.batch_id in an api.model method. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54675
Fix small layout issues: - On the scale screen, the product and computed prices were too large and not displayed correctly, hiding part of the Order button. - The icon in the proxy status was not displayed next to the text but on the next line, partly hidden. - The proxy status takes too much space on small devices, we hide the text and show only the icon on mobile. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of:
Original PR description
Fix small layout issues: - On the scale screen, the product and computed prices were too large and not displayed correctly, hiding part of the Order button. - The icon in the proxy status was not displayed next to the text but on the next line, partly hidden. - The proxy status takes too much space on small devices, we hide the text and show only the icon on mobile. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54474
### Description of the issue/feature this PR addresses: Only compute l10n_ar_vat when this one is defined, if not then the field should not be computed as it is This will let us to avoid an error when clicking the Generate Resquest button when the vat is not defined. Steps to reproduce: 1. Create a new company 2. Install chart of account Responsable Inscripto 3. Define the city in the company (important leave the vat field empty) 4. Go to Accounting Settings and click in 'Generate R
Original PR description
### Description of the issue/feature this PR addresses: Only compute l10n_ar_vat when this one is defined, if not then the field should not be computed as it is This will let us to avoid an error…
### Description of the issue/feature this PR addresses:
Only compute l10n_ar_vat when this one is defined, if not then the field should not be computed as it is
This will let us to avoid an error when clicking the Generate Resquest button when the vat is not defined.
Steps to reproduce:
1. Create a new company
2. Install chart of account Responsable Inscripto
3. Define the city in the company (important leave the vat field empty)
4. Go to Accounting Settings and click in 'Generate Request' button
### Current behavior before PR:
```sh
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/fields.py", line 1002, in __get__
value = env.cache.get(record, self)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/api.py", line 751, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('res.partner(92,).l10n_ar_vat', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/stdnum/util.py", line 170, in clean
number = ''.join(x for x in number)
TypeError: 'bool' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 915, in __call__
return self.method(*args, **kw)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/home/odoo/custom/repositories/odoo/addons/web/controllers/main.py", line 1326, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/custom/repositories/odoo/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/custom/repositories/enterprise/l10n_ar_edi/models/res_config_settings.py", line 32, in l10n_ar_action_create_certificate_request
if not self.company_id.partner_id.l10n_ar_vat:
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/fields.py", line 1026, in __get__
self.compute_value(recs)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/fields.py", line 1111, in compute_value
records._compute_field_value(self)
File "/home/odoo/.local/lib/python3.7/site-packages/odoo/models.py", line 3915, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/custom/repositories/odoo/addons/l10n_ar/models/res_partner.py", line 55, in _compute_l10n_ar_vat
rec.l10n_ar_vat = stdnum.ar.cuit.compact(rec.vat)
File "/usr/local/lib/python3.7/site-packages/stdnum/ar/cuit.py", line 51, in compact
return clean(number, ' -').strip()
File "/usr/local/lib/python3.7/site-packages/stdnum/util.py", line 172, in clean
raise InvalidFormat()
stdnum.exceptions.InvalidFormat: The number has an invalid format.
```
### Desired behavior after PR is merged:
After this change now will show the proper error message, the expected one requesting to the user to add the vat number first.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#55064Part of task-2308312 Forward-Port-Of: odoo/odoo#55261
Original PR description
Part of task-2308312 Forward-Port-Of: odoo/odoo#55261
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS Event flow * improve (and fix) default email templates. Notably fix broken j
Original PR description
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff.…
RATIONALE
Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.
PURPOSE
Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.
SPECIFICATIONS
Event flow
* improve (and fix) default email templates. Notably fix broken jinja code
and reorganize email content;
* tweak some views to help sub modules inheritance;
* improve backend views of event / registration / tickets to ease daily use
of event application;
Website
* support add_direction in duration qweb widget
Website Event
* allow to give a placeholder to website search box;
* improve frontend page to ease registration flow: better introduction page,
fix mobile issues when taking registrations, slightly improve 'all events'
page;
See sub commits for more details.
MIGRATION / UPDATE
Records (mail templates)
* event.event_subscription
* event.event_reminder
Views
* event.event_tag_view_form
* event.view_event_form
* event.view_event_registration_tree
* event.event_event_ticket_view_tree_from_event
* event.view_event_type_form
* event_sale.view_event_registration_ticket_tree
* website_event.event_type_view_form_inherit_website
* website_event_track.event_sponsor_view_search
* website_event_track.event_sponsor_view_form
* website_event_track.event_sponsor_view_tree
* website_event_track.event_type_view_form_inherit_track
* website_event_track.view_event_form
Actions
* website_event_track.event_sponsor_action_from_event
Templates
* website_event.index_topbar
* website_event.events_list
* website_event.event_description_full
* website_event.registration_template
* website_event.registration_complete
* website_event.template_intro
* website_event_track.agenda
* website_event_track.event_track_proposal
LINKS
Community PR #55197
Enterprise PR odoo/enterprise#12113
Task ID-2287372 (Fix Twitter Wall)
Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
Prepares Task ID-2291344 (Integrate Twitter Wall)
Forward-Port-Of: odoo/odoo#55219
Forward-Port-Of: odoo/odoo#55197- The HR staff may not be able to accept/refuse/cancel leaves if the module `project_timesheet_holidays` is installed. This is due to the commit c9da1571498ad1ded6b16d1483b8cb084d71f9de introducing a manual check on the current user's group without checking if the current environment is in superuser mode. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54501
Original PR description
- The HR staff may not be able to accept/refuse/cancel leaves if the module `project_timesheet_holidays` is installed. This is due to the commit c9da1571498ad1ded6b16d1483b8cb084d71f9de introducing a manual check on the current user's group without checking if the current environment is in superuser mode. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54501
task-2282380 Forward-Port-Of: odoo/odoo#55149
Original PR description
task-2282380 Forward-Port-Of: odoo/odoo#55149
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in event track views, adding demo data and easing event menu page management and inheritance. SPECIFICATIONS Improve track views in website_event_track: add missing informations for event users daily use of tracks. Ease overr
Original PR description
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff.…
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in event track views, adding demo data and easing event menu page management and inheritance. SPECIFICATIONS Improve track views in website_event_track: add missing informations for event users daily use of tracks. Ease override / inheritance of registration page rendering values to be able to tweak those pages in inheriting modules. Improve demo data, especially track-related demo data: more tracks, better datetimes, titles, tags, ... in order to have at least one event that looks like a real event.. Refactor and improve code about event menu management. Purpose is to ease inheritance and be able to add menus and pages with less custom code in sub modules. See sub commits for more details. LINKS PR #55260 Task ID-2310491 (Event Online Preparation 5) Part of Task ID-2252655 (Main Online Event task) Part of Task ID-2283796 (Event B2Basics / Registration Flow) Forward-Port-Of: odoo/odoo#55273 Forward-Port-Of: odoo/odoo#55260
Description of the issue/feature this PR addresses: In V12 when you select a purchase order in vendor bill, the onchange add purchase ref after the existing ref (generally the bill number). In V13 this behaviour have removed. @qdp-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52222
Original PR description
Description of the issue/feature this PR addresses: In V12 when you select a purchase order in vendor bill, the onchange add purchase ref after the existing ref (generally the bill number). In V13 this behaviour have removed. @qdp-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52222
Track menu was not appearing since 69d2513de21c2e80de605f77912a3687b8a79c6d due to agenda messing with standard track menu entry. Agenda is not dynamically build like track and should not have its menu type. Forward-Port-Of: odoo/odoo#55280
Original PR description
Track menu was not appearing since 69d2513de21c2e80de605f77912a3687b8a79c6d due to agenda messing with standard track menu entry. Agenda is not dynamically build like track and should not have its menu type. Forward-Port-Of: odoo/odoo#55280
- The HR staff may not be able to accept/refuse/cancel leaves if the module `project_timesheet_holidays` is installed. This is due to the commit 8aa35dc0c7bf2e5492216d9f67b7ccd087c40942 introducing a manual check on the current user's group without checking if the current environment is in superuser mode. Forward-Port-Of: odoo/enterprise#11867
Original PR description
- The HR staff may not be able to accept/refuse/cancel leaves if the module `project_timesheet_holidays` is installed. This is due to the commit 8aa35dc0c7bf2e5492216d9f67b7ccd087c40942 introducing a manual check on the current user's group without checking if the current environment is in superuser mode. Forward-Port-Of: odoo/enterprise#11867
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS Fix Twitter Wall, currently not working at all. Improve event backend views
Original PR description
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS Fix Twitter Wall, currently not working at all. Improve event backend views to help user daily work. See sub commits for more details. LINKS Community PR odoo/odoo#55197 Enterprise PR #12113 Task ID-2287372 (Fix Twitter Wall) Task ID-2309702 (Event Preparatory Merge 4) Prepares Task ID-2283796 (Event B2Basics / Registration Flow) Prepares Task ID-2299857 (Event Design Review) Prepares Task ID-2252655 (Main Online Event task) Prepares Task ID-2291344 (Integrate Twitter Wall) Forward-Port-Of: odoo/enterprise#12125 Forward-Port-Of: odoo/enterprise#12113
'post' has been renamed to 'action_post'. Forward-Port-Of: odoo/enterprise#12139
Original PR description
'post' has been renamed to 'action_post'. Forward-Port-Of: odoo/enterprise#12139
Issue - Install Documents - Create an user with a long name - Log in with this new user - Documents > upload anything - Share your upload - Access to the share link Cards author's name is overflowing Cause Since user has no image, the alt text is shown. The actual cards design do not handle that case. Solution Show a placeholder when there is no image. OPW-2292193 Forward-Port-Of: odoo/ent
Original PR description
Issue
- Install Documents
- Create an user with a long name
- Log in with this new user
- Documents > upload anything
- Share your upload
- Access to the share link
Cards author's name is overflowing
Cause
Since user has no image, the alt text is shown.
The actual cards design do not handle that case.
Solution
Show a placeholder when there is no image.
OPW-2292193
Forward-Port-Of: odoo/enterprise#12024
Forward-Port-Of: odoo/enterprise#12003