Monday, October 18, 2021
33 changes · master
Enhancements to existing features
The Accounting app now provides clearer help text for the three account fields in Tax Group settings. This makes it easier for users to understand which accounts to configure and reduces setup confusion.
Original PR description
For clarity purpose, tooltips for the 3 accounts in Tax Group (Configuration > Tax Group) are added. task-2602730 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
Survey participants now see keyboard instructions that match the type of answer field they are using. This makes the survey experience clearer on desktop and avoids showing unnecessary shortcut text at the start on mobile devices.
Original PR description
Purpose ======= Have the "or press CTRL+Enter" (metaKey if it's a mac) shown if the input field selected is a text area, and "or press Enter" otherwise. Hide the text at the beginning of the survey if it's from mobile. Task-2637120
The Tax Report now shows a clearer message when required accounts are missing for a Tax Closing Entry. This helps accounting users understand exactly what needs to be configured before closing the entry.
Original PR description
Clarify the error message when closing the entry in the Tax Report page (Reporting > Tax Report). Error message is changed from "Some of your tax groups are missing information. Please complete their configuration." to "Please specify the accounts necessary for the Tax Closing Entry." The error message is triggered when the tax group does not have at least one of the following: - a tax payable account - a tax receivable account - an advance tax payment account task-2602730
Miscellaneous changes
`_updateEditorUI` was reseting color to old or non css color value. due to a race condition in the editor selection. task-2654666 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78450
Original PR description
`_updateEditorUI` was reseting color to old or non css color value. due to a race condition in the editor selection. task-2654666 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78450
This is a follow-up for #69812. The `distinct` keyword in query ```SELECT distinct res_id FROM mail_message WHERE model=%s``` is not strictly necessary for the correctness of the result, as it will be inserted inside a sub-query that will be able to use the main (model, res_id) index of mail_message. For example, when the `has_message` field is used in a domain by the website_livechat module[1], the complete query looks like this: ``` SELECT "mail_channel".id FROM "mail_channel" WHERE
Original PR description
This is a follow-up for #69812. The `distinct` keyword in query ```SELECT distinct res_id FROM mail_message WHERE model=%s``` is not strictly necessary for the correctness of the result, as it will…
This is a follow-up for #69812.
The `distinct` keyword in query ```SELECT distinct res_id FROM mail_message WHERE model=%s```
is not strictly necessary for the correctness of the result, as it will be inserted inside a sub-query that will be able to use the main (model, res_id) index of mail_message.
For example, when the `has_message` field is used in a domain by the website_livechat module[1], the complete query looks like this:
```
SELECT "mail_channel".id FROM "mail_channel"
WHERE ("mail_channel"."active" = true) AND
("mail_channel"."livechat_visitor_id" = 112678387) AND
("mail_channel"."livechat_channel_id" = 1) AND
("mail_channel"."livechat_active" = true) AND
("mail_channel"."id" in (
SELECT distinct res_id FROM mail_message WHERE model='mail.channel'))
ORDER BY "mail_channel"."create_date" DESC LIMIT 1;
```
In this query, it's obvious that the `distinct` makes zero difference in the results.
However, the presence of the DISTINCT keyword means that PostgreSQL will factor the cost of applying that UNIQUE sort in the query planning, and use MERGE JOIN strategy to avoid sorting multiple times (ok, it could perhaps guess that distinct is useless here, but we asked for it.)
For a database with millions of mail messages, there can easily be millions of hits for the generic "all res_ids for model" query, so the cost of that part will be quite high.
The plan will then look like this (notice the "Unique" step and the cost, 730ms for the index scan + 200ms for the sort):
<details>
<summary>The query plan when `distinct` is used</summary>
```
QUERY PLAN
------------------------------------------------------------------------------
Limit (cost=151528.28..151528.29 rows=1 width=12) (actual time=1021.237..1021.239 rows=1 loops=1)
Output: mail_channel.id, mail_channel.create_date
Buffers: shared hit=767230
-> Sort (cost=151528.28..151528.29 rows=1 width=12) (actual time=998.799..998.801 rows=1 loops=1)
Output: mail_channel.id, mail_channel.create_date
Sort Key: mail_channel.create_date DESC
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=767230
-> Merge Join (cost=3.01..151528.27 rows=1 width=12) (actual time=998.786..998.790 rows=1 loops=1)
Output: mail_channel.id, mail_channel.create_date
Inner Unique: true
Merge Cond: (mail_channel.id = mail_message.res_id)
Buffers: shared hit=767230
-> Sort (cost=2.44..2.45 rows=1 width=12) (actual time=0.043..0.045 rows=1 loops=1)
Output: mail_channel.id, mail_channel.create_date
Sort Key: mail_channel.id
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=5
-> Index Scan using mail_channel_livechat_visitor_id_livechat_channel_id_idx on public.mail_channel (cost=0.41..2.43 rows=1 width=12) (actual time=0.035..0.039 rows=1 loops=1)
Output: mail_channel.id, mail_channel.create_date
Index Cond: ((mail_channel.livechat_visitor_id = 112678387) AND (mail_channel.livechat_channel_id = 1))
Filter: mail_channel.active
Buffers: shared hit=5
-> Unique (cost=0.57..143838.35 rows=614997 width=4) (actual time=0.033..993.210 rows=97187 loops=1)
Output: mail_message.res_id
Buffers: shared hit=767225
-> Index Only Scan using mail_message_model_res_id_idx on public.mail_message (cost=0.57..129884.36 rows=5581595 width=4) (actual time=0.032..730.233 rows=5586467 loops=1)
Output: mail_message.res_id
Index Cond: (mail_message.model = 'mail.channel'::text)
Heap Fetches: 17
Buffers: shared hit=767225
Planning Time: 0.471 ms
Execution Time: 1025.410 ms
(37 rows)
```
</details>
Now, if we remove the superfluous `distinct` clause, for the same database, data volume, and result, the plan looks like this:
<details>
<summary>The query plan when `distinct` is not used</summary>
```
QUERY PLAN
-------------------------------------------------------------------------------------
Limit (cost=3.44..3.44 rows=1 width=12) (actual time=0.069..0.069 rows=0 loops=1)
Output: mail_channel.id, mail_channel.create_date
Buffers: shared hit=8
-> Sort (cost=3.44..3.44 rows=1 width=12) (actual time=0.068..0.068 rows=0 loops=1)
Output: mail_channel.id, mail_channel.create_date
Sort Key: mail_channel.create_date DESC
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=8
-> Nested Loop Semi Join (cost=0.98..3.43 rows=1 width=12) (actual time=0.061..0.061 rows=0 loops=1)
Output: mail_channel.id, mail_channel.create_date
Buffers: shared hit=8
-> Index Scan using mail_channel_livechat_visitor_id_livechat_channel_id_idx on public.mail_channel (cost=0.41..2.43 rows=1 width=12) (actual time=0.020..0.020 rows=1 loops=1)
Output: mail_channel.id, mail_channel.create_date
Index Cond: ((mail_channel.livechat_visitor_id = 117513256) AND (mail_channel.livechat_channel_id = 1))
Filter: mail_channel.active
Buffers: shared hit=4
-> Index Only Scan using mail_message_model_res_id_idx on public.mail_message (cost=0.57..2.77 rows=10 width=4) (actual time=0.040..0.040 rows=0 loops=1)
Output: mail_message.model, mail_message.res_id
Index Cond: ((mail_message.model = 'mail.channel'::text) AND (mail_message.res_id = mail_channel.id))
Heap Fetches: 0
Buffers: shared hit=4
Planning time: 0.761 ms
Execution time: 0.095 ms
(23 rows)
```
</details>
Total execution time goes from 1000 ms to 0.1ms.
Reference: introduced by 9a01a2953fa8e8c257568cdcf03f177bf79db35a, coming from #69812, which was fixing a performance problem.
[1] Cfr: https://github.com/odoo/odoo/blob/9b224f35f45876c86dc34934379bfa9e8b3e2160/addons/website_livechat/models/website.py#L40-L44
Forward-Port-Of: odoo/odoo#77993Purpose ======= Add the new URL to the documentation for the v15. Task-2647169 Forward-Port-Of: odoo/odoo#78126
Original PR description
Purpose ======= Add the new URL to the documentation for the v15. Task-2647169 Forward-Port-Of: odoo/odoo#78126
When validating a receipt, if the product is subcontracted and if the picking is not fully done, it will be impossible to create a backorder To reproduce the issue: 1. Create two products P_compo, P_finished - Both storable - Both tracked by lot - P_compo must have the route "Resupply Subcontractor on Order" 2. Update P_compo's quantity: 4 3. Create a BoM: - Product: P_finished - BoM type: Subcontracting - Subcontractors: a partner P - Components: 1 x P_
Original PR description
When validating a receipt, if the product is subcontracted and if the picking is not fully done, it will be impossible to create a backorder To reproduce the issue: 1. Create two products P_compo,…
When validating a receipt, if the product is subcontracted and if the
picking is not fully done, it will be impossible to create a backorder
To reproduce the issue:
1. Create two products P_compo, P_finished
- Both storable
- Both tracked by lot
- P_compo must have the route "Resupply Subcontractor on Order"
2. Update P_compo's quantity: 4
3. Create a BoM:
- Product: P_finished
- BoM type: Subcontracting
- Subcontractors: a partner P
- Components: 1 x P_compo
4. In Inventory, create a planned transfer T:
- Operation Type: Receipt
- Receive From: P
- Operations: 4 x P_finished
5. Mark as Todo
6. Inventory > Delivery Orders, find the delivery of P_compo for P and
process it
7. Back to T, Record Components:
- Quantity: 3/4
- Set a Lot for P_finished
8. Validate T, Create Backorder
Error: a User Error is raised "You need to supply a Lot/Serial Number
for product: - P_finished"
Since P_finished is subcontracted, a related MO has been generated. On
step 7, when recording the used components, since all P_finished have
not been produced, a second MO is created for the last P_finished.
However, when validating T, both MOs are selected and validated. This is
an error since the user has not yet recorded the used components for the
last MO. The latter should not be validated.
OPW-2582538
Forward-Port-Of: odoo/odoo#78406
Forward-Port-Of: odoo/odoo#78393This commit fixes the broken inheritence between project and hr_timesheet modules regarding the GraphView. Hr Timesheet module extends GraphView rather than ProjectGraphView which makes the view unaware it should use the ProjectControlPanel. This commit adds project tour steps to ensure every view contains the project update breadcrumb. task-2642872 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78463
Original PR description
This commit fixes the broken inheritence between project and hr_timesheet modules regarding the GraphView. Hr Timesheet module extends GraphView rather than ProjectGraphView which makes the view unaware it should use the ProjectControlPanel. This commit adds project tour steps to ensure every view contains the project update breadcrumb. task-2642872 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78463
Steps to reproduce: - Set the Decimal Accuracy at 5 digits for Product UoM - Create a product X - Create a kit BOM for X with a component Y, and qty 0.08600 - Create a Sale Order for 10 product X, confirm and deliver all Issue - On the SO, quantity delevered is 9.00000 instead of 10.00000, same issue occur with the same flow with a Purchase Order. Cause As the quantity per kit was rounded when calling _compute_qty, the calcul of quantity ratio was not well computed. Solu
Original PR description
Steps to reproduce: - Set the Decimal Accuracy at 5 digits for Product UoM - Create a product X - Create a kit BOM for X with a component Y, and qty 0.08600 - Create a Sale Order for 10 product X, confirm and deliver all Issue - On the SO, quantity delevered is 9.00000 instead of 10.00000, same issue occur with the same flow with a Purchase Order. Cause As the quantity per kit was rounded when calling _compute_qty, the calcul of quantity ratio was not well computed. Solution Avoid rounding the quantity per kit, as the quantity ratio is rounded a few steps after. opw-2590126 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#78482 Forward-Port-Of: odoo/odoo#78400
Before this commit, it was possible to drop an inline snippet (e.g. badge, cards, etc.) next to a section when this section was a snippet which can be dropped as main snippets or as inline snippets. (e.g. countdown, embed code, etc.). task-2648348 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
Original PR description
Before this commit, it was possible to drop an inline snippet (e.g. badge, cards, etc.) next to a section when this section was a snippet which can be dropped as main snippets or as inline snippets. (e.g. countdown, embed code, etc.). task-2648348 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#76827
Before this commit, the CSS of the overlay option buttons of the timeline snippet was broken. task-2648348 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#76753
Original PR description
Before this commit, the CSS of the overlay option buttons of the timeline snippet was broken. task-2648348 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#76753
Prior to this commit, every dropdown menu entries in the web editor had a border-radius on them. It didn't look consistent and clean. This commit fixes those menu entries by either removing or applying a correct border-radius. Forward-Port-Of: odoo/odoo#77425
Original PR description
Prior to this commit, every dropdown menu entries in the web editor had a border-radius on them. It didn't look consistent and clean. This commit fixes those menu entries by either removing or applying a correct border-radius. Forward-Port-Of: odoo/odoo#77425
Before this commit, when dropping custom snippet (or saved snippet) containing an animation in the page, the animated element of the snippet remained hidden. task-2664876 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#78201
Original PR description
Before this commit, when dropping custom snippet (or saved snippet) containing an animation in the page, the animated element of the snippet remained hidden. task-2664876 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#78201
~~If both amounts are zero the computed amount is zero.~~ ~~If only the denomirator is zero, we let it fail.~~ If the denomirator is zero, we set the computed value to zero. This issue was observed during upgrade request 41615, with following traceback. ``` Traceback (most recent call last): File "/home/odoo/src/odoo/15.0/odoo/service/server.py", line 1246, in preload_registries registry = Registry.new(dbname, update_module=update_module) File "/home/odoo/src/odoo/15.0/odoo/mo
Original PR description
~~If both amounts are zero the computed amount is zero.~~ ~~If only the denomirator is zero, we let it fail.~~ If the denomirator is zero, we set the computed value to zero. This issue was observed…
~~If both amounts are zero the computed amount is zero.~~
~~If only the denomirator is zero, we let it fail.~~
If the denomirator is zero, we set the computed value to zero.
This issue was observed during upgrade request 41615, with following
traceback.
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/service/server.py", line 1246, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/15.0/odoo/modules/loading.py", line 490, in load_modules
migrations.migrate_module(package, 'end')
File "/home/odoo/src/odoo/15.0/odoo/modules/migration.py", line 180, in migrate_module
migrate(self.cr, installed_version)
File "/tmp/tmp3r3s178t/migrations/sale_timesheet_margin/saas~14.5.1.0/end-migrate.py", line 14, in migrate
util.recompute_fields(cr, "sale.order.line", ["purchase_price"], ids=ids)
File "/tmp/tmp3r3s178t/migrations/util/orm.py", line 113, in recompute_fields
records.recompute()
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 6096, in recompute
process(field)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 6080, in process
field.recompute(recs)
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1243, in recompute
self.compute_value(recs)
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4249, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/odoo/15.0/addons/sale_timesheet_margin/models/sale_order_line.py", line 21, in _compute_purchase_price
for amount in group_amount
File "/home/odoo/src/odoo/15.0/addons/sale_timesheet_margin/models/sale_order_line.py", line 21, in <dictcomp>
for amount in group_amount
ZeroDivisionError: float division by zero
```
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#78368Issue: When replacing a tracked part while doing a repair, we are changing the tracking number, but when checking for uniqueness, we don't take that change into consideration Steps to reproduce : 1) Manufacture product A with SN "A1" out of product B with SN "B2" 2) Make Repair Order for "A1" to replace "B2" with Product B (SN "B1"). 3) Create Manufacturing Order product A (A2), select product B with SN "B2" as one of the components. 4) Mark as done -> Bug : "The serial number
Original PR description
Issue: When replacing a tracked part while doing a repair, we are changing the tracking number, but when checking for uniqueness, we don't take that change into consideration Steps to reproduce : 1) Manufacture product A with SN "A1" out of product B with SN "B2" 2) Make Repair Order for "A1" to replace "B2" with Product B (SN "B1"). 3) Create Manufacturing Order product A (A2), select product B with SN "B2" as one of the components. 4) Mark as done -> Bug : "The serial number B2 used for component B has already been consumed". Why is that a bug: When checking for uniqueness we should take into consideration the parts being replaced opw-2625687 Forward-Port-Of: odoo/odoo#78149 Forward-Port-Of: odoo/odoo#75717
…e is disabled Current Behaviour : 1. Enable Work Orders 2. Add an operation to a BOM 3. Disable Work Orders 4. Create a manufacturing order for this product and finish the manufacturing. 5. Print the production order What is the current behavior that you observe? The production order has the operations in it even though the work order option has been disabled. This is because disabling the work order option just hides the operations and does not remove it from the BOM. What would
Original PR description
…e is disabled Current Behaviour : 1. Enable Work Orders 2. Add an operation to a BOM 3. Disable Work Orders 4. Create a manufacturing order for this product and finish the manufacturing. 5. Print the production order What is the current behavior that you observe? The production order has the operations in it even though the work order option has been disabled. This is because disabling the work order option just hides the operations and does not remove it from the BOM. What would be your expected behavior in this case? The printed production should not show the operation. opw-2660545 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78244
Some serial number related performance fixes This PR aims to speed up inventory flows implying lots of serial numbers (tested with 10k) Here are some analysis (the blue frame is the block to optimize) : Scenario 1 : deleting 10k stock move lines in a stock move before  after  Here are some analysis (the blue frame is the block to optimize) : Scenario 1 : deleting 10k stock move lines in a stock move before  after  The recompute_state part is basically invisible after Scenario 2: Create 10k serial number from lot_name on stock move lines before  After  Forward-Port-Of: odoo/odoo#78481 Forward-Port-Of: odoo/odoo#78370
"Big Icons Subtitles" snippet is not displaying any icons  Forward-Port-Of: odoo/odoo#78507
Original PR description
"Big Icons Subtitles" snippet is not displaying any icons  Forward-Port-Of: odoo/odoo#78507
Both developments 6c4910a and 7563b44 have been introduced nearly at the same time in the saas-14.5 version, but the later one is introducing a side effect that breaks the project sharing feature. Indeed, before there was one assignee per task (user_id), and now we can assign several collaborators (user_ids). As the read on a M2O is just calling the name_get method, it wasn't an issue. Now, as it implies to read the res.users (and the res.partner) model, the assigned users were fil
Original PR description
Both developments 6c4910a and 7563b44 have been introduced nearly at the same time in the saas-14.5 version, but the later one is introducing a side effect that breaks the project sharing feature.…
Both developments 6c4910a and 7563b44 have been introduced nearly
at the same time in the saas-14.5 version, but the later one is
introducing a side effect that breaks the project sharing feature.
Indeed, before there was one assignee per task (user_id), and now
we can assign several collaborators (user_ids).
As the read on a M2O is just calling the name_get method, it wasn't
an issue.
Now, as it implies to read the res.users (and the res.partner) model,
the assigned users were filtered according to a specific ir.rule
for the portal users:
<record id="res_partner_rule" model="ir.rule">
<field name="name">openerp.portal.res.partner</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="groups" eval="[(6,0,[ref('group_openerp_portal')])]"/>
<field name="domain_force">[('id','child_of',user.commercial_partner_id.id)]</field>
</record>
This commit re-introduces a correct behavior on the project sharing
feature, by allowing a portal user reading on assignees on task he
has access to, according to the project configuration.
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
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#76253- Belgian accounting installed and active in currenct company - Create a bank statement with a negative amount. - Post it and reconcile using model "Frais bancaires TVA21" Back to the bank statement, under Journal entries, the tax grids are wrong: it reports "+82", "-85" and "-63" but it should be "+82" and "+59" This occur because the system interpret the move as a refund. opw-2646291 Description of the issue/feature this PR addresses: Current behavior before PR: Desired beh
Original PR description
- Belgian accounting installed and active in currenct company - Create a bank statement with a negative amount. - Post it and reconcile using model "Frais bancaires TVA21" Back to the bank statement, under Journal entries, the tax grids are wrong: it reports "+82", "-85" and "-63" but it should be "+82" and "+59" This occur because the system interpret the move as a refund. opw-2646291 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#78470 Forward-Port-Of: odoo/odoo#77589
The allocation order is not based on the pickings order To reproduce the issue: (Need sale_management,mrp) 1. Create a storable product P 2. Create a BoM for another product dummy_P and add 1xP as component 3. Create and confirm a SO with 1x product P 4. Create and confirm a MO for 1x dummy_P 5. Process a receipt transfer with one P Error: On the SO, the reserved quantity is still 0. The product has been reserved for the MO, even if the picking of the SO has been created first T
Original PR description
The allocation order is not based on the pickings order To reproduce the issue: (Need sale_management,mrp) 1. Create a storable product P 2. Create a BoM for another product dummy_P and add 1xP as…
The allocation order is not based on the pickings order To reproduce the issue: (Need sale_management,mrp) 1. Create a storable product P 2. Create a BoM for another product dummy_P and add 1xP as component 3. Create and confirm a SO with 1x product P 4. Create and confirm a MO for 1x dummy_P 5. Process a receipt transfer with one P Error: On the SO, the reserved quantity is still 0. The product has been reserved for the MO, even if the picking of the SO has been created first The default order of several SM is based on the sequence and the identifier: https://github.com/odoo/odoo/blob/abc9fdaae2927214d98082f391a1dc0fc75e4c77/addons/stock/models/stock_move.py#L26 The default value of the field `sequence` is 10: https://github.com/odoo/odoo/blob/abc9fdaae2927214d98082f391a1dc0fc75e4c77/addons/stock/models/stock_move.py#L26 When creating a SO, the field isn't defined so its default value is used (10). However, when creating the MO, the field is defined thanks to the sequence of the related BOM line: https://github.com/odoo/odoo/blob/864d90a064f093bd6ba24d8464ee491a443a320e/addons/mrp/models/mrp_production.py#L940 Which, in our case, is equal to 1 As a result, when allocating the quantities in `_action_assign`, the recordset will contain first the SM of the MO and then the SM of the SO. OPW-2524205 Forward-Port-Of: odoo/odoo#78440 Forward-Port-Of: odoo/odoo#78164
### Expected Behaviour When a user reply to a mention (on an invoice, a client profile, ...) in a log_note, and this user answers directly in the chatbox, the answer should be considered as an internal discussion, and so be posted as a log_note. ### Observed behaviour Since V12, when a user reply in the chatbox, the reply is automatically set as a "send-message" reply, which is a issue as the user sends an email to all followers of the discussion while he probably thinks his answer will
Original PR description
### Expected Behaviour When a user reply to a mention (on an invoice, a client profile, ...) in a log_note, and this user answers directly in the chatbox, the answer should be considered as an…
### Expected Behaviour When a user reply to a mention (on an invoice, a client profile, ...) in a log_note, and this user answers directly in the chatbox, the answer should be considered as an internal discussion, and so be posted as a log_note. ### Observed behaviour Since V12, when a user reply in the chatbox, the reply is automatically set as a "send-message" reply, which is a issue as the user sends an email to all followers of the discussion while he probably thinks his answer will be visible only by the internal users. ### Reproducibility This bug can be reproduced following these steps: 1. Declare at least 2 users (A and B) and make sure user A handles notifications in Odoo 2. Log as user B, go anywhere in Odoo and mention the user A in a log_note 3. Log as user A, open the mention notification and reply in the chatbox 4. The answer will be noted as a send-message answer, sending then e-mails to all followers ... ### Problem Root Cause As long as the V12 isn't supported anymore, we didn't investigate this version. In V13, the issue comes from the fact the chatbox didn't use the same composer class as the discussion module, and then it's not possible to send a log note from the chatbox. In V14, as the discussion module has been totally refactored, the "error" comes from the arbitrary choice to set "false" as the default value of "isLog" on a general message, which implies that the answer from the chatbox is considered as a "send-message" and not as a "log-note". ### Validation - Wrong behaviour : https://drive.google.com/file/d/1Nx6v27vcxsCkJuifqD9-0T-Xmqc-Khhh/view (from JQU) - Correct behaviour : cf following screenshot, where we can see that an answer to a mention is now correclty set as log_note (by the bg color in the answer). This has also been validated to make sure a classical chat discussion wasn't impacted, as seen in the screenshot.  ### Related tickets opw-2602712 opw-2659484 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#78520
When installing the module, the current company didn't receive taxes and fiscal positions, even though the accounts were properly created. Forward-Port-Of: odoo/odoo#78549
Original PR description
When installing the module, the current company didn't receive taxes and fiscal positions, even though the accounts were properly created. Forward-Port-Of: odoo/odoo#78549
X-original-commit: d087fe2abc24864f668ada00d0dc5cd9fd23b7ce 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#78543
Original PR description
X-original-commit: d087fe2abc24864f668ada00d0dc5cd9fd23b7ce 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#78543
Description of the issue/feature this PR addresses: Because of this id `chart8111` for `account 811`, I was perplexed. I created access to this id `chart811` for find `account 811` out of habit, but I couldn't find it. Desired behavior after PR is merged: To make code easier, I believe it is not difficult to alter this external id. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#77073
Original PR description
Description of the issue/feature this PR addresses: Because of this id `chart8111` for `account 811`, I was perplexed. I created access to this id `chart811` for find `account 811` out of habit, but I couldn't find it. Desired behavior after PR is merged: To make code easier, I believe it is not difficult to alter this external id. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#77073
…gurator Forward-Port-Of: #21310 Forward-Port-Of: odoo/enterprise#21752
Original PR description
…gurator Forward-Port-Of: #21310 Forward-Port-Of: odoo/enterprise#21752
Until now documents_account created only one document per account.move to avoid creating unnecessary documents such as move logos created by mail. But for journal entries this should be different because if the user himself decides to put two attachments in an entry, documents_account should then create two documents OPW-2612279 Forward-Port-Of: odoo/enterprise#21385
Original PR description
Until now documents_account created only one document per account.move to avoid creating unnecessary documents such as move logos created by mail. But for journal entries this should be different because if the user himself decides to put two attachments in an entry, documents_account should then create two documents OPW-2612279 Forward-Port-Of: odoo/enterprise#21385
Following PR https://github.com/odoo/odoo/pull/77589 opw-2646291 Forward-Port-Of: odoo/enterprise#21733 Forward-Port-Of: odoo/enterprise#21665
Original PR description
Following PR https://github.com/odoo/odoo/pull/77589 opw-2646291 Forward-Port-Of: odoo/enterprise#21733 Forward-Port-Of: odoo/enterprise#21665
Steps to reproduce: - Connect a social marketing stream. - Create a new post and attach an image heavier than : ({ 'Twitter': 5MB, 'Linkedin': 8MB, 'Facebook': 30MB }). - Save and Post (The post should be Failed). - Click on Retry. Issue: Unknown error message on first post. Traceback is raised on click retry post. Cause: Image size exceeds social marketing platform limit. Solution: If unable to upload image, catch error message (if possible), set it
Original PR description
Steps to reproduce:
- Connect a social marketing stream.
- Create a new post and attach an image heavier than :
({ 'Twitter': 5MB, 'Linkedin': 8MB, 'Facebook': 30MB }).
- Save and Post (The post should be Failed).
- Click on Retry.
Issue:
Unknown error message on first post.
Traceback is raised on click retry post.
Cause:
Image size exceeds social marketing platform limit.
Solution:
If unable to upload image, catch error message (if possible), set it
as failure message on live_post + set live_post.state to 'failed'.
If batch, continue posting other Posts.
opw-2635861
Forward-Port-Of: odoo/enterprise#21686
Forward-Port-Of: odoo/enterprise#21183Source: https://www.socialsecurity.be/site_fr/employer/general/techlib.htm#glossary Forward-Port-Of: odoo/enterprise#21249 Forward-Port-Of: odoo/enterprise#21230
Original PR description
Source: https://www.socialsecurity.be/site_fr/employer/general/techlib.htm#glossary Forward-Port-Of: odoo/enterprise#21249 Forward-Port-Of: odoo/enterprise#21230
This PR will add a new test tour 'timesheet_record_time' that ensures you can correctly do the following steps without errors: - Open the app and start the timer - Choose a project - Stop the timer This simple flow has been the source of issues in the past ([#21525](https://github.com/odoo/enterprise/pull/21525)). Task-2664852 Forward-Port-Of: odoo/enterprise#21689
Original PR description
This PR will add a new test tour 'timesheet_record_time' that ensures you can correctly do the following steps without errors: - Open the app and start the timer - Choose a project - Stop the timer This simple flow has been the source of issues in the past ([#21525](https://github.com/odoo/enterprise/pull/21525)). Task-2664852 Forward-Port-Of: odoo/enterprise#21689
Issue : When scrapping a manufacturing order for which a quality point is set setup, if the quality check for that MO was deleted, a QC is created for the scrap move Steps to reproduce: 1) Create a Quality Point for Manufacturing on All operations 2) Create a Manufacturing Order for a product 3) A check is created, delete it 4) Scrap the Manufacturing Order -> Bug, a check is created for the scrap Why is that a bug: According to a discussion in the ticket, a scrapping should
Original PR description
Issue : When scrapping a manufacturing order for which a quality point is set setup, if the quality check for that MO was deleted, a QC is created for the scrap move Steps to reproduce: 1) Create a Quality Point for Manufacturing on All operations 2) Create a Manufacturing Order for a product 3) A check is created, delete it 4) Scrap the Manufacturing Order -> Bug, a check is created for the scrap Why is that a bug: According to a discussion in the ticket, a scrapping should not trigger a quality point Side-Note: Sometimes even without deleting the quality check for the MO, the quality check for the scrapping still appears, but the steps to reproduce I wrote will trigger the same bug 100% of the time on a fresh or not fresh DB opw-2537909 Forward-Port-Of: odoo/enterprise#21492 Forward-Port-Of: odoo/enterprise#20494