Thursday, January 14, 2021
26 changes · master
Enhancements to existing features
Receipt operations now use the purchase order line description instead of only the internal product name. This makes it easier for warehouse and purchasing teams to compare vendor delivery slips with received goods, including vendor product names and references when available.
Original PR description
In order to easily compare delivery slip from vendor and receipt, vendor product name and reference should be visible on the receipt operations. The receipt description was just the name of the product before, it is now taking the same description as the PO line, using vendor product name and reference if it exists. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can no longer repeatedly click the same form action button while an action is still running. This helps avoid duplicate actions, reduces accidental repeated processing, and makes form behavior more consistent.
Original PR description
Purpose ======= Before, users can spam click a action button and it will trigger many actions. In the form view, we disable the buttons of the status bar after clicking on it (and re-activate them when the action is done) but we do not do that for the standard action buttons. So now, the users should wait the end of the action before re-clicking on the same button. Task 2409395
Tags using the default color now display text more cleanly, reducing the chance that the bottom of letters appears cut off. Their border has also been softened for a lighter, more polished appearance.
Original PR description
To improve the display of tags, we are increasing slightly the size of the line in the tag to avoid cutting the bottom of some letters, as well as making the color of the border lighter. Task id #2368889 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When an accounting entry is posted with a date before the tax lock date, Odoo now sets the accounting date to the current day instead of the day after the lock date. This helps preserve the correct order of accounting records and avoids chronology issues caused by automatic date adjustments.
Original PR description
When posting an account move before the tax lock date, Odoo will automatically set its accounting date to the lock date + 1. This can cause the chronology to be broken, which is not something we want when automatically setting the date. This will change that behavior to set the accounting date to today in such case. Task id #2411150 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo now avoids running company lookup services on generic email providers, helping prevent misleading company matches from addresses like common webmail domains. Partner autocomplete calls can also use configurable timeouts, improving control over external data requests without changing the default behavior.
Payroll managers are no longer automatically granted full time-off manager rights; they now receive standard time-off user access by default. This improves access control while making the Time Off information shown in Payroll easier to use for payroll teams.
Original PR description
…ort in payroll Before this commit, the payroll manager was automatically a time-off manager. It is now only a time-off user by default. This commit slightly improves also the UX of Time Off integration in Payroll. taskid: 2418315
Social app settings and posting screens were simplified so most users see fewer advanced options and clearer labels. Developer-account configuration for social networks is now less prominent, and push notification timezone behavior is simplified by default to reduce confusion.
Original PR description
This commit intends to give less visibility to some of the advanced features of social to avoid confusing the majority of our users base. Notably: - Move all "configure your own Facebook/Twitter/LinkedIn dev account" to debug mode. As it will work out of the box for saas/enterprise contracts holders. - Disable "use_visitors_timezone" by default and remove it when sending "now". As it requires a knowledge of timezones and will not be needed for most of the push notifications usage. In addition, we made some "back2basics" changes: - Reworked some settings layouts / labels - Simplified some social.post form view labels Task-2415790
Resolved issues and error corrections
When a website view is created, Odoo now reliably assigns it to the website currently in use and prevents mismatches. This avoids accidental extra generic views and helps keep website-specific content organized correctly.
Original PR description
SOC for ir.ui.view creation. If a view is created without a website_id, it should get one if one is present in the context. Also check that an explicit website_id in create values matches the one in the context. Note: it was already the case but kinda by chance and not entirely correct. Most of the time, the 'arch' field was specified as a creation value... and as it is a computed field with an inverse method, a COW was triggered. But this had also the inconvenient of creating an extra generic view without any arch.
Miscellaneous changes
If a user has no access to Invoicing module, he can not send and print his invoices. To reproduce the error: (Need sale_management,account) 1. Connect with admin account 2. Settings > Users & Companies 3. Create/Edit a salesman - Remove access rights to Invoicing module 4. Connect with this user 5. Create & Confirm a SO 6. Edit the SO and fill in the "Delivered" field, Save 7. Click on "Create Invoice", "Create Invoice" 7. Connect with admin account 8. Invoicing > Go to the previo
Original PR description
If a user has no access to Invoicing module, he can not send and print his invoices. To reproduce the error: (Need sale_management,account) 1. Connect with admin account 2. Settings > Users & Companies 3. Create/Edit a salesman - Remove access rights to Invoicing module 4. Connect with this user 5. Create & Confirm a SO 6. Edit the SO and fill in the "Delivered" field, Save 7. Click on "Create Invoice", "Create Invoice" 7. Connect with admin account 8. Invoicing > Go to the previously created invoice 9. Confirm it 10. Connect with the user account 11. Sales > previously created SO > "1 Invoices" => The user can read the invoice, but he can not send and print it. This is an error. OPW-2389428 Forward-Port-Of: odoo/odoo#62188
When the name of a partner contains a regular expression operator, such as grouping parenthesis, `+`, `*`, brackets... the resulting regexp may match wrong names or worse be invalid and lead to an exception. With this commit, we create a regular expression from only the words formed from at least 3 of ~`[a-zA-Z0-9]`~ `\w`, ignoring all other characters, including those who may have a meaning in a regular expression. This avoids these issues: - regexp injection (security issue) - punctuat
Original PR description
When the name of a partner contains a regular expression operator, such as grouping parenthesis, `+`, `*`, brackets... the resulting regexp may match wrong names or worse be invalid and lead to an…
When the name of a partner contains a regular expression operator, such as grouping parenthesis, `+`, `*`, brackets... the resulting regexp may match wrong names or worse be invalid and lead to an exception. With this commit, we create a regular expression from only the words formed from at least 3 of ~`[a-zA-Z0-9]`~ `\w`, ignoring all other characters, including those who may have a meaning in a regular expression. This avoids these issues: - regexp injection (security issue) - punctuation resulting in erroneous regular expression (`"ABC + SPRL"` resulted in `"(?=.*ABC.*)(?=.*+.*)(?=.*SPRL.*)"` which is invalid at the `".*+"` part) - false positives due to words that are too small (~`\b`~`\y` were added, and the minimal matching word size is 3) - accentuation mismatch (both sides are filtered through `unaccent`) - special cases in unicode that have a special behavior with `lower()`. See the discussion on #63145 for a detailled explaination about these issues. [OPW-2360687](https://www.odoo.com/web#id=2360687&model=project.task) Forward-Port-Of: odoo/odoo#63145
closes odoo/odoo#63969 Manual forward-port of 755bdbeb04a769bf1fcf9157f74d6a5deb4ad48d Forward-Port-Of: odoo/odoo#64517
Original PR description
closes odoo/odoo#63969 Manual forward-port of 755bdbeb04a769bf1fcf9157f74d6a5deb4ad48d Forward-Port-Of: odoo/odoo#64517
If an email was sent with empty "To:" and a proper alias in "CC:" (or any of the similar valid headers that conform the `rpc_tos_localparts` array), before 40ae36b7f8c412cd96dc9592d8d1fb90de1e52d2 the email wouldn't get rejected. After that commit it would get bounced. This comes from the not-so-obvious new python idiom used, `all()`. Check this out: ```python >>> all([False]) False >>> all([]) True ``` So, apart from the fix introduced in that commit, which seems valid, we have to
Original PR description
If an email was sent with empty "To:" and a proper alias in "CC:" (or any of the similar valid headers that conform the `rpc_tos_localparts` array), before 40ae36b7f8c412cd96dc9592d8d1fb90de1e52d2 the email wouldn't get rejected. After that commit it would get bounced. This comes from the not-so-obvious new python idiom used, `all()`. Check this out: ```python >>> all([False]) False >>> all([]) True ``` So, apart from the fix introduced in that commit, which seems valid, we have to make sure `email_to_localparts` actually has contents. Otherwise we are producing false bounces here. @Tecnativa TT23437 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49656
Since odoo/enterprise@937b9214cbe92a6e0c0f14acb6c9bfebf9125a06, studio has a dependency on web_studio to auto remove customization on studio uninstall. This adds as side effect to mark `studio_customization` with a `to_upgrade` state when any of its dependency is updated (-u all). Unfortunately module `studio_customization` is not updatable, leading to a state remaining in `to upgrade` after registry loading, locking cron execution. This fix adds an excplicit and not very elegant condi
Original PR description
Since odoo/enterprise@937b9214cbe92a6e0c0f14acb6c9bfebf9125a06, studio has a dependency on web_studio to auto remove customization on studio uninstall. This adds as side effect to mark `studio_customization` with a `to_upgrade` state when any of its dependency is updated (-u all). Unfortunately module `studio_customization` is not updatable, leading to a state remaining in `to upgrade` after registry loading, locking cron execution. This fix adds an excplicit and not very elegant condition on module name to filter module `studio_customization` when resolving depedencies in button_upgrade. A cleaner fix would be to use the `imported` flag. Anyway this may break other behaviours and is to risky in stable and will be experimented in master. Slightly linked to closed #43880 Forward-Port-Of: odoo/odoo#64523
This merge prepares the ground for the restoration of the "backbutton" support for OWL components in enterprise in odoo/enterprise#15731. Related to task ID: 2347640 Forward-Port-Of: odoo/odoo#64465
Original PR description
This merge prepares the ground for the restoration of the "backbutton" support for OWL components in enterprise in odoo/enterprise#15731. Related to task ID: 2347640 Forward-Port-Of: odoo/odoo#64465
Impacted versions : - 14.0 and higher Steps to reproduce : ``` 1. generate an odoo.exceptions.RedirectWarning 2. click on the primary button ``` Current behavior : ``` 1. the action (argument of the RedirectWarning) is properly executed 2. the WarningDialog is not closed ``` Expected behavior : ``` 1. the action should still be properly executed 2. the WarningDialog should be closed ``` Tests : Added a test to ensure this behavior will not be overwritten in the future.
Original PR description
Impacted versions : - 14.0 and higher Steps to reproduce : ``` 1. generate an odoo.exceptions.RedirectWarning 2. click on the primary button ``` Current behavior : ``` 1. the action (argument of the…
Impacted versions : - 14.0 and higher Steps to reproduce : ``` 1. generate an odoo.exceptions.RedirectWarning 2. click on the primary button ``` Current behavior : ``` 1. the action (argument of the RedirectWarning) is properly executed 2. the WarningDialog is not closed ``` Expected behavior : ``` 1. the action should still be properly executed 2. the WarningDialog should be closed ``` Tests : Added a test to ensure this behavior will not be overwritten in the future. The test is for the CrashManager service, and evaluates the following sequence : ``` Entry: CrashManager receives a odoo.exceptions.RedirectWarning (code 200) via rpc_error Asserts: - The RedirectWarning modal (WarningDialog) should be opened * Upon clicking on the primary button : - The modal should be closed - The action passed as an argument of the odoo.exceptions.RedirectWarning should be executed ``` Origin : the incorrect behavior was introduced with : https://github.com/odoo/odoo/commit/b3d9647695065ea582e4a6b0603f3ebf9fde6976 Task ID: 2430100 Forward-Port-Of: odoo/odoo#64290
Before this commit, if the user had a fiscal position for his current country, it wouldn't be used to compute the price of the products on the eshop. Note that: - the price would be correct on the cart, as those prices are coming from a sale order which correctly retrieves the fiscal position. - if the fiscal position is directly set on the partner, prices are correct on the eshop Step to reproduce: - Set Belgium as country on Portal user's partner - Create a 0% tax an
Original PR description
Before this commit, if the user had a fiscal position for his current country, it wouldn't be used to compute the price of the products on the eshop. Note that: - the price would be correct on the…
Before this commit, if the user had a fiscal position for his current country,
it wouldn't be used to compute the price of the products on the eshop.
Note that:
- the price would be correct on the cart, as those prices are coming from a
sale order which correctly retrieves the fiscal position.
- if the fiscal position is directly set on the partner, prices are correct
on the eshop
Step to reproduce:
- Set Belgium as country on Portal user's partner
- Create a 0% tax and a 15% tax
- Create a fiscal position mapping 15% tax to 0% tax for Belgium country
automatically detected
- Create a product with 1000$ price and 15% tax set on it
- Enable pricelist and select tax included in settings
- Create a pricelist for Belgium and add a rule for the product you created
to set a fixed price of 500$
- Now visit eshop with Portal user
The test product show 575$ instead of 500$ in eshop, while it will correctly
show 500$ in cart.
opw-2423215
Forward-Port-Of: odoo/odoo#64539
Forward-Port-Of: odoo/odoo#64477This merge reimplements the `useBackButton` OWL hook to adapt for two typical implementation requirements : - bind the activation/deactivation of the back-button to the mount/unmount of the component - bind the activation/deactivation of the back-button to a given method reflecting a meaningful condition for the component implementing it. Typically, a boolean state's property. Also, this merge restore the "backbutton" support for some specific components: * `OwlDialog` * `Pop
Original PR description
This merge reimplements the `useBackButton` OWL hook to adapt for two typical implementation requirements : - bind the activation/deactivation of the back-button to the mount/unmount of the component - bind the activation/deactivation of the back-button to a given method reflecting a meaningful condition for the component implementing it. Typically, a boolean state's property. Also, this merge restore the "backbutton" support for some specific components: * `OwlDialog` * `Popover` * `ControlPanel` mobile search view. Related to task ID: 2347640 Related to task ID: 2148384 Forward-Port-Of: odoo/enterprise#15731
Purpose ======= The administrators access rights are needed to access the ir.ui.view model now. Forward-Port-Of: odoo/enterprise#15728
Original PR description
Purpose ======= The administrators access rights are needed to access the ir.ui.view model now. Forward-Port-Of: odoo/enterprise#15728
Current behavior before PR: when try to see activity in fsm list view, it does not show any activity. but for this record, if you check in kanban view, it shows activity. Desired behavior after PR is merged: in list view, it also shows activity. LINKS PR https://github.com/odoo/enterprise/pull/15477 Task-2422724 Forward-Port-Of: odoo/enterprise#15477
Original PR description
Current behavior before PR: when try to see activity in fsm list view, it does not show any activity. but for this record, if you check in kanban view, it shows activity. Desired behavior after PR is merged: in list view, it also shows activity. LINKS PR https://github.com/odoo/enterprise/pull/15477 Task-2422724 Forward-Port-Of: odoo/enterprise#15477
Before this commit, when the solfact web-service for sign or cancel responses with an error status (for example, credential errors), a traceback was raised. Now, the error is well managed, and correctly shown to the user. List of solfact answers error status : https://solucionfactible.com/sfic/capitulos/timbrado/ws-timbrado-cancelar.jsp https://solucionfactible.com/sfic/capitulos/timbrado/ws-timbrado-timbrar.jsp opw-2438575 Forward-Port-Of: odoo/enterprise#15741
Original PR description
Before this commit, when the solfact web-service for sign or cancel responses with an error status (for example, credential errors), a traceback was raised. Now, the error is well managed, and correctly shown to the user. List of solfact answers error status : https://solucionfactible.com/sfic/capitulos/timbrado/ws-timbrado-cancelar.jsp https://solucionfactible.com/sfic/capitulos/timbrado/ws-timbrado-timbrar.jsp opw-2438575 Forward-Port-Of: odoo/enterprise#15741
Steps to reproduce the bug: - Install website_helpdesk - Go to the website Bug: The menu help was not displayed opw:2426396 Forward-Port-Of: odoo/enterprise#15747
Original PR description
Steps to reproduce the bug: - Install website_helpdesk - Go to the website Bug: The menu help was not displayed opw:2426396 Forward-Port-Of: odoo/enterprise#15747
Purpose ======= It shows a field to set a percentage. Write 95 -> It corresponds to 0.95 percents The way the information is displayed, we expect a float. Forward-Port-Of: odoo/enterprise#15643
Original PR description
Purpose ======= It shows a field to set a percentage. Write 95 -> It corresponds to 0.95 percents The way the information is displayed, we expect a float. Forward-Port-Of: odoo/enterprise#15643
Forward-Port-Of: odoo/enterprise#15709 Forward-Port-Of: odoo/enterprise#15699
Original PR description
Forward-Port-Of: odoo/enterprise#15709 Forward-Port-Of: odoo/enterprise#15699
An error should be raised when someone sign the salary configurator if the car is not available anymore. Before this commit, the check for available car based on the driver was wrong. Use the _get_available_vehicles_domain to check if the car taken is still available when the salary configurator is signed. Forward-Port-Of: odoo/enterprise#15704 Forward-Port-Of: odoo/enterprise#15697
Original PR description
An error should be raised when someone sign the salary configurator if the car is not available anymore. Before this commit, the check for available car based on the driver was wrong. Use the _get_available_vehicles_domain to check if the car taken is still available when the salary configurator is signed. Forward-Port-Of: odoo/enterprise#15704 Forward-Port-Of: odoo/enterprise#15697
This commit adds automatic next activities creation in order to help HR people not to forget to send reports to belgian instances. Covered cases: * Dimona: New employee * ELO: Part time * eDRS: Brest feeding, long time sickness, maternity/paternity leave, small unemployment unpredictable time off, youth time off This commit also introduces a new type of hr.work.entry.type and hr.leave.type in order to handle Work Accident leaves. task-2394438 Forward-Port-Of: odoo/enterpr
Original PR description
This commit adds automatic next activities creation in order to help HR people
not to forget to send reports to belgian instances.
Covered cases:
* Dimona: New employee
* ELO: Part time
* eDRS: Brest feeding, long time sickness, maternity/paternity leave, small unemployment
unpredictable time off, youth time off
This commit also introduces a new type of hr.work.entry.type and hr.leave.type in order
to handle Work Accident leaves.
task-2394438
Forward-Port-Of: odoo/enterprise#15620
Forward-Port-Of: odoo/enterprise#15614The HMRC buttons does not appear anymore on the UK tax report. The reason is that in a recent commit aiming to imporve the code, it checks weither the country_code of the company is "UK" while the actual code of the United Kingdom is "GB" task id #2412388 Forward-Port-Of: odoo/enterprise#15154
Original PR description
The HMRC buttons does not appear anymore on the UK tax report. The reason is that in a recent commit aiming to imporve the code, it checks weither the country_code of the company is "UK" while the actual code of the United Kingdom is "GB" task id #2412388 Forward-Port-Of: odoo/enterprise#15154