Monday, June 7, 2021
26 changes · master
New functionality added to Odoo
This update adds ownership rules so the right maintainers are automatically involved when payment or sales-related files change. It helps speed up reviews and ensures business-critical areas get attention from the appropriate teams.
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
Sales order notes now use the system’s standard base website address when creating links. This makes those links more consistent and reliable across different deployment setups, reducing the chance of customers or staff receiving incorrect URLs.
Original PR description
Forward-port of #71623
Resolved issues and error corrections
This fixes an issue where Time Off email subjects could show extra or unreadable characters when leave dates were included. The date separator is changed to a simple slash so email subjects display clearly for users.
Original PR description
Currently, In TimeOff module If we schedule activity for Leave to Defer In the subject of email we see some extra string before arrow that is because of whitespace before the arrow. In these commit we remove the extra string by removing the leading whitespace. **Task Id: 2501374** 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
move the lead mining section to the top right as we now have more space after the removal of the outlook plugin settings Task-2531032 Forward-Port-Of: odoo/odoo#71515
Original PR description
move the lead mining section to the top right as we now have more space after the removal of the outlook plugin settings Task-2531032 Forward-Port-Of: odoo/odoo#71515
The Belgian point-of-sale compliance reporting endpoint now automatically includes the relevant module files instead of relying on a manually maintained list. This prevents missing or outdated files from affecting the generated report and keeps the process more reliable as the product changes.
Original PR description
While working on odoo/odoo#68072, found out that the `/fdm_source` endpoint is broken: some of the listed files have been removed, and many new files are missing. Convert endpoint to autodiscovery in the two relevant modules instead of a hardcoded list. Enumerated paths are sorted in basic lexicographic order so the hashing should be somewhat coherent, not change based on the FS's iteration details.
Description of the issue/feature this PR addresses: When extending utm.mixin with a field which is not relational, the link_tracker fails to generate the URL. Current behavior before PR: addons/utm/models/utm_mixin.py doesn't assume the type of tracking fields, but link tracker does. So when a field of type char is added to the list, we have an error only in link_tracker. Link to related issue: https://www.odoo.com/my/task/2494686 Desired behavior after PR is merged: Handle fields of t
Original PR description
Description of the issue/feature this PR addresses: When extending utm.mixin with a field which is not relational, the link_tracker fails to generate the URL. Current behavior before PR: addons/utm/models/utm_mixin.py doesn't assume the type of tracking fields, but link tracker does. So when a field of type char is added to the list, we have an error only in link_tracker. Link to related issue: https://www.odoo.com/my/task/2494686 Desired behavior after PR is merged: Handle fields of type char in utm.mixin model by link_tracker. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#69859
*Description of the issue/feature this PR addresses:* The PR addresses a small bug with the phone filter of the CRM kanban view. *Current behavior before PR:* The function removes the first occurrence of "00" and "+" from the given phone number if it starts with "+" or "00". As a result, the generated pattern can be wrong and return unintended results if the given phone number starts with "+" and contains two successive "0" (e.g: "+32485001122"). *Desired behavior after PR is merged:* T
Original PR description
*Description of the issue/feature this PR addresses:* The PR addresses a small bug with the phone filter of the CRM kanban view. *Current behavior before PR:* The function removes the first occurrence of "00" and "+" from the given phone number if it starts with "+" or "00". As a result, the generated pattern can be wrong and return unintended results if the given phone number starts with "+" and contains two successive "0" (e.g: "+32485001122"). *Desired behavior after PR is merged:* The function will no longer remove the first occurrence of "00" when the give phone number starts with "+". Task id: 2479277 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#70331 Forward-Port-Of: odoo/odoo#69729
Before this commit, when the start datetime of base_event_id in recurrences was not set, a traceback would occurs when trying to notify the user. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71670
Original PR description
Before this commit, when the start datetime of base_event_id in recurrences was not set, a traceback would occurs when trying to notify the user. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71670
Since the computation of employees work intervals is done in batch, i.e. 1 call to `resource.calendar._work_intervals` for each (tz, resource_calendar_id) pairs, removing tz duplicates from mapped results improves the perf of hr_presence_state/hr_icon_display computations. This is especially true for grouped hr.employee kanban view as each column search_read triggers a recompute for these fields. ##### Some speedup data ###### Client DB, 3851 active employees, 6 tz, 52 resource_calendar
Original PR description
Since the computation of employees work intervals is done in batch, i.e. 1 call to `resource.calendar._work_intervals` for each (tz, resource_calendar_id) pairs, removing tz duplicates from mapped…
Since the computation of employees work intervals is done in batch, i.e. 1 call to `resource.calendar._work_intervals` for each (tz, resource_calendar_id) pairs, removing tz duplicates from mapped results improves the perf of hr_presence_state/hr_icon_display computations. This is especially true for grouped hr.employee kanban view as each column search_read triggers a recompute for these fields. ##### Some speedup data ###### Client DB, 3851 active employees, 6 tz, 52 resource_calendar, Employee Kanban grouped by country, search_read time averaged on kanban columns | Before PR | After PR | |:--------------:|:-----------:| |400ms | 180ms | ###### _get_employee_working_now avg time by employees with 6tz, 52 resource_calendar | Employees | Before PR | After PR | |:---------------:|:-------------:|:------------:| |1 | 0.01s | 0.01s | |10 | 0.12s | 0.035s | |100 | 4.15s | 0.1s | |500 | 37s | 0.2s | |1000 | 2m17s | 0.32s | ###### _get_employee_working_now avg time by distinct tz with 500 employees | tz | Before PR | After PR| |:--:|:--------------:|:-----------:| |10| 8.59s | 0.26s | |50| 3.37s | 0.41s | |100| 2.53s | 0.58s | |500| 1.71s | 1.71s | -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71566
PURPOSE Replace text fields by html ones now that our own html editor has been merged. Indeed it gives more options to users in the way they format their content without weighting too much on the UI as tools appear on demand and not by default. SPECIFICATIONS Convert a lot of text fields to Html fields as we have our own OdooEditor. In some modules code adaptation will be necessary to handle html / plaintext conversion when required. See individual commits per main application s
Original PR description
PURPOSE Replace text fields by html ones now that our own html editor has been merged. Indeed it gives more options to users in the way they format their content without weighting too much on the UI as tools appear on demand and not by default. SPECIFICATIONS Convert a lot of text fields to Html fields as we have our own OdooEditor. In some modules code adaptation will be necessary to handle html / plaintext conversion when required. See individual commits per main application scope for more details. LINKS Task ID-2499504 Forward-Port-Of: odoo/odoo#70663
Steps to reproduce the bug: - Let's consider that Reservation = manual (Inventory>Configuration) - Let's consider two interna users I1 and I2 with the following access rights: -Sales: own document only -Inventory: user - Login as I1 : Create sale order SO1 to sell a storable product P - Confirm SO1 to create delivery order DO1 - SO1's Sales Person should be assigned to I1 and DO1's status should be "waiting" - Login as I2 : Create sale order SO2 to sell P - Confirm SO2 to create
Original PR description
Steps to reproduce the bug: - Let's consider that Reservation = manual (Inventory>Configuration) - Let's consider two interna users I1 and I2 with the following access rights: -Sales: own document only -Inventory: user - Login as I1 : Create sale order SO1 to sell a storable product P - Confirm SO1 to create delivery order DO1 - SO1's Sales Person should be assigned to I1 and DO1's status should be "waiting" - Login as I2 : Create sale order SO2 to sell P - Confirm SO2 to create delivery order DO2 - SO2's Sales Person should be assigned to I2 and DO2's status should be "waiting" Bug: When I1 or I2 tried to access DO1 or DO2, an access error was raised due to personal order line record rule opw:2530101 Forward-Port-Of: odoo/odoo#71563
task-2491890 Original PR: https://github.com/odoo/odoo/pull/68336 Forward-Port-Of: odoo/odoo#71699 Forward-Port-Of: odoo/odoo#71665
Original PR description
task-2491890 Original PR: https://github.com/odoo/odoo/pull/68336 Forward-Port-Of: odoo/odoo#71699 Forward-Port-Of: odoo/odoo#71665
**Description of the issue/feature this PR addresses:** Before this commit, when you create a lead from livechat with the command /lead, the public user is used inside the lead. Because the public user is archived, and self.env.ref('base.public_partner').user_ids return an empty recordset. Exemple on runbot : https://7653413-14-0-all.runbot63.odoo.com/web?debug=1#cids=1&id=47&menu_id=400&model=crm.lead&view_type=form @tde-banana-odoo Fine tuning of https://github.com/odoo/odoo/comm
Original PR description
**Description of the issue/feature this PR addresses:**
Before this commit, when you create a lead from livechat with the command /lead, the public user is used inside the lead.
Because the public user is archived, and self.env.ref('base.public_partner').user_ids return an empty recordset.
Exemple on runbot : https://7653413-14-0-all.runbot63.odoo.com/web?debug=1#cids=1&id=47&menu_id=400&model=crm.lead&view_type=form
@tde-banana-odoo
Fine tuning of https://github.com/odoo/odoo/commit/7fbeda3f7d92fa501c2752c873be2255697f5d97
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#71343
Forward-Port-Of: odoo/odoo#70655Steps to reproduce the bug: - Go to inventory > create a new product -Create a new product category: * Select "Manual" inventory Valuation * Choose "First In First Out (FIFO)" costing Method * Be sure that in "Automated" inventory valuation, stock journal is not settled - Save - Update quantity of the product - Go to Inventory > Inventory Valuation> Choose the product newly created - Click on the "+" button to make manual valuation Problem: An error is tr
Original PR description
Steps to reproduce the bug:
- Go to inventory > create a new product
-Create a new product category:
* Select "Manual" inventory Valuation
* Choose "First In First Out (FIFO)" costing Method
* Be sure that in "Automated" inventory valuation, stock journal is not settled
- Save
- Update quantity of the product
- Go to Inventory > Inventory Valuation> Choose the product newly created
- Click on the "+" button to make manual valuation
Problem:
An error is triggered because we try to access stock_journal when it is false
Solution:
Use “account_journal_id” only if the valuation is real_time and relax the required constraint of `account_journal_id` in case of manual inventory Valuation (which is not used in that case)
Opw-2541497
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#71551Description of the issue/feature this PR addresses: It will fix a bug related to the position of the shapes Blocks/01 and Blocks/02. - Now, they can be connected when using together. - Avoid a bug of position when the snippet is too tall. This fix is related to the PR #70843 Current behavior before PR: The shapes Blocks/01 and Blocks/02 can't be connected when using together and have a problem with the position when the snippet is too tall. Desired behavior after PR is merged:
Original PR description
Description of the issue/feature this PR addresses: It will fix a bug related to the position of the shapes Blocks/01 and Blocks/02. - Now, they can be connected when using together. - Avoid a bug of position when the snippet is too tall. This fix is related to the PR #70843 Current behavior before PR: The shapes Blocks/01 and Blocks/02 can't be connected when using together and have a problem with the position when the snippet is too tall. Desired behavior after PR is merged: Fix the bug related to the position of the shapes Blocks/01 and Blocks/02. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#71745
Fine tuning of https://github.com/odoo/odoo/commit/bdd36f7ce68999576dfc30298f4ddf2572b4c7ec to perform the assignment and related operation only when 'consignment' is enabled opw-2508371 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#71440 Forward-Port-Of: odoo/odoo#71396
Original PR description
Fine tuning of https://github.com/odoo/odoo/commit/bdd36f7ce68999576dfc30298f4ddf2572b4c7ec to perform the assignment and related operation only when 'consignment' is enabled opw-2508371 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#71440 Forward-Port-Of: odoo/odoo#71396
Forward-Port-Of: odoo/odoo#71812 Forward-Port-Of: odoo/odoo#67357
Original PR description
Forward-Port-Of: odoo/odoo#71812 Forward-Port-Of: odoo/odoo#67357
Task: https://www.odoo.com/web#id=2336753&action=4043&model=project.task&view_type=form&cids=2&menu_id=4720 Forward-Port-Of: odoo/enterprise#18728 Forward-Port-Of: odoo/enterprise#16599
Original PR description
Task: https://www.odoo.com/web#id=2336753&action=4043&model=project.task&view_type=form&cids=2&menu_id=4720 Forward-Port-Of: odoo/enterprise#18728 Forward-Port-Of: odoo/enterprise#16599
…er_unit in the export The reason why we calculate the `price_per_unit` using the `price_subtotal_incl` divided by the quantity is to always have the tax included in the price. When the quantity is zero, we don't really care about the `price_per_unit` since the total amount will not be affected by this orderline. We could put 0 but using the `price_unit` (which may not include the tax) of the `orderline` is more correct (having 0 is less indicative than a real price). Forward-Port-Of: odoo/e
Original PR description
…er_unit in the export The reason why we calculate the `price_per_unit` using the `price_subtotal_incl` divided by the quantity is to always have the tax included in the price. When the quantity is zero, we don't really care about the `price_per_unit` since the total amount will not be affected by this orderline. We could put 0 but using the `price_unit` (which may not include the tax) of the `orderline` is more correct (having 0 is less indicative than a real price). Forward-Port-Of: odoo/enterprise#18768
Previous to this PR: If you create an invoice type 33 (Factura Afecta) with all the items on it without taxes, and you send it to the SII, it would be rejected. After the PR: A rejection from the SII is prevented inviting the user to use another type of document for exempt items or at least bill just one item with vat tax. Forward-Port-Of: odoo/enterprise#18703
Original PR description
Previous to this PR: If you create an invoice type 33 (Factura Afecta) with all the items on it without taxes, and you send it to the SII, it would be rejected. After the PR: A rejection from the SII is prevented inviting the user to use another type of document for exempt items or at least bill just one item with vat tax. Forward-Port-Of: odoo/enterprise#18703
Forward-Port-Of: odoo/enterprise#18753
Original PR description
Forward-Port-Of: odoo/enterprise#18753
PURPOSE Replace text fields by html ones now that our own html editor has been merged. Indeed it gives more options to users in the way they format their content without weighting too much on the UI as tools appear on demand and not by default. SPECIFICATIONS Convert a lot of text fields to Html fields as we have our own OdooEditor. In some modules code adaptation will be necessary to handle html / plaintext conversion when required. See individual commits per main application s
Original PR description
PURPOSE Replace text fields by html ones now that our own html editor has been merged. Indeed it gives more options to users in the way they format their content without weighting too much on the UI as tools appear on demand and not by default. SPECIFICATIONS Convert a lot of text fields to Html fields as we have our own OdooEditor. In some modules code adaptation will be necessary to handle html / plaintext conversion when required. See individual commits per main application scope for more details. LINKS Task ID-2499504 Forward-Port-Of: odoo/enterprise#18498
Forward-Port-Of: #18667 Forward-Port-Of: odoo/enterprise#18757
Original PR description
Forward-Port-Of: #18667 Forward-Port-Of: odoo/enterprise#18757
Forward-Port-Of: odoo/enterprise#18745
Original PR description
Forward-Port-Of: odoo/enterprise#18745
Forward-Port-Of: odoo/enterprise#18704
Original PR description
Forward-Port-Of: odoo/enterprise#18704
In the social marketing app, when you click on the app the system will try to refresh statistics from the Linkedin posts (social_live_post in DB with the associated social account). If one of these post doesn't have a linkedin_post_id (eg. if the post is failed for this account), it will trigger a TypeError. Now we are filtering posts to only refresh the statistics on posts with a linkedin_post_id. opw-2463073 Forward-Port-Of: odoo/enterprise#17403
Original PR description
In the social marketing app, when you click on the app the system will try to refresh statistics from the Linkedin posts (social_live_post in DB with the associated social account). If one of these post doesn't have a linkedin_post_id (eg. if the post is failed for this account), it will trigger a TypeError. Now we are filtering posts to only refresh the statistics on posts with a linkedin_post_id. opw-2463073 Forward-Port-Of: odoo/enterprise#17403