Thursday, October 8, 2020
26 changes · master
Enhancements to existing features
Odoo now checks for missing access rules after each module is installed or upgraded, rather than only at the end of a full installation. This helps catch setup issues earlier when modules are installed individually, reducing the chance of missed configuration problems.
Original PR description
Since e1a5ed51dbb9417b357db14eff8ca22400a2e10f, missing ir_model_access are warned at the end of an install. Unfortunately, it is still possible that a module add a model and another module add the corresponding ir_model_access. Since runbot install all module at once, this won't be spot until a single module build is ran when each module is installed independently. This commit proposes to move the check at the end of each module. Note that the log may be repeated multiple times if multiple modules redefine this model. Note that the log will only occur on install and upgrade, not basic registry loading. Linked to #59193
Resolved issues and error corrections
Website menu buttons now use the configured button font consistently, even when it matches the main text font. This makes header and mega menu styling more predictable for users customizing their website design, with a small possible change to plain text font styling inside navigation areas.
Original PR description
Since 13.0, the website menu can contain text and buttons through mega menus, which created inconsistencies on the way the "navbar font" configuration works. Indeed, when setting the "button font", navbar buttons were updated too... except if that "button font" was equal to the "text font", in that case those buttons used the "navbar font", so not logical at all. This commit solves the problem by only using the navbar font to style bootstrap nav links, which is the common content of mega menu snippets anyway but this has a side-effect: text-in-navbar font may change from navbar font to text font which is acceptable as the 14.0 was released very recently. Sorry for the inconvenience if any, but it felt important to fix the problem that way for the new static content of header templates. X-original-commit: 31bfb5075063070d24a607ed47da6bdd8207aa5a
Code cleanup and technical improvements
This update removes outdated graph report settings and aligns related views with the supported configuration. It is an internal cleanup that helps keep reporting views reliable and easier to maintain, with little expected impact on daily users.
Documentation and clarification updates
This pull request updates the corporate contributor agreement record for Therp BV. It keeps Odoo's legal contribution documentation current and does not affect product features or users.
Original PR description
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
Miscellaneous changes
Steps to reproduce the bug: - Install Belgian accounting - Switch to the Belgian company - Activate Sales -> Settings -> Pricing -> Discounts - Create a sale order with a discount - Confirm the sale order - Add the delivered quantity - Click "Create Invoice" and then "Create and View Invoice" - Confirm the invoice Bug: Traceback: Error to render compiling AST TypeError: 'NoneType' object is not callable Template: account_edi_ubl.export_ubl_invoice_line Path: /t/cac:InvoiceLine/
Original PR description
Steps to reproduce the bug: - Install Belgian accounting - Switch to the Belgian company - Activate Sales -> Settings -> Pricing -> Discounts - Create a sale order with a discount - Confirm the sale order - Add the delivered quantity - Click "Create Invoice" and then "Create and View Invoice" - Confirm the invoice Bug: Traceback: Error to render compiling AST TypeError: 'NoneType' object is not callable Template: account_edi_ubl.export_ubl_invoice_line Path: /t/cac:InvoiceLine/cbc:Note opw:2355296 Forward-Port-Of: odoo/odoo#59433
The Duration Per Unit should be averaged, not summed. opw-2353041 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#59403
Original PR description
The Duration Per Unit should be averaged, not summed. opw-2353041 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#59403
[FIX] im_livechat: fix traceback when clicking on create button Before this commit: When trying to create a record in the live chat it shows traceback. because the record.id is an object but it requires an integer value. After this commit: No traceback while clicking on the create button. Explanation: Following commit 488e334fc8fd6601e304635fa577c98b9bfd18e6 `onchange` methods must handle being called on new record. Task-2347091 opw-2350463 Forward-Port-Of: odoo/odoo#592
Original PR description
[FIX] im_livechat: fix traceback when clicking on create button Before this commit: When trying to create a record in the live chat it shows traceback. because the record.id is an object but it requires an integer value. After this commit: No traceback while clicking on the create button. Explanation: Following commit 488e334fc8fd6601e304635fa577c98b9bfd18e6 `onchange` methods must handle being called on new record. Task-2347091 opw-2350463 Forward-Port-Of: odoo/odoo#59229
Hide the add images button of the gallery snippet when not in edit mode. task-2312878 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#59330 Forward-Port-Of: odoo/odoo#57257
Original PR description
Hide the add images button of the gallery snippet when not in edit mode. task-2312878 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#59330 Forward-Port-Of: odoo/odoo#57257
Forward-Port-Of: odoo/odoo#59458
Original PR description
Forward-Port-Of: odoo/odoo#59458
Issue - Install "Point of sale" - Create a new one and edit it. - Activate the "Is a Bar/Restaurant" feature and save - Activate the "Bill Printing" feature then save - Start a new session - Add a product A - Click on "Bill" then "Print" - Then click on "Ok" to go back to order - Add a product B Error is raised ("Cannot read property 'add_product' of null"). Cause Trying to add a product to an order who is destroyed if the bill has been printed. Solution I
Original PR description
Issue
- Install "Point of sale"
- Create a new one and edit it.
- Activate the "Is a Bar/Restaurant" feature and save
- Activate the "Bill Printing" feature then save
- Start a new session
- Add a product A
- Click on "Bill" then "Print"
- Then click on "Ok" to go back to order
- Add a product B
Error is raised ("Cannot read property 'add_product' of null").
Cause
Trying to add a product to an order who is destroyed
if the bill has been printed.
Solution
If the bill is printed (and not the receipt), set '_printed' of
the current order to 'false', therefore it will add the product
to the current order.
opw-2341115
Forward-Port-Of: odoo/odoo#59415
Forward-Port-Of: odoo/odoo#59353message_seen_indicator model doesn't have a field threadId, it use channelId. channelId is required since it's use inside the _createRecordLocalId function. Forward-Port-Of: odoo/odoo#59464
Original PR description
message_seen_indicator model doesn't have a field threadId, it use channelId. channelId is required since it's use inside the _createRecordLocalId function. Forward-Port-Of: odoo/odoo#59464
On a fresh Linux Mint installation, the libraries used by Pillow and psycopg2 are not installed. This update the list of dependencies so users don't have to dig through Pillow/psycopg2 documentations in order to find and install the missing dependencies. See also #59368 Forward-Port-Of: odoo/odoo#59429
Original PR description
On a fresh Linux Mint installation, the libraries used by Pillow and psycopg2 are not installed. This update the list of dependencies so users don't have to dig through Pillow/psycopg2 documentations in order to find and install the missing dependencies. See also #59368 Forward-Port-Of: odoo/odoo#59429
Behavior before the fix: Uploading a grayscale image with transparency in the company logo field of the document layout causes a crash: ``` File "/data/build/odoo/addons/web/models/base_document_layout.py", line 89, in _compute_logo_colors wizard.logo_primary_color, wizard.logo_secondary_color = wizard_for_image._parse_logo_colors() File "/data/build/odoo/addons/web/models/base_document_layout.py", line 191, in _parse_logo_colors color[1][2] > white_threshold) and color[1]
Original PR description
Behavior before the fix: Uploading a grayscale image with transparency in the company logo field of the document layout causes a crash: ``` File…
Behavior before the fix:
Uploading a grayscale image with transparency in the company logo field
of the document layout causes a crash:
```
File "/data/build/odoo/addons/web/models/base_document_layout.py", line 89, in _compute_logo_colors
wizard.logo_primary_color, wizard.logo_secondary_color = wizard_for_image._parse_logo_colors()
File "/data/build/odoo/addons/web/models/base_document_layout.py", line 191, in _parse_logo_colors
color[1][2] > white_threshold) and color[1][3] > 0:
Exception
...
IndexError: tuple index out of range
```
To reproduce, use the `logo_ci.png` image included in the unit test
data and load it in the document layout (under General Settings).
The system does not detect that the image does not have color
information and attempts to read the R,G,B values (but the image only
has 2 values per pixel: the grayscale value and the alpha)
Versions affected: 13, 14
Behavior after the fix:
The image is loaded correctly (arguably, there is not a lot of interest
in detecting the primary color of a grayscale image, but the script
still returns a (gray) value which is preferrable to a traceback)
opw-2352394
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#59381
Forward-Port-Of: odoo/odoo#59275Current behavior before PR: While creating new templates it will give a traceback Desired behavior after PR is merged: While creating new templates it will not give a traceback LINKS PR https://github.com/odoo/odoo/pull/58016 Task-2334852 Forward-Port-Of: odoo/odoo#58016
Original PR description
Current behavior before PR: While creating new templates it will give a traceback Desired behavior after PR is merged: While creating new templates it will not give a traceback LINKS PR https://github.com/odoo/odoo/pull/58016 Task-2334852 Forward-Port-Of: odoo/odoo#58016
The URL to the mail extension module documentation in the settings view is currently wrong. It only works temporarily because of a redirect we setup on our website. This commit updates the URL to the proper location of the documentation. When we later support Gmail, the view will have to be updated to contain two documentation links: one to Outlook and one to Gmail. Task 2356910 Forward-Port-Of: odoo/odoo#59481
Original PR description
The URL to the mail extension module documentation in the settings view is currently wrong. It only works temporarily because of a redirect we setup on our website. This commit updates the URL to the proper location of the documentation. When we later support Gmail, the view will have to be updated to contain two documentation links: one to Outlook and one to Gmail. Task 2356910 Forward-Port-Of: odoo/odoo#59481
If you look at the tax report in https://ecdf-developer.b2g.etat.lu/ecdf/forms/popup/TVA_DECM_TYPE/2020M07/fr/1/preview you will see that 435 has to be under 409 and not under 436 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#59026 Forward-Port-Of: odoo/odoo#59007
Original PR description
If you look at the tax report in https://ecdf-developer.b2g.etat.lu/ecdf/forms/popup/TVA_DECM_TYPE/2020M07/fr/1/preview you will see that 435 has to be under 409 and not under 436 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#59026 Forward-Port-Of: odoo/odoo#59007
Steps to reproduce the bug: - Open a customer invoice I - Click on the partner P set on I - Change the contact name of P - Go to the list view of customer invoice Bug: The name of P was not updated. opw:2354492 Forward-Port-Of: odoo/odoo#59413
Original PR description
Steps to reproduce the bug: - Open a customer invoice I - Click on the partner P set on I - Change the contact name of P - Go to the list view of customer invoice Bug: The name of P was not updated. opw:2354492 Forward-Port-Of: odoo/odoo#59413
Side effect of this change: dependencies are not longer triggered when replace is not actually doing anything. task-2270780 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59437
Original PR description
Side effect of this change: dependencies are not longer triggered when replace is not actually doing anything. task-2270780 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59437
Description of the issue/feature this PR addresses: Precision digits was hardcoded to 2. Use order currency to compare amount. @mart-e -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49316
Original PR description
Description of the issue/feature this PR addresses: Precision digits was hardcoded to 2. Use order currency to compare amount. @mart-e -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49316
Restore the old signature of except_orm. opw-2354525 opw-2355980 Forward-Port-Of: odoo/odoo#59443
Original PR description
Restore the old signature of except_orm. opw-2354525 opw-2355980 Forward-Port-Of: odoo/odoo#59443
Steps to reproduce the bug: - Let's consider two pricelist PL1 and PL2 with discount_policy = 'without_discount' - Let's consider a product P - PL1 has 10% on P and PL2 has 20% discount on P - Create a quotation Q with PL1 - Add P on Q (the 10% discount is correctly applied) - Change PL1 to PL2 and click on Update pricelist Bug: The 20% discount on P was not applied. opw:2352577 Forward-Port-Of: odoo/odoo#59495
Original PR description
Steps to reproduce the bug: - Let's consider two pricelist PL1 and PL2 with discount_policy = 'without_discount' - Let's consider a product P - PL1 has 10% on P and PL2 has 20% discount on P - Create a quotation Q with PL1 - Add P on Q (the 10% discount is correctly applied) - Change PL1 to PL2 and click on Update pricelist Bug: The 20% discount on P was not applied. opw:2352577 Forward-Port-Of: odoo/odoo#59495
After commit 06a8c5264eb6e87c29ad1d23a14e12dd45aa281c it is no longer possible to pass bare modules to `safe_eval`'s context, however during the aforementioned commit only the wrapped datetime and dateutil modules were updated in ir_model's SAFE_EVAL_BASE context, thus the bare `time` module was still being passed (and this triggered a traceback whenever a custom computed field that used the time module was computed). The fix is simple: pass the wrapped time module to the `safe_eval` co
Original PR description
After commit 06a8c5264eb6e87c29ad1d23a14e12dd45aa281c it is no longer possible to pass bare modules to `safe_eval`'s context, however during the aforementioned commit only the wrapped datetime and dateutil modules were updated in ir_model's SAFE_EVAL_BASE context, thus the bare `time` module was still being passed (and this triggered a traceback whenever a custom computed field that used the time module was computed). The fix is simple: pass the wrapped time module to the `safe_eval` context instead of the bare one. This commit also introduces a regression test to verify that the passed modules actually work in custom fields. opw-2347711 Forward-Port-Of: odoo/odoo#59496
Forward-Port-Of: odoo/enterprise#13783 Forward-Port-Of: odoo/enterprise#13775
Original PR description
Forward-Port-Of: odoo/enterprise#13783 Forward-Port-Of: odoo/enterprise#13775
A scale is not of type `device` but `scale` Therefore it is unusable in a quality control point. With this commit we add the type `scale` as a measuring instrument Task: 2355027 Forward-Port-Of: odoo/enterprise#13865
Original PR description
A scale is not of type `device` but `scale` Therefore it is unusable in a quality control point. With this commit we add the type `scale` as a measuring instrument Task: 2355027 Forward-Port-Of: odoo/enterprise#13865
### Task 393 In the settings of Argentinean localization is missing the button "Test Connections" Forward-Port-Of: odoo/enterprise#13858
Original PR description
### Task 393 In the settings of Argentinean localization is missing the button "Test Connections" Forward-Port-Of: odoo/enterprise#13858
In B2B ecommerce workflow, new partner may be created without parent_id, but with company_name field. Before this commit, CompanyName value for shipping doc may be empty depending on whether Partner Company is created or not. opw-2343836 Forward-Port-Of: odoo/enterprise#13836
Original PR description
In B2B ecommerce workflow, new partner may be created without parent_id, but with company_name field. Before this commit, CompanyName value for shipping doc may be empty depending on whether Partner Company is created or not. opw-2343836 Forward-Port-Of: odoo/enterprise#13836