Friday, October 23, 2020
34 changes · master
Enhancements to existing features
This change improves how Odoo loads configuration settings by reading them together instead of one by one. This should reduce repeated work in the background and make settings-dependent operations more efficient without changing user-facing behavior.
Original PR description
Simply read all parameters at once to fill in the cache.
A new automated test was added to make sure the message panel is cleared correctly when users create a new record. This helps prevent old conversation details from appearing in the wrong place, improving reliability for users working with records.
Original PR description
This commit adds a test for the fix odoo/odoo/pull/58769 that ensures that the chatter is properly cleared when creating a new record. task-2348472
This update reduces unnecessary system log messages and makes remaining messages easier to understand during installation or setup. It helps administrators and support teams diagnose setup activity with less noise and more context, without changing day-to-day user workflows.
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fixes a manufacturing planning issue where a work order’s planned status was not refreshed when its planned start or finish dates changed. As a result, production planning information stays accurate after schedule adjustments.
Original PR description
The _compute_is_planned() method was only triggered at the workorder creation and not at the modification of date_planned_start or date_planned_finished. This commit change the depends fields to trigger the compute at right time. 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
Documentation and clarification updates
A corporate contributor agreement for Ingenieurgemeinschaft IgH GmbH has been added to the project records. This keeps legal contribution documentation up to date and supports clear rights management for future work from this organization.
Original PR description
Added CLA file for Ingenieurgemeinschaft IgH GmbH in Essen, Germany.
Miscellaneous changes
There is no plausible case where "print QR-invoice" button is needed on Credit Note form view. Task: 2351817 Forward-Port-Of: odoo/odoo#60310 Forward-Port-Of: odoo/odoo#59338
Original PR description
There is no plausible case where "print QR-invoice" button is needed on Credit Note form view. Task: 2351817 Forward-Port-Of: odoo/odoo#60310 Forward-Port-Of: odoo/odoo#59338
Open POS Make some cash transaction Close POS Repeat for some days and close the session Cash statement lines will be saved with the closing date, even if the payment entries are saved with their payment date opw-2347645 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60321
Original PR description
Open POS Make some cash transaction Close POS Repeat for some days and close the session Cash statement lines will be saved with the closing date, even if the payment entries are saved with their payment date opw-2347645 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60321
With this commit, the executions bits are fixed on some xml, csv and ttf files. The fix was initialy made at the Debian packaging level. As xlwt is now in Debian buster, the overide is removed. The linked fonts in Debian package are now removed in one line to simplify the code. Finally, the package.py script is moving the addons in odoo/addons which is not more necessary for the Debian package as it's made at the Debain packaging level. So package.py will not do that anymore. Forwa
Original PR description
With this commit, the executions bits are fixed on some xml, csv and ttf files. The fix was initialy made at the Debian packaging level. As xlwt is now in Debian buster, the overide is removed. The linked fonts in Debian package are now removed in one line to simplify the code. Finally, the package.py script is moving the addons in odoo/addons which is not more necessary for the Debian package as it's made at the Debain packaging level. So package.py will not do that anymore. Forward-Port-Of: odoo/odoo#60114
This commit will add a new tab in the account move view with the list of the edi documents for this move. The tab will only be visible in debug mod. This is done to help the debugging and the error finding when there is a problem with an edi document. Forward-Port-Of: odoo/odoo#60152
Original PR description
This commit will add a new tab in the account move view with the list of the edi documents for this move. The tab will only be visible in debug mod. This is done to help the debugging and the error finding when there is a problem with an edi document. Forward-Port-Of: odoo/odoo#60152
Improve code stability, supporting countries deletion & creation (thus losing the `ir_model_data` reference). Community PR: https://github.com/odoo/odoo/pull/57837 Enterprise PR: https://github.com/odoo/enterprise/pull/13275 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#57837
Original PR description
Improve code stability, supporting countries deletion & creation (thus losing the `ir_model_data` reference). Community PR: https://github.com/odoo/odoo/pull/57837 Enterprise PR: https://github.com/odoo/enterprise/pull/13275 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#57837
Do not switch to text tools if the cursor is in an empty oe_structure (to encourage using snippets there and actually avoid breaking tours which suppose the snippet list is visible). Forward-Port-Of: odoo/odoo#60383
Original PR description
Do not switch to text tools if the cursor is in an empty oe_structure (to encourage using snippets there and actually avoid breaking tours which suppose the snippet list is visible). Forward-Port-Of: odoo/odoo#60383
# Purpose The purpose of this commit is to have reliable calendar event reminder. # Specifications Before, the reminders was not send directly and was instead put in mailing queue, which was leading to some delay. Additionaly, when the cron was executed manually, we never receive the lastcall date which prevented the system to send reminder when he should. task-2331999 Forward-Port-Of: odoo/odoo#57994
Original PR description
# Purpose The purpose of this commit is to have reliable calendar event reminder. # Specifications Before, the reminders was not send directly and was instead put in mailing queue, which was leading to some delay. Additionaly, when the cron was executed manually, we never receive the lastcall date which prevented the system to send reminder when he should. task-2331999 Forward-Port-Of: odoo/odoo#57994
Allow having in an attachment as well as an error in the same document. This will allow to see the document that generates the error, and easy the process of debugging. Forward-Port-Of: odoo/odoo#60163
Original PR description
Allow having in an attachment as well as an error in the same document. This will allow to see the document that generates the error, and easy the process of debugging. Forward-Port-Of: odoo/odoo#60163
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the same time there is no easy way to fix it STEPS: * create a record with html field, e.g. project.task * add an embedded video (File/Image icon) * save BEFORE: video doesn't work AFTER: there is no option to add embedded video anymore WHY: * iframe tags are removed before storing html in database, so after saving a record, embedded video doesn't work anymore * possible fixes look too tricky for sta
Original PR description
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the same time there is no easy way to fix it STEPS: * create a record with html field, e.g. project.task * add an embedded…
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the
same time there is no easy way to fix it
STEPS:
* create a record with html field, e.g. project.task
* add an embedded video (File/Image icon)
* save
BEFORE: video doesn't work
AFTER: there is no option to add embedded video anymore
WHY:
* iframe tags are removed before storing html in database, so after saving a
record, embedded video doesn't work anymore
* possible fixes look too tricky for stable branches:
* new field attribute sanitize_iframe=False -- requires changes in core python framework which may have side effect
* adding iframe on client side -- the problem is that the backend doesn't
have mechanism to use animation in html fields like it's done in
website: https://github.com/odoo/odoo/blob/ced500e9bcbb5c84033463689d135ad4c7dc4f39/addons/website/static/src/js/content/snippets.animation.js#L623-L632
* adding iframe on server side -- parsing html fields in _read... Doesn't look good either
* double selector is required to make it work both in frontend and backend:
$editable.closest('.o_editable, .note-editor')
* we don't need hardcoded exception for mailing.mailing, mail.compose.message
because those fields marked as sanitized (default value)
https://github.com/odoo/odoo/blob/c92f058571b0656451f24e24154dd1bdb3bdb48a/odoo/fields.py#L1589-L1590
https://github.com/odoo/odoo/blob/c92f058571b0656451f24e24154dd1bdb3bdb48a/addons/mail/wizard/mail_compose_message.py#L115
https://github.com/odoo/odoo/blob/61734cdaf1cf6857125b1ece63928ab080359c6c/addons/mass_mailing/models/mailing.py#L77
* I don't apply this for Odoo 12, because js is refactored in Odoo 13 (e.g.
field_html.js has another name in Odoo 12)
---
opw-2353103
Forward-Port-Of: odoo/odoo#60435
Forward-Port-Of: odoo/odoo#60418Behavior prior to the fix: The email template associated with a product on an invoice placed via the web portal is sent with no email_from, resulting in a failure. The reason is that before 13.0 .sudo() before sending a mail would send it as superuser user (which was the intention in this case), but since 13.0 for the same intention we need .with_user(SUPERUSER_ID). Behavior after the fix: When sending the product email, if we are in SU mode, we'll switch to the super user account
Original PR description
Behavior prior to the fix: The email template associated with a product on an invoice placed via the web portal is sent with no email_from, resulting in a failure. The reason is that before 13.0 .sudo() before sending a mail would send it as superuser user (which was the intention in this case), but since 13.0 for the same intention we need .with_user(SUPERUSER_ID). Behavior after the fix: When sending the product email, if we are in SU mode, we'll switch to the super user account, emulating the pre-13.0 behavior. Similar fix to b12bcfbb1b44cc72cdf73506c540c387f00a37e9 opw-2346415 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60409 Forward-Port-Of: odoo/odoo#60272
…gned This commit makes a small adjustment to the course view to hide the responsible label in the course description if none is set. As this field is not required on the slide.channel model, it's not necessary to show a useless label when it's not set. Task 2368573 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-p
Original PR description
…gned This commit makes a small adjustment to the course view to hide the responsible label in the course description if none is set. As this field is not required on the slide.channel model, it's not necessary to show a useless label when it's not set. Task 2368573 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#60579
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60601
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60601
This PR has 3 parts: The members fix itself, which is necessary for performance reasons especially at init messaging, as per described in the task. Adding the partner name in the typing payload, because due to not knowing all members anymore, it is necessary to properly display who is typing. Restrict restoring scroll position only if the corresponding scroll height is available, to make the scroll feature and particularly the corresponding tests more robust. task-2360020 Forwar
Original PR description
This PR has 3 parts: The members fix itself, which is necessary for performance reasons especially at init messaging, as per described in the task. Adding the partner name in the typing payload, because due to not knowing all members anymore, it is necessary to properly display who is typing. Restrict restoring scroll position only if the corresponding scroll height is available, to make the scroll feature and particularly the corresponding tests more robust. task-2360020 Forward-Port-Of: odoo/odoo#60091
Behavior prior to the fix: When accepting a meeting invite from the invitation email, if not logged in, an Internal Server Error is received. Additionally, if already logged in, an Internal Server Error is also received (albeit for a different reason) Behavior after the fix: Accepting (or declining) the meeting invite works and shows the accepted/declined meeting. opw-2366173 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Por
Original PR description
Behavior prior to the fix: When accepting a meeting invite from the invitation email, if not logged in, an Internal Server Error is received. Additionally, if already logged in, an Internal Server Error is also received (albeit for a different reason) Behavior after the fix: Accepting (or declining) the meeting invite works and shows the accepted/declined meeting. opw-2366173 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60556
task-2343795 Forward-Port-Of: odoo/odoo#59989
Original PR description
task-2343795 Forward-Port-Of: odoo/odoo#59989
Build IoT from new Raspberry Pi OS We update the image to build the IoT from Raspbian to Raspberry Pi OS We change the OS from Raspbian to Raspberry Pi OS So we change all occurence of raspbian to raspios Forward-Port-Of: odoo/odoo#60590
Original PR description
Build IoT from new Raspberry Pi OS We update the image to build the IoT from Raspbian to Raspberry Pi OS We change the OS from Raspbian to Raspberry Pi OS So we change all occurence of raspbian to raspios Forward-Port-Of: odoo/odoo#60590
Description of the issue/feature this PR addresses: Impacted versions: - 13.0,14.0 Steps to reproduce: 1. create a new sale order/quotation 2. do not select a customer 3. add a new line in optional products. 4.After choosing a product error will popup Current behavior before PR: Error will pop up showing **ValueError: Expected singleton: product.pricelist()** Desired behavior after PR is merged: Price unit will be 0 ** Desired behavior after PR is merged: Price unit will be 0  Closes https://github.com/odoo/odoo/issues/60205 Fixes https://github.com/odoo/odoo/issues/60205 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60607 Forward-Port-Of: odoo/odoo#59576
Behavior prior to this fix: When archiving the last variant on a template, the product template stays active (contrary to the comment indicating that `toggle_active` will archive the related product.template if there is only one active `product.product`). Behavior after the fix: When archiving the last variant on a template, the product template is archived. When un-archiving that variant, the product template is unarchived as well, without un-archiving the other variants. Note
Original PR description
Behavior prior to this fix: When archiving the last variant on a template, the product template stays active (contrary to the comment indicating that `toggle_active` will archive the related product.template if there is only one active `product.product`). Behavior after the fix: When archiving the last variant on a template, the product template is archived. When un-archiving that variant, the product template is unarchived as well, without un-archiving the other variants. Note: this is a remake of a fix implemented in 77e5472c041e, as that fix did not correctly count the inactive variants. opw-2349862 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60536
task-id: 2343850 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#60052
Original PR description
task-id: 2343850 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#60052
https://github.com/odoo/odoo/pull/59094 Forward-Port-Of: odoo/odoo#60285
Original PR description
https://github.com/odoo/odoo/pull/59094 Forward-Port-Of: odoo/odoo#60285
On a thread with at least 21 replies, click on "show N more replies". The first time, it does append the last 10 replies. Click again: it appends the same batch of 10 replies to the thread. The button loads the replies starting from the last reply id, but this id is not updated after load. This is because the code searches for a `p.well` in the DOM assumed to be the `o_mg_read_more` parent (see c40f184102c419). However, commit 59237ea8 removed the `.well` class of the parent. The new b
Original PR description
On a thread with at least 21 replies, click on "show N more replies". The first time, it does append the last 10 replies. Click again: it appends the same batch of 10 replies to the thread. The button loads the replies starting from the last reply id, but this id is not updated after load. This is because the code searches for a `p.well` in the DOM assumed to be the `o_mg_read_more` parent (see c40f184102c419). However, commit 59237ea8 removed the `.well` class of the parent. The new button is not found, the old button is not removed, and so it goes. This affects the OCA website (the fix can also be tested using this link): https://odoo-community.org/groups/contributors-15/contributors-176724?mode=thread&date_begin=&date_end= -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60618 Forward-Port-Of: odoo/odoo#60257
Issue - Install "l10n_latam_invoice_document" - Try to add a credit note to any invoice Cause "l10n_latam_manual_document_number" is unitialized when "l10n_latam_use_documents" is equal to False Solution Init "l10n_latam_manual_document_number" to False old PR: https://github.com/odoo/odoo/pull/60619 opw-2366298 Forward-Port-Of: odoo/odoo#60637
Original PR description
Issue
- Install "l10n_latam_invoice_document"
- Try to add a credit note to any invoice
Cause
"l10n_latam_manual_document_number" is unitialized when
"l10n_latam_use_documents" is equal to False
Solution
Init "l10n_latam_manual_document_number" to False
old PR: https://github.com/odoo/odoo/pull/60619
opw-2366298
Forward-Port-Of: odoo/odoo#60637When switching immediate payment term to 30% advance then back to immediate payment term, the receivable line is back to its previous value. This is due to the '_get_fields_onchange_balance' that is not updating correctly the business fields since price_subtotal == amount_currency. So, when `writing`, debit/credit are removed from the dictionary because the values are the same as before. However, `price_unit` hasn't be updated with the new value and remains as its previous value. It leads to
Original PR description
When switching immediate payment term to 30% advance then back to immediate payment term, the receivable line is back to its previous value. This is due to the '_get_fields_onchange_balance' that is not updating correctly the business fields since price_subtotal == amount_currency. So, when `writing`, debit/credit are removed from the dictionary because the values are the same as before. However, `price_unit` hasn't be updated with the new value and remains as its previous value. It leads to a recomputation of accounting fields regarding the business fields and then, trigger the unbalanced journal entry. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60614
The `filters` attribute is not supported. This causes a warning in the log. Forward-Port-Of: odoo/enterprise#14366
Original PR description
The `filters` attribute is not supported. This causes a warning in the log. Forward-Port-Of: odoo/enterprise#14366
Behavior prior to the fix: When accepting a meeting invite from the invitation email, if not logged in, an Internal Server Error is received. Behavior after the fix: Accepting (or declining) the meeting invite works and shows the accepted/declined meeting. opw-2366173 Forward-Port-Of: odoo/enterprise#14359
Original PR description
Behavior prior to the fix: When accepting a meeting invite from the invitation email, if not logged in, an Internal Server Error is received. Behavior after the fix: Accepting (or declining) the meeting invite works and shows the accepted/declined meeting. opw-2366173 Forward-Port-Of: odoo/enterprise#14359
Behavior prior to the fix: - If I, in the Brussels timezone, schedule a recurring task for an employee on 10/20/2020 08:00 (local time = CEST), and have it recur weekly, the next occurence will be on 10/27/2020 07:00 (local time = CET). In both cases the time is 06:00 GMT, but the employee is interested in local time. - Likewise, when using the "Copy previous week" action on the planner, the GMT timestamps are preserved, causing a shift in the local time Behavior after the fix: -
Original PR description
Behavior prior to the fix: - If I, in the Brussels timezone, schedule a recurring task for an employee on 10/20/2020 08:00 (local time = CEST), and have it recur weekly, the next occurence will be on…
Behavior prior to the fix: - If I, in the Brussels timezone, schedule a recurring task for an employee on 10/20/2020 08:00 (local time = CEST), and have it recur weekly, the next occurence will be on 10/27/2020 07:00 (local time = CET). In both cases the time is 06:00 GMT, but the employee is interested in local time. - Likewise, when using the "Copy previous week" action on the planner, the GMT timestamps are preserved, causing a shift in the local time Behavior after the fix: - The system uses the web user's timezone (as identified by their browser) to perform the recurrency calculation. The second occurence will thus be on 10/27 08:00 local time (07:00 GMT). NOTES: - when entering a schedule, the timezone is currently computed based on the local timezone of the user (the one set on his computer). It may be preferrable to use the employee's timezone. Such a change is not part of the scope of the fix since it is a behavior change (worth noting also that Odoo generally uses the browser's timezone rather than the user's timezone) - the reporting of the time in the web interface is not consistent (if my timezone is different from that in which the event was entered, the time may be reported differently on the planner UI and in the Planning edit popup). The fix does not intend to modify this behavior either. - the test on period duplication (TestPeriodDuplication) which had been commented as part of commit 3e957aa (when the recurrency logic was modified) was uncommented and corrected as part of the fix, since an additional test was needed to check the behavior of the period duplication function across different timezones - another commit follows to address the performance concern noted on ticket opw-2349735 See also https://github.com/odoo/enterprise/pull/13968 (fix for the copy / move functions on the gantt frontend) opw-2349735 Forward-Port-Of: odoo/enterprise#14188 Forward-Port-Of: odoo/enterprise#13969
Before this commit, just the message error was return, and not the cfdi document that generates the error. Not having the document, complicates the understanding of the error and how to fix it. Now, the generated cfdi as well as the error are return. Forward-Port-Of: odoo/enterprise#14167
Original PR description
Before this commit, just the message error was return, and not the cfdi document that generates the error. Not having the document, complicates the understanding of the error and how to fix it. Now, the generated cfdi as well as the error are return. Forward-Port-Of: odoo/enterprise#14167
If an account.online.provider has multiple accounts linked to a journal, previously when the cron was running to fetch transactions it was running in a nested loop resulting in many call to "refresh" for a same account. This commit fixes this behavior closes odoo/enterprise#10235 Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com> Forward-Port-Of: odoo/enterprise#14352
Original PR description
If an account.online.provider has multiple accounts linked to a journal, previously when the cron was running to fetch transactions it was running in a nested loop resulting in many call to "refresh" for a same account. This commit fixes this behavior closes odoo/enterprise#10235 Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com> Forward-Port-Of: odoo/enterprise#14352
Improve code stability, supporting countries deletion & creation (thus losing the `ir_model_data` reference). Community PR: https://github.com/odoo/odoo/pull/57837 Enterprise PR: https://github.com/odoo/enterprise/pull/13275 Forward-Port-Of: odoo/enterprise#13275
Original PR description
Improve code stability, supporting countries deletion & creation (thus losing the `ir_model_data` reference). Community PR: https://github.com/odoo/odoo/pull/57837 Enterprise PR: https://github.com/odoo/enterprise/pull/13275 Forward-Port-Of: odoo/enterprise#13275