Monday, October 28, 2019
31 changes · master
New functionality added to Odoo
This update adds a signature option to delivery orders, allowing customers to sign when receiving goods. It also introduces a reusable signature button in forms, improving proof of delivery and record keeping.
Original PR description
:one: __[IMP] web: add widget signature__ > Adding a new widget to display a sign button in the form view. :two: __[IMP] stock: add signature field on picking__ > On a delivery type picking, adds a button to able the partner to sign delivery on receipt.
Warehouse users can now confirm when a stock location is empty or immediately record a small inventory adjustment during picking validation. This helps keep inventory records accurate day to day and reduces the need for large periodic stock corrections.
Original PR description
**Feature** Whenever a location is theoriticaly completely empty, the user can now either confirm the empty location or adjust the inventory. This allows to keep a more consistent inventory in the day-to-day work by making small inventory adjustment from times to times instead of doing big inventory adjustments more episodically. **Technical implications** This needed some refactoring on `stock_picking` and `stock_batch_picking` because it was not possible to add a wizard in the previous validation flow of `stock_picking`. Furthermore, pickings can now trigger inventory adjustments that need to be validated at the same time than their original picking. In order to achieve this, a field `inventory_ids` was added on `stock_picking`, `button_validate`will check if there's any inventory linked to the picking that needs to be validated right after the validation of the picking itself. TaskID: 1938108
Enhancements to existing features
Inventory screens now show available quantity separately from reserved stock, giving teams a clearer view of what can actually be used or sold. The update also improves quantity display for locations outside standard warehouse structures, such as subcontracting, and fixes an availability calculation issue caused by missing context.
Resolved issues and error corrections
The expiration alert filter for inventory quantities has been corrected so it no longer fails when users search for expiring products. This keeps stock and expiry checks accessible without interruptions caused by unsupported time details.
Original PR description
Before this commit, the "Expiration Alerts" search filter for quant return a traceback because it tries to render hours/minutes/seconds but there aren't supported. This fix just removes them.
Miscellaneous changes
https://github.com/odoo/odoo/pull/34737 maybe didn't go in enough depth to ensure sections and notes don't break purchase flows. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38232
Original PR description
https://github.com/odoo/odoo/pull/34737 maybe didn't go in enough depth to ensure sections and notes don't break purchase flows. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38232
Point of Sale users can now set or change a customer's preferred language directly from the POS customer details screen. This helps stores keep customer records accurate and supports better communication in the customer's chosen language.
Original PR description
Now we can change the language of the customer inside the POS front end. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website pages and routes now need to be explicitly marked before they appear in the sitemap, reducing accidental listings and duplicate or empty content. The update also automatically filters sitemap entries by the current website where relevant, improving sitemap accuracy for multi-website setups.
Original PR description
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.
It's the default value, but if you forgot it, it will raise a Warning on runbot.
It will avoid wrong controller in sitemap and duplicate (empty) content.
From now, if your model contains a field website_id, the modelConverter for
sitemap will automatically add the domain:
"[('website_id', 'in', (False, current_website_id))]"
It avoid redundant declaration and ugly url in redirect/rewrite view.
Migration: need to remove it from url_from in website.rewrite
task-2065018
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-prWhen a manufacturing order depends on another order for raw materials, cancelling the related order now raises a clear warning on the main order. This helps teams spot missing materials earlier and avoid confusion in multi-level production workflows.
Original PR description
Task Id : https://www.odoo.com/web?#id=1819526&action=327&model=project.task&view_type=form&menu_id=4720 Pad : https://pad.odoo.com/p/r.07d74196f83d96889fb1e9dd0ed6761b
Website editors can now create section links automatically instead of manually choosing anchor names in a modal. The generated link is based on the section title or snippet name, copied to the clipboard, and can still be edited with more flexible naming including emojis.
Original PR description
Previously, the user could choose their anchor names using a modal window, anchor names also have weird rules, this was not a great user experience. This commit makes the anchor button generate anchors automatically based on the first title in a section, or the snippet name if there are none. If the anchor name is already taken, it is suffixed by a number. After it has been generated, it is also copied to the clipboard and the user is shown a toast to tell them the anchor has been generated and copied. The anchor is displayed in the toast along with an edit button that will open the same edition modal as previously, but it is now less restrictive (they now even support emojis! 💩) task-2088270
Website pages now need to be explicitly marked before they are included in the sitemap, helping prevent duplicate or empty pages from appearing in search engine indexes. Website-specific records are also filtered automatically, reducing configuration mistakes and keeping redirects and rewritten URLs cleaner.
Original PR description
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.
It's the default value, but if you forgot it, it will raise a Warning on runbot.
It will avoid wrong controller in sitemap and duplicate (empty) content.
From now, if your model contains a field website_id, the modelConverter for
sitemap will automatically add the domain:
"[('website_id', 'in', (False, current_website_id))]"
It avoid redundant declaration and ugly url in redirect/rewrite view.
Migration: need to remove it from url_from in website.rewrite
task-2065018Odoo can now create one fixed asset for each item quantity on a supplier bill line when the related account is configured for item management. This helps businesses track and depreciate individual purchased items separately instead of combining them into one asset.
Original PR description
[IMP] account_asset: Creation of multiple assets from one move line Add a setting allowing to manage items. Newly created assets for this kind of account (with the checkbox checked) will generate 1 asset per quantity set on the bill. e.g. If the bill line quantity is 5 then Odoo will generate 5 assets (instead of 1 global asset) task : https://www.odoo.com/web?#id=2081662&action=327&model=project.task&view_type=form&menu_id=4720
Assigning default value for non-stored compute fields is required in 13.0 Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/39431 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#39446
Original PR description
Assigning default value for non-stored compute fields is required in 13.0 Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/39431 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#39446
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38361
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38361
Helps module upgrade. Forward-Port-Of: odoo/odoo#39444
Original PR description
Helps module upgrade. Forward-Port-Of: odoo/odoo#39444
Before this commit, the calendar searched records on the wrong time ranges which did not take into account the timezone of the user It obviously resulted in some records not being there After this commit, all the relevant records are fetched according to the right time range in UTC, corresponding to start/end of the week/month/day of the calendar OPW 2076114 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged:
Original PR description
Before this commit, the calendar searched records on the wrong time ranges which did not take into account the timezone of the user It obviously resulted in some records not being there After this commit, all the relevant records are fetched according to the right time range in UTC, corresponding to start/end of the week/month/day of the calendar OPW 2076114 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#39443 Forward-Port-Of: odoo/odoo#39184
Makes it easier for users to match Odoo payments with information from the Stripe dashboard. Forward-Port-Of: odoo/odoo#39254 Forward-Port-Of: odoo/odoo#39092
Original PR description
Makes it easier for users to match Odoo payments with information from the Stripe dashboard. Forward-Port-Of: odoo/odoo#39254 Forward-Port-Of: odoo/odoo#39092
Adapt the API changes in Stripe. Use correct test data existing in Stripe dashboard for our test account. Forward-Port-Of: odoo/odoo#39438
Original PR description
Adapt the API changes in Stripe. Use correct test data existing in Stripe dashboard for our test account. Forward-Port-Of: odoo/odoo#39438
When Pricelist is activated in the General Settings, pricelist_id field is now available in the form view even if the use_pricelist is False. This means that pricelist_id field should be independent from available_pricelist_ids when use_pricelist is False. The value of available_pricelist_ids becomes a restriction to pricelist_id when use_pricelist if True. TASK-ID: 2090354 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/
Original PR description
When Pricelist is activated in the General Settings, pricelist_id field is now available in the form view even if the use_pricelist is False. This means that pricelist_id field should be independent from available_pricelist_ids when use_pricelist is False. The value of available_pricelist_ids becomes a restriction to pricelist_id when use_pricelist if True. TASK-ID: 2090354 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39105
Have a parent template Have a child, in extension inherit mode of the parent The child should have a xpath like `<xpath expr="." position="replace" />` Before this commit, there was a crash. That was because the Comment that indicates which templates modified the parent was taken instead of the actual content of the xpath After this commit, there is no crash, and it works as expected Description of the issue/feature this PR addresses: Current behavior before PR: Desired behav
Original PR description
Have a parent template Have a child, in extension inherit mode of the parent The child should have a xpath like `<xpath expr="." position="replace" />` Before this commit, there was a crash. That was because the Comment that indicates which templates modified the parent was taken instead of the actual content of the xpath After this commit, there is no crash, and it works as expected 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#38786
The purpose of this patch is to avoid `filtered_domain` to crash with domains on date/datetime fields when the fields are `False` on some records: records.filtered_domain([('date', '<', '2019-10-28')]) Forward-Port-Of: odoo/odoo#39429
Original PR description
The purpose of this patch is to avoid `filtered_domain` to crash with
domains on date/datetime fields when the fields are `False` on some
records:
records.filtered_domain([('date', '<', '2019-10-28')])
Forward-Port-Of: odoo/odoo#39429### Description of the issue/feature this PR addresses: This fixed the wrong key `if 'company' in fields` in the `default_get` to avoid missing company_id's value. ### Desired behavior after PR is merged: User will be able to select another warehouse in the warehouses field of the Product Replenishment form view -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39374
Original PR description
### Description of the issue/feature this PR addresses: This fixed the wrong key `if 'company' in fields` in the `default_get` to avoid missing company_id's value. ### Desired behavior after PR is merged: User will be able to select another warehouse in the warehouses field of the Product Replenishment form view -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39374
Description of the issue/feature this PR addresses: Task: https://www.odoo.com/web?#id=2089784&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.b9e856ee2136ea760bf4a43bea3ad5b6 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#39305
Original PR description
Description of the issue/feature this PR addresses: Task: https://www.odoo.com/web?#id=2089784&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.b9e856ee2136ea760bf4a43bea3ad5b6 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#39305
The issue is the following: if both fields F1 and F2 are computed by the same compute method, actions based on changes on F1 may not be triggered when F2 forces their recomputation. This is caused by the API of the method `_compute_field_value` that takes as parameter the field that triggered the recomputation. The method must consider all the fields computed by the method. Forward-Port-Of: odoo/odoo#39343
Original PR description
The issue is the following: if both fields F1 and F2 are computed by the same compute method, actions based on changes on F1 may not be triggered when F2 forces their recomputation. This is caused by the API of the method `_compute_field_value` that takes as parameter the field that triggered the recomputation. The method must consider all the fields computed by the method. Forward-Port-Of: odoo/odoo#39343
Steps to reproduce the bug: - Create an event E with max available seats = 1 - Register to E with public user and leave the cart - In backend, register an attendee for E and confirm it - Go to the cart, try to update the line with the registration Bug: The line was not updated to 0 and so the customer had to buy an unavailable ticket. opw:2091720 Forward-Port-Of: odoo/odoo#39338
Original PR description
Steps to reproduce the bug: - Create an event E with max available seats = 1 - Register to E with public user and leave the cart - In backend, register an attendee for E and confirm it - Go to the cart, try to update the line with the registration Bug: The line was not updated to 0 and so the customer had to buy an unavailable ticket. opw:2091720 Forward-Port-Of: odoo/odoo#39338
To reproduce the issue, go in the settings of the employee app, simulate a slow 3G connection, modify the working hours: - Select the first one, modify it but don't save it, - Click on some others working hours consecutively - They will be all editable - Edit them quickly Before this commit: - You get an error After this commit: - You get no error and the behavior is the same than in V12: the working hours are updated consecutively Note: when you stress the rel
Original PR description
To reproduce the issue, go in the settings of the employee app,
simulate a slow 3G connection, modify the working hours:
- Select the first one, modify it but don't save it,
- Click on some others working hours consecutively
- They will be all editable
- Edit them quickly
Before this commit:
- You get an error
After this commit:
- You get no error and the behavior is the same than in V12:
the working hours are updated consecutively
Note: when you stress the relational field quickly, there is a moment
where this.$el is undefined. This is the reason why the error is raised.
OPW-2088558
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#39316Follow up on https://github.com/odoo/odoo/pull/38805 Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/39219 Current behavior before PR: Access error as mentioned on #39219 Desired behavior after PR is merged: Compute non-stored fields in superuser mode Cc @odony @rco-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39405
Original PR description
Follow up on https://github.com/odoo/odoo/pull/38805 Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/39219 Current behavior before PR: Access error as mentioned on #39219 Desired behavior after PR is merged: Compute non-stored fields in superuser mode Cc @odony @rco-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39405
When installing point_of_sale, the admin user only belongs to group_account_invoice and not on group_account_user. Because of this, the record rules defined in point_of_sale that allow access to account.bank.statement and account.bank.statement.line models do not work as intended. This commit now allows read access to the said account models. TASK-ID: 2083597 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39315
Original PR description
When installing point_of_sale, the admin user only belongs to group_account_invoice and not on group_account_user. Because of this, the record rules defined in point_of_sale that allow access to account.bank.statement and account.bank.statement.line models do not work as intended. This commit now allows read access to the said account models. TASK-ID: 2083597 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39315
To reproduce this issue, a transaction retry must be forced: — Put a breakpoint in a line of the function process_bank_statement_line in addons/account/models/reconciliation_widget.py; — Open the bank statement reconciliation; — Click in validate; — When the code is in pause; — Open psql and modify a line of the database that affects the current reconciliation, for example you can change the partner_id of the table account_bank_statement_line for the line that is modified in
Original PR description
To reproduce this issue, a transaction retry must be forced: — Put a breakpoint in a line of the function process_bank_statement_line in addons/account/models/reconciliation_widget.py; — Open the…
To reproduce this issue, a transaction retry must be forced:
— Put a breakpoint in a line of the function process_bank_statement_line
in addons/account/models/reconciliation_widget.py;
— Open the bank statement reconciliation;
— Click in validate;
— When the code is in pause;
— Open psql and modify a line of the database that affects the current
reconciliation, for example you can change the partner_id of the
table account_bank_statement_line for the line that is modified in
https://github.com/odoo/odoo/blob/3e2d968c55542426746b287c556b5fb05d59fdcb/addons/account/models/reconciliation_widget.py#L35;
— Continue the process;
— This will generate an 'ERROR: could not serialize access due to
concurrent update' and a transaction retry.
Before this commit, a KeyError is raised, this occurs because
counterpart_aml_id was deleted from the dictionary in the first passage,
then when in the second passage triggered by the 'retry transaction',
counterpart_aml_id doesn't exist any more in the dictionary.
Now, the data is copied and there is no problem when the 'retry
transaction' is called.
Fixes #23816
opw-2085822
Forward-Port-Of: odoo/odoo#39325
Forward-Port-Of: odoo/odoo#39314The last step of the 'course_member' test tour adds a new rating on the course. This commit improves the test by actually checking the rating is added. At the same time, we fix a potential build error caused by the fact that the test was closed potentially before finishing the rating request. Task#2091810 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 P
Original PR description
The last step of the 'course_member' test tour adds a new rating on the course. This commit improves the test by actually checking the rating is added. At the same time, we fix a potential build error caused by the fact that the test was closed potentially before finishing the rating request. Task#2091810 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#39313
Forward-Port-Of: odoo/enterprise#6058
Original PR description
Forward-Port-Of: odoo/enterprise#6058
- Create a product C, FIFO, automated - Create a product F, FIFO, automated - Receive some units of C @ 1.00 - Create a BOM for F containing 1 units of C - Create a MO for 3 units of F, reserve the components - Scrap 1 unit of C - Update the quantity to produce to 2 - Complete the production - Open the Cost Analysis report The Unit Cost is 1.50, although F is valued at 1.00 in the accounting entries. It occurs because the report takes into account the scrapped products while the
Original PR description
- Create a product C, FIFO, automated - Create a product F, FIFO, automated - Receive some units of C @ 1.00 - Create a BOM for F containing 1 units of C - Create a MO for 3 units of F, reserve the components - Scrap 1 unit of C - Update the quantity to produce to 2 - Complete the production - Open the Cost Analysis report The Unit Cost is 1.50, although F is valued at 1.00 in the accounting entries. It occurs because the report takes into account the scrapped products while the accounting entries don't. For sake of stability and consistency, we adapt the report not the accounting entries. opw-2092519 Forward-Port-Of: odoo/enterprise#6442 Forward-Port-Of: odoo/enterprise#6427