Daily updates from Odoo
Navigate
Branch
Thursday, January 9, 2020
41 changes
New functionality added to Odoo
This update adds a new user interface library foundation and supporting tools that make Odoo’s web screens easier to build, test, and maintain. It also introduces reusable dialog and file upload components while removing obsolete mail announcement code, helping future interface improvements ship more consistently.
Original PR description
This PR has several purposes: - add the owl library to Odoo; - defines two JavaScript modules web.env and web.test_env that should make easier to work with and test owl components.
Enhancements to existing features
Reordering rules now calculate timing automatically, including supplier, production, purchasing, and safety delays, so replenishment is triggered at the right moment. Scheduler processing is faster and purchase or production requests from the same rules are grouped more accurately, reducing manual planning work and avoiding late or duplicated procurement.
Original PR description
- Improve the onboarding on reordering rule with an automatic computation of delay - Improve the scheduler performance by running the procurement requests together. - Add the days to purchase notion. - Merge production from same reordering rules. More details could be find in each specific commit. Task 1849912
Website editor option controls can now automatically enable related controls when selected or previewed. This makes editing behavior more consistent and reduces the chance that users need to manually adjust multiple related settings.
This change avoids recalculating values that Odoo has already computed and temporarily stored during record creation. It can significantly speed up bulk operations, such as creating many sales order lines, without changing user-facing behavior.
Original PR description
Description of the issue/feature this PR addresses: Unnecessary recomputation of values already present in cache, leading to a substantial overhead in some use cases (e.g. creation of multiple sale.order.line records). Current behavior before PR: Computed field values that have not yet been written to the database may be recomputed even if the correct result for that record is already present in the cache. Desired behavior after PR is merged: Computed field values that have not yet been written to the database are recomputed only if the correct value for that record is not already present in the cache. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website editors can now set an explicit default value for supported form fields instead of losing input changes during editing. This makes it easier to prepare pre-filled forms for visitors while keeping file upload fields unchanged.
Original PR description
Description of the issue/feature this PR addresses: Without this patch, changes done in any of the inputs are not saved. Now, that behavior remains the same, but a new explicit option is added to each supported input (all except `type="file"`) to set a custom default value.  -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr @Tecnativa
This update adds clearer internal labels to sections of the CRM lead and opportunity form. It helps implementers and partners customize the form more reliably without changing what end users see.
Original PR description
Description of the issue/feature this PR addresses: Since this view has several times the same fields (such as partner_id), it is tricky to use a xpath to locate such fields. Adding a name on the groups makes them very easy to xpath. Current behavior before PR: No reliable way to locate a field using xpath. Desired behavior after PR is merged: Reliable way to locate a field using xpath. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents saved mass mailing records from having an empty name. It avoids save-time errors caused by the underlying marketing source record requiring that name, making mailing edits more reliable.
Original PR description
Description of the issue/feature this PR addresses: mass_mailing Current behavior before PR: Before this commit "Name" was not required on `mailing.mailing` while it is required at field level `utm.source` so making it empty will raise error  Desired behavior after PR is merged: After this commit, "Name" field will be required on Created Records (This is not needed while creating new Record as we set a default value from create method)  -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The app home menu has been rebuilt to provide a cleaner, more consistent experience across standard and Studio modes. Users get improved keyboard navigation, updated layout behavior, and better integration of related tools such as expiration notices and app/icon creation.
Original PR description
We completely rewrite/test the home menu with the owl library.
SEPA batch payments can now be marked for batch booking, so all payments in a batch appear as one combined line on the bank statement. This makes bank reconciliation easier and reduces manual matching work for finance teams.
Original PR description
[IMP] account_sepa_direct_debit, account_batch_payment: put payment_method_code field in account_batch_payment (still invisible), so that submodules needing it don't have to add it every time [IMP] account_sepa: add a checkbox on batch payments to enable batch booking (just like for direct debit) With batch booking enabled, all the payments of the batch will be grouped in a single line on the bank statement, easing reconciliation.
Resolved issues and error corrections
This update corrects an incorrectly written filter used when selecting stock operation types for stock rules. It helps ensure the stock rule setup screen behaves as intended and avoids confusion or errors caused by the malformed filter.
Original PR description
Commit 6c4447e set a new domain on picking_type_id of stock rule but it was wrongly written. This commit make it syntactically correct. Task: 2169836 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 fixes how blog dates are formatted so the displayed year matches the actual calendar year. It prevents confusing dates around the start or end of a year, improving accuracy for website visitors.
Original PR description
In the format_date function of babel.dates, there is a difference between `yyyy` and `YYYY`. `YYYY` should only be used in combination with the week number. See issue https://github.com/python-babel/babel/issues/419 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents Odoo from recalculating certain stored editable fields when their values are already present in the database. It helps preserve existing data and avoids unnecessary processing during normal operations.
Original PR description
Master try of https://github.com/odoo/odoo/pull/42312 Todo cherry-pick rco-odoo commit when accounting is fixed :D (to have the tests and authorship) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an unstable automated check in the Sales app that could fail unpredictably. The change helps keep quality checks reliable so future Sales updates can be validated with fewer false alarms.
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an inconsistent automated check in the rental sales area. It helps ensure future changes are tested more reliably, reducing the chance of false failures during development.
This fix ensures dates show the correct calendar year in reports and planning views, especially around year-end. It prevents confusing or inaccurate year labels caused by using a week-based year format where a normal calendar year was intended.
Original PR description
In the format_date function of babel.dates, there is a difference between `yyyy` and `YYYY`. `YYYY` should only be used in combination with the week number. See issue https://github.com/python-babel/babel/issues/419 Linked Community PR: https://github.com/odoo/odoo/pull/42735
Code cleanup and technical improvements
Manufacturing planning now reuses an existing stock rule calculation for product lead times by location. This reduces duplicated logic and helps keep planning behavior consistent across inventory and manufacturing processes.
Original PR description
Stock rule introduced a function in order to get lead days from a location for a specific product. Use this function in order to reduce duplicated code. Task: 1849912
The cohort reporting view has been rebuilt on Odoo’s newer interface framework to support future product evolution. This is mainly an internal modernization, so users should see the same functionality with a more maintainable foundation.
Original PR description
to prepare the future, we want to convert everything in Owl. This commit converts the web_cohort view. taskid:2149408
Miscellaneous changes
This feature has been lost when removing the account.invoice model. --task: 2154792 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42933
Original PR description
This feature has been lost when removing the account.invoice model. --task: 2154792 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42933
- In a multi currency company, create an invoice with the domestic currency ($); - Add a product (500$) with taxes; - Change the currency to a foreign one (€); - The product don't change of amount but only of currency (500€); - Save the invoice, and print it. Before this commit, the base_amount_tax of the tax wasn't be updated. Note that the base_amount_tax it should be expressed in domestic currency. As this field didn't update in this case, the base_amount_tax is expressing the a
Original PR description
- In a multi currency company, create an invoice with the domestic currency ($); - Add a product (500$) with taxes; - Change the currency to a foreign one (€); - The product don't change of amount but only of currency (500€); - Save the invoice, and print it. Before this commit, the base_amount_tax of the tax wasn't be updated. Note that the base_amount_tax it should be expressed in domestic currency. As this field didn't update in this case, the base_amount_tax is expressing the amount in foreign currency. As this amount is supposed to be in domestic, for the sake of the reports, it's change in currency of the invoice (in this case the foreign one), and it's shown in the report. The amount shown is not correct. Now, the base_amount_tax is recompute and setted in domestic currency. opw-2157853 Forward-Port-Of: odoo/odoo#43006
### Description of the issue/feature this PR addresses: This will be use to make testing of the MiPyme FCE document types (both for functional testing and for unit tests) ### Current behavior before PR: There is not partner to make MiPyme FCE document types ### Desired behavior after PR is merged: We have a partner to make test with MiPyme FCE document types -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#4289
Original PR description
### Description of the issue/feature this PR addresses: This will be use to make testing of the MiPyme FCE document types (both for functional testing and for unit tests) ### Current behavior before PR: There is not partner to make MiPyme FCE document types ### Desired behavior after PR is merged: We have a partner to make test with MiPyme FCE document types -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42890
…om list view itself Task:2155803 Closes: 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#41845
Original PR description
…om list view itself Task:2155803 Closes: 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#41845
self-explanatory opw-2161939 Forward-Port-Of: odoo/odoo#42858
Original PR description
self-explanatory opw-2161939 Forward-Port-Of: odoo/odoo#42858
Before this commit, function _get_payment_type was declared twice in SaleOrder model. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43018
Original PR description
Before this commit, function _get_payment_type was declared twice in SaleOrder model. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43018
Using a lazy translator as this file is processed when loading the web client, no during rendering (the translation memory was not ready yet). Fixes odoo/odoo#36494 Forward-Port-Of: odoo/odoo#43015 Forward-Port-Of: odoo/odoo#42502
Original PR description
Using a lazy translator as this file is processed when loading the web client, no during rendering (the translation memory was not ready yet). Fixes odoo/odoo#36494 Forward-Port-Of: odoo/odoo#43015 Forward-Port-Of: odoo/odoo#42502
Before this commit, the breadcrumb was lost when user validates an inventory adjustment. Now, it's not the case anymore. fixes #41891 Forward-Port-Of: odoo/odoo#43012
Original PR description
Before this commit, the breadcrumb was lost when user validates an inventory adjustment. Now, it's not the case anymore. fixes #41891 Forward-Port-Of: odoo/odoo#43012
Forward-Port-Of: odoo/odoo#42907
Original PR description
Forward-Port-Of: odoo/odoo#42907
Create an invoice, click on send and print without an associated template. Traceback will occur because the lang parameter is set correctly only from a template. Adding a fallback in case there is no template setting opw-2168623 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43000
Original PR description
Create an invoice, click on send and print without an associated template. Traceback will occur because the lang parameter is set correctly only from a template. Adding a fallback in case there is no template setting opw-2168623 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43000
Install stock, go to Configuration>Settings, activate "Storage Locations". Go to Configuration>Locations select locations and print The reported will not follow the documentation, barcode will be one after the other and not side by side, arranged in a 2x2 grid. Fixing require to apply style changes since new bootstrap code is not handled well by wkhtmltopdf opw-2162698 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odo
Original PR description
Install stock, go to Configuration>Settings, activate "Storage Locations". Go to Configuration>Locations select locations and print The reported will not follow the documentation, barcode will be one after the other and not side by side, arranged in a 2x2 grid. Fixing require to apply style changes since new bootstrap code is not handled well by wkhtmltopdf opw-2162698 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42913
- Go Inventory > Master Data > Products - Group by Category - Go to a product - Click on 'Update Inventory' An error is raised because the field `categ_id` doesn't exist on `stock.quant`. opw-2161129 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#42939
Original PR description
- Go Inventory > Master Data > Products - Group by Category - Go to a product - Click on 'Update Inventory' An error is raised because the field `categ_id` doesn't exist on `stock.quant`. opw-2161129 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#42939
Add Luis Enrique "Pitufo" Biosca to Merchise CLA. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42994
Original PR description
Add Luis Enrique "Pitufo" Biosca to Merchise CLA. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42994
### Issue - Install planning - Go on a planning view where you have 2 filters (employee/roles) - Unselect all items of one filter All the filters disappear. ### Cause By doing this: ```javascript if (!_.find(options.filters, function (f) {return f.display == null || f.display;})) { return; } ``` We break the function's recursion: ```javascript return self._renderFiltersOneByOne(filterIndex + 1); ``` So the others filters are not rendered. ### Solution Retu
Original PR description
### Issue
- Install planning
- Go on a planning view where you have 2 filters (employee/roles)
- Unselect all items of one filter
All the filters disappear.
### Cause
By doing this:
```javascript
if (!_.find(options.filters, function (f) {return f.display == null || f.display;})) {
return;
}
```
We break the function's recursion:
```javascript
return self._renderFiltersOneByOne(filterIndex + 1);
```
So the others filters are not rendered.
### Solution
Return the next filter rendering instead of nothing.
**OPW-2166932**
Forward-Port-Of: odoo/odoo#43002Description of the issue/feature this PR addresses: Followup on https://github.com/odoo/odoo/commit/14648272dadfbc9e2c7069de76770d5c052cd37f Current behavior before PR: Field failure_type was visible on the list view only. Desired behavior after PR is merged: In this commit, we display field on form view as well. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42878
Original PR description
Description of the issue/feature this PR addresses: Followup on https://github.com/odoo/odoo/commit/14648272dadfbc9e2c7069de76770d5c052cd37f Current behavior before PR: Field failure_type was visible on the list view only. Desired behavior after PR is merged: In this commit, we display field on form view as well. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42878
As the field isn't mandatory, avoid the `TypeError: 'bool' object is not subscriptable` error. Forward-Port-Of: odoo/odoo#41689
Original PR description
As the field isn't mandatory, avoid the `TypeError: 'bool' object is not subscriptable` error. Forward-Port-Of: odoo/odoo#41689
Currently an onchange on event type copy the mail schedulers information from event type to the event. In order to ease inheritance, some white listed attributes are directly copied using direct getter (line[attribute], see code for clarity). However mail and sms templates are many2one fields and the id should be copied, not the browse record. There is no issue when the onchange is trigered from interface because a mapping is done. However when calling the onchange in code there is a cra
Original PR description
Currently an onchange on event type copy the mail schedulers information from event type to the event. In order to ease inheritance, some white listed attributes are directly copied using direct getter (line[attribute], see code for clarity). However mail and sms templates are many2one fields and the id should be copied, not the browse record. There is no issue when the onchange is trigered from interface because a mapping is done. However when calling the onchange in code there is a crash as the record is directly given to write. 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#42977
Purpose ======= Impacted versions: 13.0 Steps to reproduce: - Add employee - allocate paid leave - set leave in hours - Employee working hours is Mo: 8:30-12:30 Tu-Fr: 8:30-12:30 and 13:00-17:30 (total of 38h per week). - Employee requests on week of leave - Total hours in request is 38. Manager approves. Current behavior: Before approval the total hours in the request is 38. The manager approves and the total hours change to 40. Total remaining hours is also -40. Exp
Original PR description
Purpose ======= Impacted versions: 13.0 Steps to reproduce: - Add employee - allocate paid leave - set leave in hours - Employee working hours is Mo: 8:30-12:30 Tu-Fr: 8:30-12:30 and 13:00-17:30 (total of 38h per week). - Employee requests on week of leave - Total hours in request is 38. Manager approves. Current behavior: Before approval the total hours in the request is 38. The manager approves and the total hours change to 40. Total remaining hours is also -40. Expected behavior: After approval the requested hours should not change and remain 38. The total remaining hours should also be -38. TaskID: 2166964 Closes: #41848 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#42747 Forward-Port-Of: odoo/odoo#42710
The company_id is filtering the lot_id, but when you add extra component lines the company is not set, which makes the expected lots unavailable. this is fixed by adding a context with the default company in mrp.product.produce.line's in the produce wizard form view Current behavior before PR:  Desired behavior after PR is merged:  Desired behavior after PR is merged:  (NOTE: the company_id field is added in the view for clearer description of the issue in the above gifs) cc @ForgeFlow -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42968 Forward-Port-Of: odoo/odoo#42921
Date received from ponto are always datetime in UTC. We convert those datetime to date in odoo (hence loosing the time part). However some bank don't provide the time of the transactions, hence the received UTC datetime we have is smth like 2019-01-01T23:00:00.000z which is converted to a date 2019-01-01 while the correct transaction date should be 2019-01-02. Therefore we convert the received datetime in the Brussel Timezone before converting it to a date. Also remove the last remnant
Original PR description
Date received from ponto are always datetime in UTC. We convert those datetime to date in odoo (hence loosing the time part). However some bank don't provide the time of the transactions, hence the received UTC datetime we have is smth like 2019-01-01T23:00:00.000z which is converted to a date 2019-01-01 while the correct transaction date should be 2019-01-02. Therefore we convert the received datetime in the Brussel Timezone before converting it to a date. Also remove the last remnant of code used to skip refresh as it is better handled by an error code Forward-Port-Of: odoo/enterprise#7635 Forward-Port-Of: odoo/enterprise#7630
… in wrong journal Also fix the date problem of the first synchronization bank statement line where in some case, the date was not the latest one depending on the mode selected. Forward-Port-Of: odoo/enterprise#7629
Original PR description
… in wrong journal Also fix the date problem of the first synchronization bank statement line where in some case, the date was not the latest one depending on the mode selected. Forward-Port-Of: odoo/enterprise#7629
- Flag the deliveries modules and amazon/ebay connectors as applications. To synchronize them with the Odoo Pricing page. Forward-Port-Of: odoo/enterprise#7612
Original PR description
- Flag the deliveries modules and amazon/ebay connectors as
applications.
To synchronize them with the Odoo Pricing page.
Forward-Port-Of: odoo/enterprise#7612Go to Sales>Configuration>Sales Teams. Select one, Edit, into Assignation tab click "add", add a new record, save. The added record will vanish, because by default the "active" flag is not following the default definition and the record is automatically removed. Adding the field into the view ensure that the default value is correctly set. opw-2168425 Forward-Port-Of: odoo/enterprise#7592
Original PR description
Go to Sales>Configuration>Sales Teams. Select one, Edit, into Assignation tab click "add", add a new record, save. The added record will vanish, because by default the "active" flag is not following the default definition and the record is automatically removed. Adding the field into the view ensure that the default value is correctly set. opw-2168425 Forward-Port-Of: odoo/enterprise#7592
- The renewal cron isn't checking if the subscription needs to be closed before being renewed. Meaning some subscription might be charged when it was supposed to be closed. Forward-Port-Of: odoo/enterprise#7588 Forward-Port-Of: odoo/enterprise#7584
Original PR description
- The renewal cron isn't checking if the subscription needs to be closed
before being renewed.
Meaning some subscription might be charged when it was supposed to
be closed.
Forward-Port-Of: odoo/enterprise#7588
Forward-Port-Of: odoo/enterprise#7584