Wednesday, June 17, 2020
30 changes · master
Resolved issues and error corrections
Notification action buttons now appear below the message instead of beside it, making alerts easier to read and use. The close button is also correctly positioned when a notification has no title, improving consistency in the web interface.
Original PR description
Prior to this commit, the buttons were place at the right of the notification message and the close button was misplaced when no title was provided. After this commit, the buttons are placed at the bottom of the notification so that the close button is now at the right end of the notification. This commit also modifies the size of the buttons to btn-sm. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The task form now hides the sales order line field when there are no linked timesheets. This reduces confusion by showing the field only when timesheet entries make it relevant.
Original PR description
Before not any timesheets linked to the task, the SOL field should be visible. In this task we fixed, if there are no timesheets linked to the task then the SOL field should not be visible. TaskID: 2266104
This change fixes a reliability issue where the application could fail to complete its loading process when navigation changed in the browser. It helps users experience smoother transitions and fewer interruptions while moving around the system.
Miscellaneous changes
- Create 4 products A, B, C, D - Create a product AB, which is a kit made from A & B - Create a product CD, which is a kit made from C & D - Create a product ABCD, which is a kit made from AB & CD - Create a SO with 1 unit of ABCD, validate => a picking with A, B, C and D is created - Validate the picking The delivered quantity remains zero on the SO. This happens because we don't find any `relevant_bom`. Indeed, the `bom_line_id` written on the stock moves correspond to products
Original PR description
- Create 4 products A, B, C, D - Create a product AB, which is a kit made from A & B - Create a product CD, which is a kit made from C & D - Create a product ABCD, which is a kit made from AB & CD - Create a SO with 1 unit of ABCD, validate => a picking with A, B, C and D is created - Validate the picking The delivered quantity remains zero on the SO. This happens because we don't find any `relevant_bom`. Indeed, the `bom_line_id` written on the stock moves correspond to products AB & CD, but they do not correspond to ABCD. We fall back on the 'all-or-nothing' policy. opw-2273392 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#53075
Steps to reproduce the bug: - Let's consider a new instance with default installed language 'en_US' - Install CRM - Activate a second language (e.g. en_GB) - Set that language in all users - Inactivate default language 'en_US' - Reset the language of your current user (no value) - Go to contact and try to create a new one Bug: A traceback was raised because the lang en_US did not exist. opw:2267711 Forward-Port-Of: odoo/odoo#52758
Original PR description
Steps to reproduce the bug: - Let's consider a new instance with default installed language 'en_US' - Install CRM - Activate a second language (e.g. en_GB) - Set that language in all users - Inactivate default language 'en_US' - Reset the language of your current user (no value) - Go to contact and try to create a new one Bug: A traceback was raised because the lang en_US did not exist. opw:2267711 Forward-Port-Of: odoo/odoo#52758
### Issue - Set outgoing mail server - Install Online Ticket Submission - Publish an Helpdesk Team - Log out - Create a ticket from the helpdesk form The user who created the ticket is "Public User" He has no email address, so the mail is not sent ### Cause insert_record method in website_form/main.py uses .sudo() In v12 => sudo replaces the user in env by the superuser => ok In v13 => sudo adds a flag "su" and does not replace the user in env ### Solution
Original PR description
### Issue
- Set outgoing mail server
- Install Online Ticket Submission
- Publish an Helpdesk Team
- Log out
- Create a ticket from the helpdesk form
The user who created the ticket is "Public User"
He has no email address, so the mail is not sent
### Cause
insert_record method in website_form/main.py uses .sudo()
In v12 => sudo replaces the user in env by the superuser => ok
In v13 => sudo adds a flag "su" and does not replace the user in env
### Solution
Add a with_user(SUPERUSER_ID) to the create method's call in
insert_record
**OPW-2196668**
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#45944Before this commit, the currency exchange reversal entries had the current day as date. Now the currency exchange reversal entries has the same date as the initial currency exchange entry. opw-2209675 Forward-Port-Of: odoo/odoo#48280 Forward-Port-Of: odoo/odoo#47820
Original PR description
Before this commit, the currency exchange reversal entries had the current day as date. Now the currency exchange reversal entries has the same date as the initial currency exchange entry. opw-2209675 Forward-Port-Of: odoo/odoo#48280 Forward-Port-Of: odoo/odoo#47820
Before this commit, the currency exchange reversal entries had the current day as date. Now the currency exchange reversal entries has the same date as the initial currency exchange entry. opw-2209675 Forward-Port-Of: odoo/odoo#48280 Forward-Port-Of: odoo/odoo#47820
Original PR description
Before this commit, the currency exchange reversal entries had the current day as date. Now the currency exchange reversal entries has the same date as the initial currency exchange entry. opw-2209675 Forward-Port-Of: odoo/odoo#48280 Forward-Port-Of: odoo/odoo#47820
Every call of `initialize_sys_path` was adding two new hooks to the `sys.meta_path`, resulting in very long loading times on databases having a lot of modules. For example, 2.27s instead of 752 on a database having 130 installed modules. Forward-Port-Of: odoo/odoo#53106 Forward-Port-Of: odoo/odoo#53098
Original PR description
Every call of `initialize_sys_path` was adding two new hooks to the `sys.meta_path`, resulting in very long loading times on databases having a lot of modules. For example, 2.27s instead of 752 on a database having 130 installed modules. Forward-Port-Of: odoo/odoo#53106 Forward-Port-Of: odoo/odoo#53098
Description of the issue/feature this PR addresses: **l10n_se_ocr, new:** Adding module to support OCR Number as both payment reference on Invoices and on Vendor Bill. Invoices supports OCR Number from level 1/2 to 4 for both partner and invoice settings. Forward-Port-Of: odoo/odoo#52034
Original PR description
Description of the issue/feature this PR addresses: **l10n_se_ocr, new:** Adding module to support OCR Number as both payment reference on Invoices and on Vendor Bill. Invoices supports OCR Number from level 1/2 to 4 for both partner and invoice settings. Forward-Port-Of: odoo/odoo#52034
A recent refactoring of mail.message induced a crash when redering the front side of an event with messages/notes in its chatter. As there is no use to such a feature, we simply remove the part that displays those messages. 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#53112
Original PR description
A recent refactoring of mail.message induced a crash when redering the front side of an event with messages/notes in its chatter. As there is no use to such a feature, we simply remove the part that displays those messages. 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#53112
### Issue - Sign "Choose a template" kanban - Add 2 items as favorite - Filter by favorites - Click on sign now/send > Cancel The card disapeared ### Cause When comparing the domain, the record value is [the id, toJSON: function...] and we do _.isEqual(the previous array, the id) But, when you do `the previos array == 2` => true It seems the `get` is overriden on the variable in order to return the id Underscore ignores this ### Solution Use `==` inste
Original PR description
### Issue - Sign "Choose a template" kanban - Add 2 items as favorite - Filter by favorites - Click on sign now/send > Cancel The card disapeared ### Cause When comparing the domain, the record value is [the id, toJSON: function...] and we do _.isEqual(the previous array, the id) But, when you do `the previos array == 2` => true It seems the `get` is overriden on the variable in order to return the id Underscore ignores this ### Solution Use `==` instead of `isEqual` if the value is not an object (array, object, function) **OPW-2274990** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52966
Forward-Port-Of: odoo/odoo#53127 Forward-Port-Of: odoo/odoo#53119
Original PR description
Forward-Port-Of: odoo/odoo#53127 Forward-Port-Of: odoo/odoo#53119
This commit is fine tuning of 9f142c8ff5a383. Apparently, context_get callback is never called. I guess this is due to the fact that we are higher. context_get is defined in public/public_root.js and we are in core/session.js The only way to fix is to retrieve the URL language it's ugly but it works and if the language is not correct or not installed it should be handled by the python part. OPW-2244843 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo
Original PR description
This commit is fine tuning of 9f142c8ff5a383. Apparently, context_get callback is never called. I guess this is due to the fact that we are higher. context_get is defined in public/public_root.js and we are in core/session.js The only way to fix is to retrieve the URL language it's ugly but it works and if the language is not correct or not installed it should be handled by the python part. OPW-2244843 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53116
Create a SO, Validate it. Create Invoice: down payment (fixed amount) and validate invoice Now back to the SO. Create Invoice: Invoiceable lines (deduct down payments). A draft invoice is created. Try to delete it. User gets an error, this occur because the second invoice creation bind another invoice_line to the downpayment sale order line (first line was added when making the downpayment). When the user delete the invoice the sale order line should be deleted as well, but is still lin
Original PR description
Create a SO, Validate it. Create Invoice: down payment (fixed amount) and validate invoice Now back to the SO. Create Invoice: Invoiceable lines (deduct down payments). A draft invoice is created. Try to delete it. User gets an error, this occur because the second invoice creation bind another invoice_line to the downpayment sale order line (first line was added when making the downpayment). When the user delete the invoice the sale order line should be deleted as well, but is still linked to an invoice so the error raise. Unlinking only unbinded sol fix the issue opw-2258218 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52648 Forward-Port-Of: odoo/odoo#52583
Currently, when a user created with default access rights, but doesn't have employee then they can not access expanse with dashboard header. After this commit, created user can also access expense (without dashboard header). Task-Id: 2262636 PR #51687 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-
Original PR description
Currently, when a user created with default access rights, but doesn't have employee then they can not access expanse with dashboard header. After this commit, created user can also access expense (without dashboard header). Task-Id: 2262636 PR #51687 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#51687
**Description of the issue/feature this PR addresses:** `is_html_empty` method from https://github.com/odoo/odoo/commit/974f512f5f5d3b9f80a8c3fcde290e4f55cf1230 does not consider self-closing tag. **Current behavior before PR:** If the html content contains self-closing tags (for example `<br/>`), the above method returns `False` even if the content is void. **Desired behavior after PR is merged:** Regular Expression from method `is_html_empty` also considers self-closing tags while che
Original PR description
**Description of the issue/feature this PR addresses:** `is_html_empty` method from https://github.com/odoo/odoo/commit/974f512f5f5d3b9f80a8c3fcde290e4f55cf1230 does not consider self-closing tag. **Current behavior before PR:** If the html content contains self-closing tags (for example `<br/>`), the above method returns `False` even if the content is void. **Desired behavior after PR is merged:** Regular Expression from method `is_html_empty` also considers self-closing tags while checking for void content. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53157
- added consumidor final customer for default end customer Forward-Port-Of: odoo/enterprise#11168 Forward-Port-Of: odoo/enterprise#11152
Original PR description
- added consumidor final customer for default end customer Forward-Port-Of: odoo/enterprise#11168 Forward-Port-Of: odoo/enterprise#11152
Usecase to reproduce: - Create Product A and set 10 units in WH1 and 20 units in WH2 - Add a MPS for product A in WH1 and another for WH2 Both shows 30 as starting inventory. It happens since qty_available is called without context so it returns the global quantity and not by warehouse Forward-Port-Of: odoo/enterprise#11205
Original PR description
Usecase to reproduce: - Create Product A and set 10 units in WH1 and 20 units in WH2 - Add a MPS for product A in WH1 and another for WH2 Both shows 30 as starting inventory. It happens since qty_available is called without context so it returns the global quantity and not by warehouse Forward-Port-Of: odoo/enterprise#11205
Purpose ======= Limit twitter mentions to avoid spamming the API and overloading limitations rates Task-2274734 Forward-Port-Of: odoo/enterprise#11230 Forward-Port-Of: odoo/enterprise#11072
Original PR description
Purpose ======= Limit twitter mentions to avoid spamming the API and overloading limitations rates Task-2274734 Forward-Port-Of: odoo/enterprise#11230 Forward-Port-Of: odoo/enterprise#11072
Facing the issue on upgrade request 49082: Fix in 12.0 to be forward ported in 12.3 Traceback (most recent call last): File "/src/odoo/saas-12.3/odoo/service/server.py", line 1167, in preload_registries registry = Registry.new(dbname, update_module=update_module) File "/src/odoo/saas-12.3/odoo/modules/registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/src/odoo/saas-12.3/odoo/modules/loading.py", line 467, in lo
Original PR description
Facing the issue on upgrade request 49082:
Fix in 12.0 to be forward ported in 12.3
Traceback (most recent call last):
File "/src/odoo/saas-12.3/odoo/service/server.py", line 1167, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/src/odoo/saas-12.3/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/src/odoo/saas-12.3/odoo/modules/loading.py", line 467, in load_modules
env['ir.model.data']._process_end(processed_modules)
File "/src/odoo/saas-12.3/odoo/addons/base/models/ir_model.py", line 1716, in _process_end
record.unlink()
File "/src/enterprise/saas-12.3/account_reports/models/account_financial_report.py", line 293, in unlink
menu.action.unlink()
AttributeError: 'bool' object has no attribute 'unlink'
Forward-Port-Of: odoo/enterprise#11210Purpose of the task is when all the demo data installed, the loading of the page could take more than 5 seconds, as the first loading loads all the work entries for all the employees on the given period. here, we generate several hundreds records. So in this commit, Load this month and the last month work entries, to avoid creating all those records when running the click all. TaskID: 2228945 Closes: #11019 Forward-Port-Of: odoo/enterprise#11192 Forward-Port-Of: odoo/enterprise#11019
Original PR description
Purpose of the task is when all the demo data installed, the loading of the page could take more than 5 seconds, as the first loading loads all the work entries for all the employees on the given period. here, we generate several hundreds records. So in this commit, Load this month and the last month work entries, to avoid creating all those records when running the click all. TaskID: 2228945 Closes: #11019 Forward-Port-Of: odoo/enterprise#11192 Forward-Port-Of: odoo/enterprise#11019
- Go to any form with a tree view inside it - For example, go to Sales and open a quotation - Toggle Studio - Click on "Order Lines" table and click on "EDIT LIST VIEW" button - Add a new field in the table An error is triggered: Error while validating view: Element '<xpath expr="//field[@name='order_line']/tree/tree[1]/field[7]">' cannot be located in parent view Since this commit https://github.com/odoo/enterprise/commit/4c99531d6776ac9165a266b3d95890d1450edfa9, absoluted xp
Original PR description
- Go to any form with a tree view inside it
- For example, go to Sales and open a quotation
- Toggle Studio
- Click on "Order Lines" table and click on "EDIT LIST VIEW" button
- Add a new field in the table
An error is triggered:
Error while validating view:
Element '<xpath expr="//field[@name='order_line']/tree/tree[1]/field[7]">' cannot be located in parent view
Since this commit https://github.com/odoo/enterprise/commit/4c99531d6776ac9165a266b3d95890d1450edfa9,
absoluted xpath is prioritized, but in this case, a relative xpath has to be used because the xpath is computed relative to the xpath of the subview.
A relative xpath will be used if "subview_xpath" is given.
opw-2276256
Forward-Port-Of: odoo/enterprise#11186Forward-Port-Of: odoo/enterprise#10099
Original PR description
Forward-Port-Of: odoo/enterprise#10099
This shoudld obviously not be copied when duplicating a ticket. opw-2273728 Forward-Port-Of: odoo/enterprise#11106 Forward-Port-Of: odoo/enterprise#11078
Original PR description
This shoudld obviously not be copied when duplicating a ticket. opw-2273728 Forward-Port-Of: odoo/enterprise#11106 Forward-Port-Of: odoo/enterprise#11078
Forward-Port-Of: odoo/enterprise#11165 Forward-Port-Of: odoo/enterprise#11059
Original PR description
Forward-Port-Of: odoo/enterprise#11165 Forward-Port-Of: odoo/enterprise#11059
Issue - Install "Field Service" and "Lead Scoring" apps - Add a second company B and log in it - Edit "Europe" sales team and set B as company - Log in main company A - Go to "Field Service" and create a task with a customer but no sales person ("Assigned to") - Click on stat "Products" button to add products. - Try to add products Error message and unable to add products because weren't able to create a sale order. Cause The multi-company rule on "Sale Order" is
Original PR description
Issue
- Install "Field Service" and "Lead Scoring" apps
- Add a second company B and log in it
- Edit "Europe" sales team and set B as company
- Log in main company A
- Go to "Field Service" and create a task with
a customer but no sales person ("Assigned to")
- Click on stat "Products" button to add products.
- Try to add products
Error message and unable to add products because weren't able
to create a sale order.
Cause
The multi-company rule on "Sale Order" is overided due to
creation with sudo(). The default value of "team_id" of the
sale order is fetched without a multi-company rule in the
domain, and retrieve any team where the user is member (in this
issue, sales team with a different company than env.company).
Solution
Add multi-company check in domain.
Related to fix https://github.com/odoo/enterprise/pull/11176
opw-2273241
Forward-Port-Of: odoo/enterprise#11199Issue - Install "Field Service" app - Add a second company B and log in it - Edit "Europe" sales team and set B as company - Log in main company A - Go to "Field Service" and create a task with a customer but no sales person ("Assigned to") - Click on stat "Products" button to add products. Error message and unable to add products because weren't able to create a sale order. Cause The multi-company rule on "Sale Order" is overided due to creation with sudo().The
Original PR description
Issue
- Install "Field Service" app
- Add a second company B and log in it
- Edit "Europe" sales team and set B as company
- Log in main company A
- Go to "Field Service" and create a task with
a customer but no sales person ("Assigned to")
- Click on stat "Products" button to add products.
Error message and unable to add products because weren't able
to create a sale order.
Cause
The multi-company rule on "Sale Order" is overided due to
creation with sudo().The default value of "team_id" of the
sale order is fetched with an empty domain since there is
no sales person, and so, retrieve random team (in this issue,
sales team with a different company than env.company).
Solution
Add default team (fetched with forced multi-company domain)
when creating a "Sale order".
opw-2273241
Forward-Port-Of: odoo/enterprise#11188
Forward-Port-Of: odoo/enterprise#11176TaskID: 2225736 Forward-Port-Of: odoo/enterprise#9504
Original PR description
TaskID: 2225736 Forward-Port-Of: odoo/enterprise#9504
This commit fixes an erroneous create argument used to create new PDFs after a split. Before this fix, the `tag_ids` key had a M2M `write` argument in the form `[(6, 0, ids)]` which doesn't work for `create`. task-2225803 Forward-Port-Of: odoo/enterprise#9503
Original PR description
This commit fixes an erroneous create argument used to create new PDFs after a split. Before this fix, the `tag_ids` key had a M2M `write` argument in the form `[(6, 0, ids)]` which doesn't work for `create`. task-2225803 Forward-Port-Of: odoo/enterprise#9503