Friday, November 29, 2019
29 changes
Enhancements to existing features
This update adds clear identifiers to the main sections of configuration views, making future customizations easier and less error-prone. It helps developers and implementation teams target the right settings areas without relying on fragile layout positions, reducing maintenance risk for businesses.
Original PR description
Description of the issue/feature this PR addresses: Since all containers within a configuration view have the same class 'row mt16 o_settings_container' it doesn't allow for very clean/easy xpath expressions. By setting a name on evey major container we can do cleaner and safer xpath expressions that don't need any index or sub-xpaths.
Current behavior before PR: If you'd like to xpath into the purchase configuration view and and insert after the last element you'd have to create ugly xpaths with indexes. Something like `<xpath expr="//div[hasclass('o_settings_container'][3]" position="after"></xpath>`
Desired behavior after PR is merged: After this change you can do a clean and safer xpath expression like `<xpath expr="//div[@name='purchase_setting_container']" position="after"></xpath>`
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prApp detail pages now show when a module contains in-app purchases. This helps users make a more informed decision before installing an app that may involve additional paid services or features.
Original PR description
Purpose ======= There are no mentions that a module may contain In-App Purchases in Apps. We should inform the users of this so they make a conscious decision when installing such app. TaskID: 2129214 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
This update simplifies internal code that manages the music player service used by Odoo hardware drivers. It removes unnecessary logic and makes the service startup easier to maintain, with no expected change for end users.
Original PR description
We clean the code for the MPDManager by removing useless lines and simplifying the way we run the MPD server. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves the wording of labels and tooltips in the rental configurator, making the setup flow easier to understand for sales users. It helps reduce confusion when preparing rental quotations without changing the underlying rental process.
Original PR description
<b> Task:</b> https://www.odoo.com/web?#id=2123560&action=333&active_id=1725&model=project.task&view_type=form&menu_id=4720 <b> Pad:</b> https://pad.odoo.com/p/r.2316d6e3f2db6892d1a05757e966f6ae
This update removes unnecessary code from the IoT SixDriver component. It helps keep the codebase cleaner and easier to maintain, with no expected impact on day-to-day users.
Original PR description
Remove useless code from SixDriver
Resolved issues and error corrections
This change rolls back a recent update to out-of-office messages because it caused test failures and did not fully handle date and timezone scenarios. The previous behavior is restored for now while a more reliable fix is prepared later.
Original PR description
This reverts commit 802817c92586f87ef6dd431011d8a9615eb4df8c. The new test was crashing when current weekday is Friday. This is easy to fix, but some other considerations are missing in the original commit, like taking into account timezones. We will add a proper fix later, and revert now in the meantime.
This fix prevents task creation from failing when users use the kanban quick-create window without selecting a project first. It improves reliability for teams creating tasks quickly and avoids an avoidable interruption in the workflow.
Original PR description
Task creation was crashing when there was no project selected in the kanban's quickcreate window. TaskID: 2146564 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
Gamification goal setup now uses simpler field filtering rules by removing unnecessary dynamic checks. This makes the configuration screen slightly more reliable and efficient without changing what business users can do.
Original PR description
The check on `(= model_id False)` seems to have precious little value: model_id is required on ir.model.fields, so `(OR (= model_id False) (in model_id []))` is slightly less efficient (as it needs to be looked up rather than shortcut) but given it's only a possible concern when specifically defining a gamification goal that seems... irrelevant. Task 2115472
The documentation was corrected to remove guidance about an older company-switching option that is no longer supported in the current version. This helps readers follow the right approach and avoid using outdated instructions.
Original PR description
New multi-company guidelines for 13.0 documentation explain the use of force_company. This is still valid in 13.0, but removed in 13.1 and replaced by the with_company mechanism. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes missing or broken icons in the website editor that appeared after a supporting library was updated. Users creating or editing website content should once again see the expected editor controls, reducing confusion during page editing.
Original PR description
Commit https://github.com/odoo/odoo/commit/ff1c35513aecef5fbc30f7c2f3834450e719714e broke some editor icons.
The Analytic Report now initializes its hierarchy setting in the way this report requires, rather than relying on logic used by other accounting reports. This helps ensure users see the expected drill-down structure when reviewing analytic reporting data.
Original PR description
Following https://github.com/odoo/enterprise/commit/1789db58dc3fef6358bf2465cfd9ca120bbd6120 The hierarchy on the Analytic Report doesn't depend on account.group, unlike the other reports. This means we have to initialize the option another way.
Features or functions removed from Odoo
This change removes a dynamic filtering rule from the employee expenses payment registration flow. It should make the setup easier to maintain while keeping the payment registration experience consistent for users.
This change removes an older dynamic filtering mechanism from the online shop area. It helps keep the website sales module simpler and easier to maintain, reducing the chance of unexpected behavior in product filtering.
Original PR description
Task 2115472
Miscellaneous changes
Reproduce the issue - Install Sale - Create a quotation template with a product price that is different than the price on the product form. - Create a quotation - Select a customer then the quotation template The product price is not the price mentionned in the quotation template Cause In the method `onchange_sale_order_template_id`, if we have a pricelist set and the discount policy "with discount" we use the price of the pricelist in
Original PR description
Reproduce the issue
- Install Sale
- Create a quotation template with a product price that is different
than the price on the product form.
- Create a quotation
- Select a customer then the quotation template
The product price is not the price mentionned in the quotation
template
Cause
In the method `onchange_sale_order_template_id`, if we have
a pricelist set and the discount policy "with discount" we
use the price of the pricelist instead of the price of the
template line.
This commit use the template line's price if the discount policy
is not 'without' discount and if there is a template line's price
OPW-2146210
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#41055If the name of a file input field is 'x_binary_input', before commit 9be29371abcdfe57b1738484c5057ad81e76b00d (opw 2092653), self.form_fields would have names of the form 'x_binary_input[i]'. After this commit, they are of the form 'x_binary_input[i][j]'. When calling extract_data, field_name would then be 'x_binary_input[i]' instead of 'x_binary_input'. Therefore, the file would be considered as orphan instead of being attached to x_binary_input. We thus change the split so that it alway
Original PR description
If the name of a file input field is 'x_binary_input', before commit 9be29371abcdfe57b1738484c5057ad81e76b00d (opw 2092653), self.form_fields would have names of the form 'x_binary_input[i]'. After this commit, they are of the form 'x_binary_input[i][j]'. When calling extract_data, field_name would then be 'x_binary_input[i]' instead of 'x_binary_input'. Therefore, the file would be considered as orphan instead of being attached to x_binary_input. We thus change the split so that it always returns 'x_binary_input'. opw 2122624 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#41110
Create a sale order in POS with generate invoice option enabled. When the user timezone is creating a day difference with respect to UTC the date reported on the invoice will be wrong. This is caused by the invoice date being written using `fields.Date.today()` , which is using the UTC date. Respecting the order_date fix the issue opw-2129440 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#41111
Original PR description
Create a sale order in POS with generate invoice option enabled. When the user timezone is creating a day difference with respect to UTC the date reported on the invoice will be wrong. This is caused by the invoice date being written using `fields.Date.today()` , which is using the UTC date. Respecting the order_date fix the issue opw-2129440 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#41111
Some parameters were missing, leading to incorrect SHA-OUT calculation on Odoo's side. Some were removed as well. opw-2121544 Forward-Port-Of: odoo/odoo#41067
Original PR description
Some parameters were missing, leading to incorrect SHA-OUT calculation on Odoo's side. Some were removed as well. opw-2121544 Forward-Port-Of: odoo/odoo#41067
Change the version of the IoT Box. From 19_10 to 19_12 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#41096
Original PR description
Change the version of the IoT Box. From 19_10 to 19_12 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#41096
1) Don't set an amount_currency without currency_id set. 2) Use the journal's currency only if different of the company one. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40880
Original PR description
1) Don't set an amount_currency without currency_id set. 2) Use the journal's currency only if different of the company one. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40880
The trailing check on the fiscal year lock date is wrong and is triggered whatever the values passed to 'write'. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#41088
Original PR description
The trailing check on the fiscal year lock date is wrong and is triggered whatever the values passed to 'write'. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#41088
Afschrijving means depreciation. However all depreciation lines have been copy-pasted with wrong tags and types: e.g. Aanschafwaarde overige immateriele vaste activa has a counterpart Afschrijving overige immateriele vaste activa, the first user_type_id is data_account_type_non_current_assets, but the counterpart should be depreciation; similarly tags should go to their Afschrijving counterpart. opw 2115991 Description of the issue/feature this PR addresses: Current behavior befo
Original PR description
Afschrijving means depreciation. However all depreciation lines have been copy-pasted with wrong tags and types: e.g. Aanschafwaarde overige immateriele vaste activa has a counterpart Afschrijving overige immateriele vaste activa, the first user_type_id is data_account_type_non_current_assets, but the counterpart should be depreciation; similarly tags should go to their Afschrijving counterpart. opw 2115991 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#40885 Forward-Port-Of: odoo/odoo#39915
Reproduce the issue - Install eCommerce - Activate stripe, use testing credentials and select Configuration > Payment Flow > Payment from Odoo - Create a contact that has a trailing whitespace at the beginning of the email - Grant him portal access, and a password - Open your browser devtools - Login to the web shop with this portal user and buy an item using stripe 1. Error Dialog: Server Error (HTTP 500) 2. The exception received
Original PR description
Reproduce the issue - Install eCommerce - Activate stripe, use testing credentials and select Configuration > Payment Flow > Payment from Odoo - Create a contact that has a trailing whitespace at the…
Reproduce the issue
- Install eCommerce
- Activate stripe, use testing credentials and select
Configuration > Payment Flow > Payment from Odoo
- Create a contact that has a trailing whitespace at the beginning
of the email
- Grant him portal access, and a password
- Open your browser devtools
- Login to the web shop with this portal user and buy an item using
stripe
1. Error Dialog: Server Error (HTTP 500)
2. The exception received by the front-end is not clear
3. When the 500 error is fixed, we still have a error dialog
=> bad UX
Cause
1. The raise was removed but we need to keep it because
it allows the true error to be raised (bad request)
2. The "invalid email address: x" is lost when we raise the
exception
3. In V13, all catch & guardedCatch open a error dialog if we
don't set preventDefaulted to true on the error's event
This commit changes restore the raise, use `pycompat.reraise` to change
the error message and disable the error dialog for this case.
OPW-2126196
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#41032Adapt calendar highlight option (that "highlight" event linked to the record we come from) to current JS framework data structures. opw-2131494 Forward-Port-Of: odoo/odoo#40940 Forward-Port-Of: odoo/odoo#40791
Original PR description
Adapt calendar highlight option (that "highlight" event linked to the record we come from) to current JS framework data structures. opw-2131494 Forward-Port-Of: odoo/odoo#40940 Forward-Port-Of: odoo/odoo#40791
Description of the issue/feature this PR addresses: Erroneous tax deduction percentage and obsolete taxes. Current behavior before PR: Tax "Iva al 20% detraibile 10%" is deducted at 20% Obsolete taxes 4I5a and 4I5b exist (mind the capital i). Desired behavior after PR is merged: Tax "Iva al 20% detraibile 10%" is deducted at 10% Obsolete taxes 4I5a and 4I5b do not exist (mind the capital i). -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-p
Original PR description
Description of the issue/feature this PR addresses: Erroneous tax deduction percentage and obsolete taxes. Current behavior before PR: Tax "Iva al 20% detraibile 10%" is deducted at 20% Obsolete taxes 4I5a and 4I5b exist (mind the capital i). Desired behavior after PR is merged: Tax "Iva al 20% detraibile 10%" is deducted at 10% Obsolete taxes 4I5a and 4I5b do not exist (mind the capital i). -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40796
The method to postprocess access rights add some default attribute on the main node of the view to allow/disallow creation/edition of records through the view globally. In the case of the Gantt view, it added a `delete` attribute that is, in fact, not in the correct schema of the gantt view (check the rng file if you don't believe me). This meant that in some cases, a perfectly valid view didn't pass validation because this method added illegal attributes. Forward-Port-Of: odoo/enter
Original PR description
The method to postprocess access rights add some default attribute on the main node of the view to allow/disallow creation/edition of records through the view globally. In the case of the Gantt view, it added a `delete` attribute that is, in fact, not in the correct schema of the gantt view (check the rng file if you don't believe me). This meant that in some cases, a perfectly valid view didn't pass validation because this method added illegal attributes. Forward-Port-Of: odoo/enterprise#6962
Insatll dashboard and another app with gantt view (i.e. planning). Go to planning, check out the gantt view and add to dashboard (favorites>Add to Dashboard). Go to dashboard Javascript traceback will popup. Gantt model is initialized without the control panel, so the buttons are not initialized and there is an attempt of resize that cause the issue. Switch to operate on buttons only when the control panel is defined. opw-2128190 Forward-Port-Of: odoo/enterprise#6926
Original PR description
Insatll dashboard and another app with gantt view (i.e. planning). Go to planning, check out the gantt view and add to dashboard (favorites>Add to Dashboard). Go to dashboard Javascript traceback will popup. Gantt model is initialized without the control panel, so the buttons are not initialized and there is an attempt of resize that cause the issue. Switch to operate on buttons only when the control panel is defined. opw-2128190 Forward-Port-Of: odoo/enterprise#6926
Make the module work in 13.0: Because of the ORM change, order creation failed. Add a test to make sure that everything keeps working, which proved useful. Usability improvement: To configure a site different from the main one (US), it was necessary to use a server action kowing the mapping of the ebay sites, and set up countries and currencies accordingly. It adds an easy way to configure everything from the interface, as well as baking it the ebay sites id mapping in the data. Forwar
Original PR description
Make the module work in 13.0: Because of the ORM change, order creation failed. Add a test to make sure that everything keeps working, which proved useful. Usability improvement: To configure a site different from the main one (US), it was necessary to use a server action kowing the mapping of the ebay sites, and set up countries and currencies accordingly. It adds an easy way to configure everything from the interface, as well as baking it the ebay sites id mapping in the data. Forward-Port-Of: odoo/enterprise#6914
Fine-tuning of 911b88da2516f. While it makes sense to subtract a cost (as is done on other reports) on this report the cost lines have all balance = -sum.balance. It turns out that this commit was written for a database on which b46f4bdc27de569e had not been applied, and for which the fix corrected the report. Since this report set cost lines as negative, we keep it that way. opw 2115991 Forward-Port-Of: odoo/enterprise#6889 Forward-Port-Of: odoo/enterprise#6612
Original PR description
Fine-tuning of 911b88da2516f. While it makes sense to subtract a cost (as is done on other reports) on this report the cost lines have all balance = -sum.balance. It turns out that this commit was written for a database on which b46f4bdc27de569e had not been applied, and for which the fix corrected the report. Since this report set cost lines as negative, we keep it that way. opw 2115991 Forward-Port-Of: odoo/enterprise#6889 Forward-Port-Of: odoo/enterprise#6612
Reproduce the issue - Select a language (done by default) - Install FSM - Open it Working - Reset the language - Go on FSM Traceback Cause In 7e42c663, I format the date_begin based on the user's language but did'nt know that we could have no language selected. This commit uses the `format_date` method from `odoo.tools.misc` which fallback on the first language installed if there is no language selected. OPW-2146479 Forward-Port-
Original PR description
Reproduce the issue
- Select a language (done by default)
- Install FSM
- Open it
Working
- Reset the language
- Go on FSM
Traceback
Cause
In 7e42c663, I format the date_begin based on the user's language
but did'nt know that we could have no language selected.
This commit uses the `format_date` method from `odoo.tools.misc`
which fallback on the first language installed if there is no
language selected.
OPW-2146479
Forward-Port-Of: odoo/enterprise#6938