Daily updates from Odoo
Navigate
Branch
Tuesday, May 16, 2023
25 changes
Enhancements to existing features
The appointment onboarding setup now includes the image filename so the file widget can display the file without showing unnecessary file size details. This makes the setup experience cleaner and easier to understand for users configuring appointments.
Original PR description
Used to not show file size on the file widget. Task-3297572.
The pull request updates internal test counters for enterprise mail and SMS performance checks so they match the current automated testing environment. This helps keep validation reliable after recent platform and mail organization changes, with no direct impact on end users.
Original PR description
Update counters to match current runbot state. Several changes (ORM, mail code organization) lead to some counters being obsolete. Task-3322905
This update reorganizes mail and SMS testing so related checks can share a more complete setup. It adds performance-oriented tests and consolidates smaller mobile and notification test files, helping future changes be validated more reliably without affecting end users directly.
Managers can now validate timesheets for the current day, making daily approval workflows more flexible. Users can also continue entering time today even if the latest validation happened today, and the message shown when there is nothing to validate is clearer.
Original PR description
* Allow today's timesheet validation. * Allow users to timesheet today, even if last validation is today. * Adapt Error Message when no timesheet to validate. task-3284604
Resolved issues and error corrections
The automated walkthrough used to check the Project app has been updated after recent interface changes caused it to fail. This helps keep project features reliably tested and reduces the risk of regressions reaching users.
Original PR description
Before this commit, the `project_enterprise_tour` JS tour failed due to some recent changes (new design and auto resize hook used for task name field). This commit fixes the `project_enterprise_tour` to be able to test project app with that JS tour. runbot-20763
HR teams can now run salary simulations for part-time work without first changing an employee contract or manually creating a payslip. This makes compensation planning faster and less error-prone when assessing reduced working schedules.
Original PR description
Purpose ======= There is no easy way to make a partial simulation without having to create manually a payslip after having modified the contract itself.
Fixed an issue where Knowledge template options were incorrectly shown in HTML fields across Odoo. Users will now only see these template choices where they are relevant, reducing confusion in other areas.
Original PR description
This commit fixes a bug where the options to load templates would appear in every html field inside Odoo. This bug is caused by the patch inside `knowledge_article_html_field` which assigned the component to htmlField directly instead of using a brand new object. This commit fixes the bug by creating a new Object based on htmlField using the Object.create() function. task-3326611
Features or functions removed from Odoo
Subscription sales order lines no longer keep a separate pricing reference. Subscription duration and units now follow the sales order recurrence, making subscription pricing behavior more consistent and easier to manage.
Original PR description
In this commit, we removed the pricing_id field from the sales order line
model.
Technical:
Duration and Unit will come according to the recurrence of sale order, earlier it
was coming according to the recurrence of pricing_id.
task-3251442Code cleanup and technical improvements
Enterprise modules were updated to align with the removal of older search view code in the core platform. This keeps Project Sharing, Spreadsheet Edition, and Web Enterprise compatible with the latest interface architecture without changing day-to-day business workflows.
Original PR description
Some legacy models/components related to the search view have been removed https://github.com/odoo/odoo/pull/121433. We adapt the enterprise code to that change.
Financial reports have been rebuilt on Odoo's newer interface framework, making them easier to maintain and customize. This also separates on-screen report layouts from PDF printing layouts, helping future changes to each format be handled more reliably.
Original PR description
### [REF] account_reports: conversion to owl This commit converts account_reports to owl. Here is a list of the main components: * **AccountReportController** is the main component. It is in charge…
### [REF] account_reports: conversion to owl This commit converts account_reports to owl. Here is a list of the main components: * **AccountReportController** is the main component. It is in charge of all the heavy lifting like getting the data from the database (with get_report_information), keeping the data well formatted with getters/setters functions, offering a bunch of helpers functions and managing functions useful for other components (line visibility, footnotes, etc). * **AccountReport** represent an account report (duh). Its main function is to construct the report. It is the one that calls AccountReportController to get the data and make it available on other components. It is also in charge of the overriding of components and templates that allows reports to be fully customizable. To override a component you can use the `_get_custom_display_config` hook function defined in `account_reports.py`. * **AccountReportFilters** is in charge of managing all the filters available on an account report. * **AccountReportHeader** is the table header of a report. It can manage all column interactions such as sorting. * **AccountReportLine** represents a table row of a report (expect the ones on the table header). It also manage the debug popover. * **AccountReportLineName** represents the cell on the far left of a table row. It manages the load more, the caret options and the foldable of a line. * **AccountReportLineCell** represents all other cells of a table row. It is in charge of the auditable functionality and the edition of manual values. As said, those are only the main components. There is a few more used for more specific stuff. This commit also separates the templates used for the display of account reports in the web client and the templates used for pdf printing. The pdf templates can be overriden the same way as the components by using the `_get_custom_display_config` hook function on `account_reports.py`.
Miscellaneous changes
Have a <setting> inside a innergroup ```xml <form><group><group> <setting .... /> </group></group></form> ``` Before this commit, opening that form view in studio triggered a crash because of props validation. The setting component received the studioXpath props, but was not set for it Now, the setting component in studio accepts that props, yet it is not used. There is no crash anymore. Note that there is no handler to customize settings, so that node in studio is inert. tas
Original PR description
Have a <setting> inside a innergroup
```xml
<form><group><group>
<setting .... />
</group></group></form>
```
Before this commit, opening that form view in studio triggered a crash because of props validation. The setting component received the studioXpath props, but was not set for it
Now, the setting component in studio accepts that props, yet it is not used. There is no crash anymore. Note that there is no handler to customize settings, so that node in studio is inert.
task-3305800
Forward-Port-Of: odoo/enterprise#41009Forward-Port-Of: odoo/enterprise#39811 Forward-Port-Of: odoo/enterprise#36566
Original PR description
Forward-Port-Of: odoo/enterprise#39811 Forward-Port-Of: odoo/enterprise#36566
### Closed because the problematic code was removed in 16.3 (master) OdooEditor `observerUnactive` method allows no arguments, and in that case it adds a lock with the value `undefined`. The code handling "pending" `Behavior` locks was not protected against such values, resulting in an error if an unnamed lock was present during an editor reset. Task-3326779 Forward-Port-Of: odoo/enterprise#41058
Original PR description
### Closed because the problematic code was removed in 16.3 (master) OdooEditor `observerUnactive` method allows no arguments, and in that case it adds a lock with the value `undefined`. The code handling "pending" `Behavior` locks was not protected against such values, resulting in an error if an unnamed lock was present during an editor reset. Task-3326779 Forward-Port-Of: odoo/enterprise#41058
Forward-Port-Of: odoo/enterprise#35600
Original PR description
Forward-Port-Of: odoo/enterprise#35600
Forward-Port-Of: odoo/enterprise#41113 Forward-Port-Of: odoo/enterprise#40284
Original PR description
Forward-Port-Of: odoo/enterprise#41113 Forward-Port-Of: odoo/enterprise#40284
In sign it is possible to add automatic filled fields, however it's easy to misconfigure the field by typing it the wrong way. This commit adds a constraint that checks if the defined automatic field actually exists, otherwise throwing a validation error for the user. closes #21541 Forward-Port-Of: odoo/enterprise#41067 Forward-Port-Of: odoo/enterprise#41002
Original PR description
In sign it is possible to add automatic filled fields, however it's easy to misconfigure the field by typing it the wrong way. This commit adds a constraint that checks if the defined automatic field actually exists, otherwise throwing a validation error for the user. closes #21541 Forward-Port-Of: odoo/enterprise#41067 Forward-Port-Of: odoo/enterprise#41002
The tests changed by this commit all had hardcoded dates for a variable that: - was required to be in the future due to the planning of workorders never being in the past by default (i.e. https://github.com/odoo/odoo/blob/0a575beab0b7001e61cff8db080cad46a0f6596f/addons/mrp/models/mrp_production.py#LL1211C66-L1211C66 ) - could not be on a Saturday/Sunday by default since the planning involves using a resource.calendar.leave Therefore this is fixed by avoiding a specific hardcoded date (so t
Original PR description
The tests changed by this commit all had hardcoded dates for a variable that: - was required to be in the future due to the planning of workorders never being in the past by default (i.e. https://github.com/odoo/odoo/blob/0a575beab0b7001e61cff8db080cad46a0f6596f/addons/mrp/models/mrp_production.py#LL1211C66-L1211C66 ) - could not be on a Saturday/Sunday by default since the planning involves using a resource.calendar.leave Therefore this is fixed by avoiding a specific hardcoded date (so that we don't have to keep extending the date every few years) + ensuring that we can plan workorders even on weekends using the existing helper method `full_availability()` Forward-Port-Of: odoo/enterprise#41102 Forward-Port-Of: odoo/enterprise#41076
Steps to reproduce: - Install l10n_co_reports and switch to the Colobian company. - Create and post a vendor bill for a partner using an account that starts with 2365 (but different from 236505). - Repeat for a second partner. - Open the 'Certificado de Retención en Fuente'. - Leave all partners folded and click on 'PDF'. Observed behavior: The PDF contains all the partners. Desired behavior: The file should only contain the unfolded partners. This is because Colombian exports do
Original PR description
Steps to reproduce: - Install l10n_co_reports and switch to the Colobian company. - Create and post a vendor bill for a partner using an account that starts with 2365 (but different from 236505). - Repeat for a second partner. - Open the 'Certificado de Retención en Fuente'. - Leave all partners folded and click on 'PDF'. Observed behavior: The PDF contains all the partners. Desired behavior: The file should only contain the unfolded partners. This is because Colombian exports do not use the generic `export_to_pdf()` method, which in trun calls `_filter_out_folded_children()` on the results of the `_get_lines()`. The solution is simply to manually call `_filter_out_folded_children()` in the Colombian export method. opw-3265460 Forward-Port-Of: odoo/enterprise#41068
Syncronizing orders with external API is always tricky. That's why `sale_amazon` has a mechanism to skip orders that cannot be processed. One of such cases was caught by sentry: the order data misses ShippingAddress (it has empty BuyerInfo as well). Since we ignore such orders, warning logs should be enough. https://online.sentry.io/issues/3949720409/ Forward-Port-Of: odoo/enterprise#40996
Original PR description
Syncronizing orders with external API is always tricky. That's why `sale_amazon` has a mechanism to skip orders that cannot be processed. One of such cases was caught by sentry: the order data misses ShippingAddress (it has empty BuyerInfo as well). Since we ignore such orders, warning logs should be enough. https://online.sentry.io/issues/3949720409/ Forward-Port-Of: odoo/enterprise#40996
Steps to reproduce: 1- Create a BOM for a product, define an Operation on the product 2- Link a Google Slides document to the Operation as the Operation Worksheet. 3- Define an instruction on the Operation 4- Set Step Document to Specific Page of Operation Worksheet and define a page. Issue: The step will not load the document. Cause: tablet.js passes the wrong value to let know the viewer is a google slide url. Also when the good value is passed the viwer always show the first page. Tha
Original PR description
Steps to reproduce: 1- Create a BOM for a product, define an Operation on the product 2- Link a Google Slides document to the Operation as the Operation Worksheet. 3- Define an instruction on the Operation 4- Set Step Document to Specific Page of Operation Worksheet and define a page. Issue: The step will not load the document. Cause: tablet.js passes the wrong value to let know the viewer is a google slide url. Also when the good value is passed the viwer always show the first page. That's because the SlideViewer has the page set in the setup() method so it never change despite we change the step in the same document. linked PR: https://github.com/odoo/odoo/pull/113727 opw-3165142 Forward-Port-Of: odoo/enterprise#37558
html2canvas is an external library that makes image. That image gets wrong offset for RTL. Fix it by adjusting `x` option. STEPS: * Change Language to Arabic. * Upload Template to sign. * Add signature Field. * Send or sign now the template. * Add your signature with frame. opw-3222276 Forward-Port-Of: odoo/enterprise#40530
Original PR description
html2canvas is an external library that makes image. That image gets wrong offset for RTL. Fix it by adjusting `x` option. STEPS: * Change Language to Arabic. * Upload Template to sign. * Add signature Field. * Send or sign now the template. * Add your signature with frame. opw-3222276 Forward-Port-Of: odoo/enterprise#40530
Documents uploaded by a public user via a share historically had the record created as if it was done by the user who created the share. This behavior was kept when `upload_attachment` was modified in 3045852, but the recordset containing all created documents was itself not linked to the share create_uid. This caused a problem when trying to post a notification with `message_post`. Task-3324685 Forward-Port-Of: odoo/enterprise#40983
Original PR description
Documents uploaded by a public user via a share historically had the record created as if it was done by the user who created the share. This behavior was kept when `upload_attachment` was modified in 3045852, but the recordset containing all created documents was itself not linked to the share create_uid. This caused a problem when trying to post a notification with `message_post`. Task-3324685 Forward-Port-Of: odoo/enterprise#40983
**Current behavior before PR:** In social stream post kanban view synchronize button does not work properly, after clicking on it, will freeze and multiple clicks are possible at a time on it so it generates a bad query also if there is no social stream then also synchronize button will appear. After this PR, the spin icon will show and the button will be disabled during the synchronization process, and synchronize button will be hidden, if there is no social stream. **Task**-3262102 For
Original PR description
**Current behavior before PR:** In social stream post kanban view synchronize button does not work properly, after clicking on it, will freeze and multiple clicks are possible at a time on it so it generates a bad query also if there is no social stream then also synchronize button will appear. After this PR, the spin icon will show and the button will be disabled during the synchronization process, and synchronize button will be hidden, if there is no social stream. **Task**-3262102 Forward-Port-Of: odoo/enterprise#41004 Forward-Port-Of: odoo/enterprise#40142
task - 3175879 Forward-Port-Of: odoo/enterprise#40868 Forward-Port-Of: odoo/enterprise#37775
Original PR description
task - 3175879 Forward-Port-Of: odoo/enterprise#40868 Forward-Port-Of: odoo/enterprise#37775
Steps to reproduce: - create a db with the chilean localisation - try to set an incoming server with `DTE server` and `Outlook OAuth Authentication` - save Issue: Raise User Error Cause: We do not consider the new server types Solution: Based on https://github.com/odoo/odoo/blob/ee615569074b9f60b65df18c3f67f9771ce5a2a7/addons/microsoft_outlook/models/fetchmail_server.py#L64-L69 and https://github.com/odoo/odoo/blob/87c682c1dfc8116f9a35f31c80a75502d00894e1/addons/google_gmail/mod
Original PR description
Steps to reproduce: - create a db with the chilean localisation - try to set an incoming server with `DTE server` and `Outlook OAuth Authentication` - save Issue: Raise User Error Cause: We do not consider the new server types Solution: Based on https://github.com/odoo/odoo/blob/ee615569074b9f60b65df18c3f67f9771ce5a2a7/addons/microsoft_outlook/models/fetchmail_server.py#L64-L69 and https://github.com/odoo/odoo/blob/87c682c1dfc8116f9a35f31c80a75502d00894e1/addons/google_gmail/models/fetchmail_server.py#L48-L53 and https://www.odoo.com/documentation/16.0/administration/maintain/azure_oauth.html#api-permissions We can safely say that when Gmail OAuth Authentication and Outlook OAuth Authentication are set, we set an imap server opw-3244567 Forward-Port-Of: odoo/enterprise#40810