Thursday, April 29, 2021
22 changes · master
Enhancements to existing features
Newsletter popups now display without unwanted horizontal scrolling, improving the visitor experience. The mailing list popup list is also clearer for staff, showing useful names and update dates while preventing popups from being created in the wrong place.
Original PR description
PURPOSE This are changes made in module Website Mass Maiiling 1) To remove horizontal scroll bar from newsletter popup. 2) To remove create button from website_popup_ids 3) To add display name and last updated(write_on) field in website_popup_ids SPECIFICATIONS Current 1) It show horizontal scroll bar in popup. 2) We can create newsletter popup from back-end without a anchor. 3) It only have website_id field in website_popup_ids To be 1) Remove horizontal scroll bar from newsletter popup. 2) Remove create button from website_popup_ids 3) Add display name and last updated(write_on) field in website_popup_ids LINKS PR Task 2312996 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
This mostly an issue when trying to run just the tests of `web` (aka `-iweb`) with only community modules available, `TestMenusDemoLight.test_01_click_apps_menus_as_demo`, wait for the ready code times out: AssertionError: False is not true : The ready "odoo.isReady === true" code was always falsy and the test suite fails. The ready code simply checks that `odoo.isReady` is set. The web client sets `isReady` when `webclient_started` is triggered (specifically in `_onWebClientSt
Original PR description
This mostly an issue when trying to run just the tests of `web` (aka `-iweb`) with only community modules available, `TestMenusDemoLight.test_01_click_apps_menus_as_demo`, wait for the ready code…
This mostly an issue when trying to run just the tests of `web` (aka
`-iweb`) with only community modules available,
`TestMenusDemoLight.test_01_click_apps_menus_as_demo`, wait for the
ready code times out:
AssertionError: False is not true : The ready "odoo.isReady === true" code was always falsy
and the test suite fails.
The ready code simply checks that `odoo.isReady` is set. The web
client sets `isReady` when `webclient_started` is
triggered (specifically in `_onWebClientStarted`, which is the handler
for that event).
[The community web client only triggers `webclient_started` at the end
of `doAction`][0] meaning the community client is considered ready
until after the first action has executed.
[The first action is executed by `show_application`][1] whose process
is the following:
1. load and initialize the menus
2. if an action is specified in the URL, run that
3. otherwise if the user has a home action, run that
4. otherwise run the first menu's action
When installing only `web`, the only menus which could be available
are Apps and Settings, and the demo user has access to neither. This
means the demo user has no applications, and opening the first app is
a no-op ([`openFirstApp` has a case just for that situation to ensure
it does nothing][2]). As a result, `webclient_started` is never
triggered, `_onWebClientStarted` is never called, `odoo.isReady` is
never set, and the tour never runs.
Fix by updating `openFirstApp` to return *whether* it opened an
application, and in `show_application` the last fallback if even
opening the first application failed is to just declare the web client
ready.
While at it, rewrite `show_application` using ES6 facilities and
flatten and linearize it using guards. This means the code pretty much
tracks the process described above, with one step added:
5. otherwise complete the webclient's startup
[0]: https://github.com/odoo/odoo/blob/1eb474243b55f1b9e10c70d199bbe022e68b51d0/addons/web/static/src/js/chrome/action_manager.js#L174
[1]: https://github.com/odoo/odoo/blob/d1c56ec7c435c5baba8604feccc6116e4c25ca96/addons/web/static/src/js/chrome/web_client.js#L77-L107
[2]: https://github.com/odoo/odoo/blob/e24ab17d38fb049404f04112990e8b2fe1dd7727/addons/web/static/src/js/chrome/apps_menu.js#L44-L46
Forward-Port-Of: odoo/odoo#69962Task: <a href="https://www.odoo.com/web#action=4043&cids=2&id=2391988&menu_id=4720&model=project.task&view_type=form">2391988</a> Related: odoo/enterprise#15079 Related(master): odoo/odoo#62152 Forward-Port-Of: odoo/odoo#69273 Forward-Port-Of: odoo/odoo#62711
Original PR description
Task: <a href="https://www.odoo.com/web#action=4043&cids=2&id=2391988&menu_id=4720&model=project.task&view_type=form">2391988</a> Related: odoo/enterprise#15079 Related(master): odoo/odoo#62152 Forward-Port-Of: odoo/odoo#69273 Forward-Port-Of: odoo/odoo#62711
ENT PR: https://github.com/odoo/enterprise/pull/17962 Forward-Port-Of: odoo/odoo#69026
Original PR description
ENT PR: https://github.com/odoo/enterprise/pull/17962 Forward-Port-Of: odoo/odoo#69026
Use the last version of raspberry pi os to build the IoT Box We don't hold anymore the firmware-brcm80211 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#69547
Original PR description
Use the last version of raspberry pi os to build the IoT Box We don't hold anymore the firmware-brcm80211 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#69547
When the user submits a form, a lead will be created but the language won't be the one selected by the user. To reproduce the error: (Enable debug mode) 1. Settings > Translations > Languages 2. Activate another language L_other 3. On website, add a form: - Action: Create an Opportunity 4. Add an existing field: "Language" 5. Submit the form - Language must be L_other 6. Consult the new lead Error: The language is not the selected one. OPW-2486276 Forward-Port-Of: odo
Original PR description
When the user submits a form, a lead will be created but the language
won't be the one selected by the user.
To reproduce the error:
(Enable debug mode)
1. Settings > Translations > Languages
2. Activate another language L_other
3. On website, add a form:
- Action: Create an Opportunity
4. Add an existing field: "Language"
5. Submit the form
- Language must be L_other
6. Consult the new lead
Error: The language is not the selected one.
OPW-2486276
Forward-Port-Of: odoo/odoo#69941Steps to reproduce the bug: - Let's consider a user U not in group group_system - Log with U - Create a vendor payment with payment method Checks - Print it Bug: An access error was raised because U didn't have the rights to write on model ir.sequence opw:2513014 Forward-Port-Of: odoo/odoo#70013
Original PR description
Steps to reproduce the bug: - Let's consider a user U not in group group_system - Log with U - Create a vendor payment with payment method Checks - Print it Bug: An access error was raised because U didn't have the rights to write on model ir.sequence opw:2513014 Forward-Port-Of: odoo/odoo#70013
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#69993 Forward-Port-Of: odoo/odoo#69927
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 Forward-Port-Of: odoo/odoo#69993 Forward-Port-Of: odoo/odoo#69927
Steps to reproduce the bug : - Create a French company - Go to accounting settings > in “Fiscal Localization” install French accounting - Install “l10n_ch_qriban” - Go to contacts > Configuration > Bank accounts - Create a new bank account > add a French company newly created in the “Account Holder” field Problem: The specific fields to a Swiss company appear. Solution : Check if the country of the company encoded in the “Account Holder” field is Switzerland. opw-2504699 Descr
Original PR description
Steps to reproduce the bug : - Create a French company - Go to accounting settings > in “Fiscal Localization” install French accounting - Install “l10n_ch_qriban” - Go to contacts > Configuration > Bank accounts - Create a new bank account > add a French company newly created in the “Account Holder” field Problem: The specific fields to a Swiss company appear. Solution : Check if the country of the company encoded in the “Account Holder” field is Switzerland. opw-2504699 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#69813
Scenario: - add a file in mass mailing editor => an icon is added linking the file - save - edit => the icon is replaced by a generic icon - save - send mail => no icon is shown in email received The system is using eg. `data-mimetype="pdf"` to show the icon, before 12.0 this worked but in saas-12.3 the system uses mailing.mailing body_arch's field that is sanitizing attributes and remove it on save, so the icon is only working in received email if you save one and only one time after adding f
Original PR description
Scenario: - add a file in mass mailing editor => an icon is added linking the file - save - edit => the icon is replaced by a generic icon - save - send mail => no icon is shown in email received The system is using eg. `data-mimetype="pdf"` to show the icon, before 12.0 this worked but in saas-12.3 the system uses mailing.mailing body_arch's field that is sanitizing attributes and remove it on save, so the icon is only working in received email if you save one and only one time after adding file inside the mass mailing. opw-2474053 (ticket for similar issue in 14.0) Forward-Port-Of: odoo/odoo#69907
The goal of this PR is to solve some issues with the last AppStore review. Without these changes, we are no longer able to update the mobile app on iOS. Here is a summary of the feeback we received: > **Guideline 2.5.8 - Performance - Software Requirements** > https://developer.apple.com/app-store/review/guidelines/#software-requirements > > Your app includes a dashboard view that presents multiple windows at once. > The Apple iOS Human Interface Guidelines allow multiple screens in
Original PR description
The goal of this PR is to solve some issues with the last AppStore review. Without these changes, we are no longer able to update the mobile app on iOS. Here is a summary of the feeback we received:…
The goal of this PR is to solve some issues with the last AppStore review. Without these changes, we are no longer able to update the mobile app on iOS. Here is a summary of the feeback we received: > **Guideline 2.5.8 - Performance - Software Requirements** > https://developer.apple.com/app-store/review/guidelines/#software-requirements > > Your app includes a dashboard view that presents multiple windows at once. > The Apple iOS Human Interface Guidelines allow multiple screens in an app. However, access to these screens should always be sequential, not simultaneous. > > _Next Steps_ > > To resolve this issue, please modify your app to provide an alternate way users can accomplish the same task in a single screen or sequence of screens. > > **Guideline 3.1.1 - Business - Payments - In-App Purchase** > https://developer.apple.com/app-store/review/guidelines/#in-app-purchase > > We found in our review that your app or its metadata provides access to mechanisms other than in-app purchase for purchases or subscriptions to be used in the app, which does not comply with the App Store Review Guidelines. Specifically: > Your app includes an account registration feature for businesses and organizations, which is considered access to external mechanisms for purchases or subscriptions to be used in the app. > > _Next Steps_ > > To resolve this issue, please remove features, account registrations links, and any other fully qualified links to your site that could indirectly provide access to external purchase mechanisms. > If you have any additional information to provide regarding the digital content and services in your app and how the guidelines apply to them, please reply to this message in Resolution Center and let us know. If there is information you'd like us to consider in our review of future submissions, please feel free to include it in the App Review Information section of App Store Connect. > > _Resources_ > > Learn more about our policies for apps that offer paid digital content and services. Task-ID: 2483253 Forward-Port-Of: odoo/odoo#70051 Forward-Port-Of: odoo/odoo#68351
Steps to reproduce the bug: - Let's consider a project P set with analytic account AA and company C - Allow timesheet on P - Let's consider a task T belonging to P - Set AA with comapny = False - Try to encode a timesheet on T Bug: A UserError was raised because the field company_id on account.analytic.line is required opw:2486034 Forward-Port-Of: odoo/odoo#69841
Original PR description
Steps to reproduce the bug: - Let's consider a project P set with analytic account AA and company C - Allow timesheet on P - Let's consider a task T belonging to P - Set AA with comapny = False - Try to encode a timesheet on T Bug: A UserError was raised because the field company_id on account.analytic.line is required opw:2486034 Forward-Port-Of: odoo/odoo#69841
Steps to reproduce the bug: - Go to Attendances > Manager > Attendances - Remove Check in value of an hr.attendance record A - Set Check out to A Bug: A traceback was raised opw:2513143 Forward-Port-Of: odoo/odoo#70041
Original PR description
Steps to reproduce the bug: - Go to Attendances > Manager > Attendances - Remove Check in value of an hr.attendance record A - Set Check out to A Bug: A traceback was raised opw:2513143 Forward-Port-Of: odoo/odoo#70041
Steps to reproduce the bug: - Create an accounting entry AE with $ as default currency - Add a line L1 with 10 € and a tax of 15% Bug: The added tax line was 0.75€ instead of 1.5€ opw:2510338 Forward-Port-Of: odoo/odoo#69920
Original PR description
Steps to reproduce the bug: - Create an accounting entry AE with $ as default currency - Add a line L1 with 10 € and a tax of 15% Bug: The added tax line was 0.75€ instead of 1.5€ opw:2510338 Forward-Port-Of: odoo/odoo#69920
Steps to reproduce the bug: - Create a Job Application without Applied Job - Refuse/Archive it. - Restore/Unarchive it Bug: - KeyError raised due to missing `False` in `default_stage` Fix: - Add `stage_id` if Applied Job is selected on the application. opw:2513147 Co-authored-by: simongoffin <sig@odoo.com> Forward-Port-Of: odoo/odoo#70023
Original PR description
Steps to reproduce the bug: - Create a Job Application without Applied Job - Refuse/Archive it. - Restore/Unarchive it Bug: - KeyError raised due to missing `False` in `default_stage` Fix: - Add `stage_id` if Applied Job is selected on the application. opw:2513147 Co-authored-by: simongoffin <sig@odoo.com> Forward-Port-Of: odoo/odoo#70023
Some features of the PDF.js library doesn't work in the webview of the mobile apps. Initially 'window.print' is defined as an empty function in webviews unlike browsers where it is already ready. After that, PDF.js needs to monkey patch 'window.print' and saves a reference to the original definition, which is not yet fulfilled in by the mobile app (Java part). So the print of PDF.js doesn't work in webviews and end users will need to download the file before printing it. Regarding t
Original PR description
Some features of the PDF.js library doesn't work in the webview of the mobile apps. Initially 'window.print' is defined as an empty function in webviews unlike browsers where it is already ready.…
Some features of the PDF.js library doesn't work in the webview of the mobile apps. Initially 'window.print' is defined as an empty function in webviews unlike browsers where it is already ready. After that, PDF.js needs to monkey patch 'window.print' and saves a reference to the original definition, which is not yet fulfilled in by the mobile app (Java part). So the print of PDF.js doesn't work in webviews and end users will need to download the file before printing it. Regarding the Download button, the 'download' attribute is not supported by the webview as you can see in: https://bugs.chromium.org/p/chromium/issues/detail?id=432414 As there's many ways to download a file in Odoo it's not a big deal to simply hide it in PDF.js. Because it's quite complicated to fix this, we decided to hide the features that don't work (Download / Print) or don't make sense (Open file). Note that a refactoring is already in progress in order to avoid to patch this library in master. Task-ID: 2200168 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#70092
Give a coherent group as otherwise we could have access errors. Simple case: an Admin Rights user goes into a mail message form which is only available in debug mode which sets `group.no_one` into such user. This model is only readeable by `base.group_sytem` so an AccessError will raise. So the permission should be coherent with the model access rule: https://github.com/odoo/odoo/blob/12.0/addons/mail/security/ir.model.access.csv#L30 This was introduced in https://github.com/odoo/odoo/
Original PR description
Give a coherent group as otherwise we could have access errors. Simple case: an Admin Rights user goes into a mail message form which is only available in debug mode which sets `group.no_one` into such user. This model is only readeable by `base.group_sytem` so an AccessError will raise. So the permission should be coherent with the model access rule: https://github.com/odoo/odoo/blob/12.0/addons/mail/security/ir.model.access.csv#L30 This was introduced in https://github.com/odoo/odoo/commit/f8c974cf6e1615790e83b98bce5da7370e18f68c What do you thing @tde-banana-odoo ? opw-2480998 @Tecnativa TT27189 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67621
The goal of this PR is to solve some issues with the last AppStore review. Without these changes, we are no longer able to update the mobile app on iOS. Here is a summary of the feeback we received: > **Guideline 2.5.8 - Performance - Software Requirements** > https://developer.apple.com/app-store/review/guidelines/#software-requirements > > Your app includes a dashboard view that presents multiple windows at once. > The Apple iOS Human Interface Guidelines allow multiple screens in
Original PR description
The goal of this PR is to solve some issues with the last AppStore review. Without these changes, we are no longer able to update the mobile app on iOS. Here is a summary of the feeback we received:…
The goal of this PR is to solve some issues with the last AppStore review. Without these changes, we are no longer able to update the mobile app on iOS. Here is a summary of the feeback we received: > **Guideline 2.5.8 - Performance - Software Requirements** > https://developer.apple.com/app-store/review/guidelines/#software-requirements > > Your app includes a dashboard view that presents multiple windows at once. > The Apple iOS Human Interface Guidelines allow multiple screens in an app. However, access to these screens should always be sequential, not simultaneous. > > _Next Steps_ > > To resolve this issue, please modify your app to provide an alternate way users can accomplish the same task in a single screen or sequence of screens. > > **Guideline 3.1.1 - Business - Payments - In-App Purchase** > https://developer.apple.com/app-store/review/guidelines/#in-app-purchase > > We found in our review that your app or its metadata provides access to mechanisms other than in-app purchase for purchases or subscriptions to be used in the app, which does not comply with the App Store Review Guidelines. Specifically: > Your app includes an account registration feature for businesses and organizations, which is considered access to external mechanisms for purchases or subscriptions to be used in the app. > > _Next Steps_ > > To resolve this issue, please remove features, account registrations links, and any other fully qualified links to your site that could indirectly provide access to external purchase mechanisms. > If you have any additional information to provide regarding the digital content and services in your app and how the guidelines apply to them, please reply to this message in Resolution Center and let us know. If there is information you'd like us to consider in our review of future submissions, please feel free to include it in the App Review Information section of App Store Connect. > > _Resources_ > > Learn more about our policies for apps that offer paid digital content and services. Task-ID: 2483253 Forward-Port-Of: odoo/enterprise#18025 Forward-Port-Of: odoo/enterprise#17296
Purpose ======= Using py-spy to generate flame graphs, we noticed that some chunks of code were using too many resources compared to other parts of the code. Here, you can see the old vs the new flamegraphs  What has been done: - Generate all the payslips at once after having gathered all the values - Disable the tracking when generating the pa
Original PR description
Purpose ======= Using py-spy to generate flame graphs, we noticed that some chunks of code were using too many resources compared to other parts of the code. Here, you can see the old vs the new flamegraphs  What has been done: - Generate all the payslips at once after having gathered all the values - Disable the tracking when generating the payslips - Optimize the SQL request to count the rights to benefits - Compute all the intervals in a single call to _attendance_intervals_batch by calendar, instead of doing it one by one. This results into a execution time to 1/ Create and 2/ Compute 620 payslips on odoo.com from 12-15 mins, to 6 minutes. TaskID: 2516829 Forward-Port-Of: odoo/enterprise#17996 Forward-Port-Of: odoo/enterprise#17961
Before this fix, when a measure was added with an unsupported aggregate, the cell was put in error with the incorrect error. After this fix, the cell is still put in error but with the correct message. Forward-Port-Of: odoo/enterprise#17987 Forward-Port-Of: odoo/enterprise#17980
Original PR description
Before this fix, when a measure was added with an unsupported aggregate, the cell was put in error with the incorrect error. After this fix, the cell is still put in error but with the correct message. Forward-Port-Of: odoo/enterprise#17987 Forward-Port-Of: odoo/enterprise#17980
- The payment form was not auto-filled with the partner name if they were logged in. - Hitting the submit button before that the signature widget was fully loaded would raise a traceback. COM PR: https://github.com/odoo/odoo/pull/69026 Forward-Port-Of: odoo/enterprise#17962
Original PR description
- The payment form was not auto-filled with the partner name if they were logged in. - Hitting the submit button before that the signature widget was fully loaded would raise a traceback. COM PR: https://github.com/odoo/odoo/pull/69026 Forward-Port-Of: odoo/enterprise#17962
What are the steps to reproduce your issue ? 1. install 'l10n_be' and 'account_sepa' 2. With belgian company create new Payements (Send Money) 3. Payment Method: SEPA Credit Transfer 4. Create new batch 5. Remove the country from belgian company 6. Try to validate this batch What is currently happening ? Traceback is raised 'TypeError: Argument must be bytes or unicode, got 'bool'' Why is this happening ? The country_id is undefined, so the `co
Original PR description
What are the steps to reproduce your issue ?
1. install 'l10n_be' and 'account_sepa'
2. With belgian company create new Payements (Send Money)
3. Payment Method: SEPA Credit Transfer
4. Create new batch
5. Remove the country from belgian company
6. Try to validate this batch
What is currently happening ?
Traceback is raised 'TypeError: Argument must be bytes or unicode, got 'bool''
Why is this happening ?
The country_id is undefined, so the `country.code == False`
How to fix the bug ?
Add a validation error before batch creation if no country_id
opw-2476659
Forward-Port-Of: odoo/enterprise#17983