Thursday, November 28, 2024
37 changes · saas-17.4
Resolved issues and error corrections
Documents added in a Bill of Materials chatter are no longer incorrectly copied to related products or other Bills of Materials. This restores the previous behavior so attachments stay with the intended BoM, reducing confusion when products have multiple BoMs.
Original PR description
In 85bf63d028ffff3dd7eeda186cc32f9ae7d09a60, the BoM chatter behavious was modified to add the document added there on the product/product template of the BoM. This is not correct as if a product has multiple BoM's, it'll add it to all BoM's and on the product. opw-? -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects an automated website form editor test by removing an unintended extra setting. It helps keep quality checks reliable without changing the website experience for users.
Original PR description
With this PR [1], unfortunately an extra parameter `isCheck` was introduced in the tour. This commit removes that unusual parameter. [1]: https://github.com/odoo/odoo/pull/168474 runbot-107873 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix restores accurate fetching of engagement data for LinkedIn posts in Social Marketing. Users can now see like information on LinkedIn stream posts as expected, improving visibility into campaign performance.
Original PR description
Reproduce --- - -i social - Social Marketing -> Add Stream - Add post -> give it a like on linkedin - BUG: Like information not fetched opw-4190850
Miscellaneous changes
When the write is called with multiple companies (like the test TestAccountComposerPerformance), the values are updated with the values of the very first company. This will write a new peppol_endpoint on all companies. However, in this test, the very first company is a BE one but another is FR. Then, this write makes an inconsistency between the original FR EAS and the new BE endpoint. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of:
Original PR description
When the write is called with multiple companies (like the test TestAccountComposerPerformance), the values are updated with the values of the very first company. This will write a new peppol_endpoint on all companies. However, in this test, the very first company is a BE one but another is FR. Then, this write makes an inconsistency between the original FR EAS and the new BE endpoint. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188985
Revert the following fix: https://github.com/odoo/odoo/commit/5e3b471f4a67553d6f7525595b15dc3d7b4efb3f Which is no longer necessary since we have streams: https://github.com/odoo/odoo/commit/da8def8e410de68256ba4ab09ebf7a8b699355ac In particular, media must be returned with code 206 and a range, which is now the case. Forward-Port-Of: odoo/odoo#189008 Forward-Port-Of: odoo/odoo#188872
Original PR description
Revert the following fix: https://github.com/odoo/odoo/commit/5e3b471f4a67553d6f7525595b15dc3d7b4efb3f Which is no longer necessary since we have streams: https://github.com/odoo/odoo/commit/da8def8e410de68256ba4ab09ebf7a8b699355ac In particular, media must be returned with code 206 and a range, which is now the case. Forward-Port-Of: odoo/odoo#189008 Forward-Port-Of: odoo/odoo#188872
### Steps to reproduce: - Install 'l10n_sa' and switch to a Saudi company - Do not have the Arabic language installed - try to generate a Customer Invoice - An error pops up ### Cause: The way the language is retrieved changed in saas-17.2 from `lang='ar_001'` to `lang=o.env['res.lang']._get_code('ar_001')` The forward port of this [commit](https://github.com/odoo/odoo/commit/f1fa69f6a924a68bad4b10e6854f8caae89b43c3) from 16.0 does not adapt to the way the language is retrieved. ### S
Original PR description
### Steps to reproduce:
- Install 'l10n_sa' and switch to a Saudi company
- Do not have the Arabic language installed
- try to generate a Customer Invoice
- An error pops up
### Cause:
The way the language is retrieved changed in saas-17.2 from `lang='ar_001'` to `lang=o.env['res.lang']._get_code('ar_001')` The forward port of this [commit](https://github.com/odoo/odoo/commit/f1fa69f6a924a68bad4b10e6854f8caae89b43c3) from 16.0 does not adapt to the way the language is retrieved.
### Solution:
Use the new way to retrieve the language.
opw-4303367
Forward-Port-Of: odoo/odoo#188662### Steps to reproduce: - Create two alias domains - Create a Helpdesk team with alias name 'test' for example and with one of the alias domains created in the first step - Create another helpdesk team with the same alias name but with the other alias domain created in the first step - Notice the 'Invalid operation' pop-up that will be shown ### Current behavior before PR: This is happening because when creating the helpdesk team we should get the alias creation values but when getti
Original PR description
### Steps to reproduce: - Create two alias domains - Create a Helpdesk team with alias name 'test' for example and with one of the alias domains created in the first step - Create another helpdesk team with the same alias name but with the other alias domain created in the first step - Notice the 'Invalid operation' pop-up that will be shown ### Current behavior before PR: This is happening because when creating the helpdesk team we should get the alias creation values but when getting those values we are passing a default value for the alias_domain_id in the context https://github.com/odoo/odoo/blob/17.0/addons/mail/models/mail_alias_mixin_optional.py#L70:L72 which change the alias_domain_id value that will be used for the helpdesk team creation. ### Desired behavior after PR is merged: We are checking if the alias_domain_id is present in the vals_list or not and if it does exist we don't change it. opw-4286060 Forward-Port-Of: odoo/odoo#186474
Currently, the assert function returns undefined, which is why this test case is passing. However, assert always returns undefined, regardless of whether the value satisfies the condition or not. task-4354290 Forward-Port-Of: odoo/odoo#188923
Original PR description
Currently, the assert function returns undefined, which is why this test case is passing. However, assert always returns undefined, regardless of whether the value satisfies the condition or not. task-4354290 Forward-Port-Of: odoo/odoo#188923
This commit fixes the blank page when we print documents with PDF.js. It seems that pdf.js lib won't fix it because it's platform specific. We first try to fix this issue by hiding the "Download" and "Print" buttons as you can see in [1] but in this case, it's the only way to be able to dowload or print the document. So we patched the lib with the fix given inside the thread issue [2]. Steps to reproduce: - Open Odoo on the Android mobile App - Go to "Shop Floor" - Click on 'WH/
Original PR description
This commit fixes the blank page when we print documents with PDF.js. It seems that pdf.js lib won't fix it because it's platform specific. We first try to fix this issue by hiding the "Download" and "Print" buttons as you can see in [1] but in this case, it's the only way to be able to dowload or print the document. So we patched the lib with the fix given inside the thread issue [2]. Steps to reproduce: - Open Odoo on the Android mobile App - Go to "Shop Floor" - Click on 'WH/MO/00003' > 'Assembly 1' > 'Worksheet' - Click the print button on pdf.js toolbar => blank screen opw-4190135 [1]: https://github.com/odoo/odoo/commit/8a755d58330218b550efc0fea2f98800151c09a5 [2]: https://github.com/mozilla/pdf.js/issues/10630#issuecomment-855754913 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188804 Forward-Port-Of: odoo/odoo#188650
Backport of PR odoo/odoo#182407 for 17.0. The major difference is the removal of the batching of `orderpoint._qty_in_progress` and the removal of the check on the inter-company location as this was only introduced in 17.4. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186978 Forward-Port-Of: odoo/odoo#183964
Original PR description
Backport of PR odoo/odoo#182407 for 17.0. The major difference is the removal of the batching of `orderpoint._qty_in_progress` and the removal of the check on the inter-company location as this was only introduced in 17.4. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186978 Forward-Port-Of: odoo/odoo#183964
Related to https://github.com/odoo/enterprise/pull/73927 Forward-Port-Of: odoo/odoo#187499 Forward-Port-Of: odoo/odoo#187430
Original PR description
Related to https://github.com/odoo/enterprise/pull/73927 Forward-Port-Of: odoo/odoo#187499 Forward-Port-Of: odoo/odoo#187430
When the session of the kiosk is closed in the backoffice, the kiosk is supposed to show the "We are closed" banner and to no longer accept orders. Currently, this is not the case. In this commit we fix the issue Task: 4219525 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183285 Forward-Port-Of: odoo/odoo#182081
Original PR description
When the session of the kiosk is closed in the backoffice, the kiosk is supposed to show the "We are closed" banner and to no longer accept orders. Currently, this is not the case. In this commit we fix the issue Task: 4219525 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183285 Forward-Port-Of: odoo/odoo#182081
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#188190
Original PR description
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#188190
This PR fixes multiple issues related to the mass_mailing_html_field used in `marketing_automation` and in `mass_mailing` modules. 1) The iframe scrollbar is hidden behind the snippets sidebar in fullscreen mode - concerns: mass_mailing, marketing_automation 2) In fullscreen mode, the iframe is not scrollable while dragging a snippet from the sidebar - concerns: mass_Mailing, marketing_automation 3) The snippets sidebar overlaps with the content - concerns: mass_mailing, marketing
Original PR description
This PR fixes multiple issues related to the mass_mailing_html_field used in `marketing_automation` and in `mass_mailing` modules. 1) The iframe scrollbar is hidden behind the snippets sidebar in fullscreen mode - concerns: mass_mailing, marketing_automation 2) In fullscreen mode, the iframe is not scrollable while dragging a snippet from the sidebar - concerns: mass_Mailing, marketing_automation 3) The snippets sidebar overlaps with the content - concerns: mass_mailing, marketing_automation 4) The snippets sidebar height in a dialog is too big - concerns: marketing_automation See individual commits for further explanation. task-4178640 Co-authored-by: Astik Singh <assi@odoo.com> Co-authored-by: Damien Abeloos <abd@odoo.com> Co-authored-by: Mahdi Cheikh Rouhou <macr@odoo.com> Co-authored-by: Shubham Thanki <shut@odoo.com> Forward-Port-Of: odoo/odoo#187134
Forward-Port-Of: odoo/odoo#188632
Original PR description
Forward-Port-Of: odoo/odoo#188632
Currently, an error occurs when splitting a backorder of MO's. Step to produce: - Install the 'mrp' module. - Enable work orders in the settings. - Create a BOM for a product P with an operation: - OP1: Assembly line 1, duration 10 minutes. - Create and confirm an MO for 5 units of P. - Add a Work Center and Operation in the work order line. - Set a producing quantity of 2. - Validate the MO and create a backorder. - Open a backorder of MO, Select a backorder that is in a confirmed
Original PR description
Currently, an error occurs when splitting a backorder of MO's. Step to produce: - Install the 'mrp' module. - Enable work orders in the settings. - Create a BOM for a product P with an operation: -…
Currently, an error occurs when splitting a backorder of MO's.
Step to produce:
- Install the 'mrp' module.
- Enable work orders in the settings.
- Create a BOM for a product P with an operation: - OP1: Assembly line 1, duration 10 minutes.
- Create and confirm an MO for 5 units of P.
- Add a Work Center and Operation in the work order line.
- Set a producing quantity of 2.
- Validate the MO and create a backorder.
- Open a backorder of MO, Select a backorder that is in a confirmed state.
- Click on the 'Action' button to split a backorder into two productions.
See Traceback:
```
TypeError: argument of type 'NoneType' is not iterable
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 40, in call_button
action = call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/mrp/wizard/mrp_batch_produce.py", line 59, in action_done
return self._production_text_to_object(mark_done=True)
File "addons/mrp/wizard/mrp_batch_produce.py", line 90, in _production_text_to_object
productions = self.production_id._split_productions({self.production_id: productions_amount})
File "home/odoo/src/enterprise/18.0/mrp_workorder/models/mrp_production.py", line 87, in _split_productions
productions = super()._split_productions(amounts=amounts, cancel_remaining_qty=cancel_remaining_qty, set_consumed_qty=set_consumed_qty)
File "addons/mrp/models/mrp_production.py", line 1996, in _split_productions
if workorder.production_id.id not in self.env.context.get('mo_ids_to_backorder', []):
```
An error occurs because the system retrieves a None value for 'mo_ids_to_backorder' from the context at [1], which is not iterable. This causes issues as an iterable value is expected.
Link [1]: https://github.com/odoo/odoo/blob/99e2b13416256a0a23a1a619b92873bcfe15b8a9/addons/mrp/models/mrp_production.py#L1846
To resolve this issue, provide an empty list
for 'mo_ids_to_backorder' if the retrieved value is None instead of an iterable.
Sentry-6080156727
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#188434Before this commit, all fields of product tags were loaded into PoS, which was unnecessary. For example, product templates field and product variants field, which contain all products with that tag, were loaded. This caused performance issues when there were a high number of products using tags. This commit fixes the issue by only loading the name field, which is needed in PoS. opw-4343131 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Po
Original PR description
Before this commit, all fields of product tags were loaded into PoS, which was unnecessary. For example, product templates field and product variants field, which contain all products with that tag, were loaded. This caused performance issues when there were a high number of products using tags. This commit fixes the issue by only loading the name field, which is needed in PoS. opw-4343131 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188667 Forward-Port-Of: odoo/odoo#188405
**Current behavior:** With a product that is invoiced based on ordered qty, has avg costing, and real time valuation: it is possible to invoice and received quantity in such an order that, when there is a landed cost associated with an invoice instance of the product, the standard price of the product may be updated with an incorrect value. **Expected behavior:** Product cost follows 'average' selection logically. **Steps to reproduce:** *Enable anglo-saxon accounting* 1. Create
Original PR description
**Current behavior:** With a product that is invoiced based on ordered qty, has avg costing, and real time valuation: it is possible to invoice and received quantity in such an order that, when there…
**Current behavior:** With a product that is invoiced based on ordered qty, has avg costing, and real time valuation: it is possible to invoice and received quantity in such an order that, when there is a landed cost associated with an invoice instance of the product, the standard price of the product may be updated with an incorrect value. **Expected behavior:** Product cost follows 'average' selection logically. **Steps to reproduce:** *Enable anglo-saxon accounting* 1. Create a product with: * real time property valuation * average cost method * on ordered quantities control policy 2. Create a purchase order for the product, for 100 000 units of the product at 1.35 each -> confirm the order 3. Create an invoice for 23 000 units, receive 23 000 units and backorder the rest 4. Create a landed cost on the invoice for 23 000 in the company currency units 5. Post the invoice 6. Create a second invoice for 27 000 units and post it 7. Receive 27 000 more units from the receipt 8. See that the product standard price is not the expected value of 1.81 **Cause of the issue:** The landed cost on the invoice is not taken into account. Since the price unit for the moves informing the new price value are obtained with `_get_price_unit()`, we end up only taking into account the sum value of the invoice lines linked to the move. So the landed cost does not get included in the subsequent price unit calculation here: https://github.com/odoo/odoo/blob/22e7bfb591c43e849c554eb4c128279d76ad31f9/addons/stock_account/models/stock_move.py#L328 **Fix:** Extract a method which returns invoice lines to the `_get_price_unit()` method of purchase_stock so that we may return line records that represent landed costs that will otherwise be omitted. opw-4048396 Forward-Port-Of: odoo/odoo#188427 Forward-Port-Of: odoo/odoo#185889
Since this commit [1], where the "media dialog insert media" was added, the runbot sometimes fails because the tour contacts the "media-api.odoo.com" API, which is not allowed in a tour. This commit fixes the issue by inserting an icon instead of an image, as the icon does not require any API call. [1]: https://github.com/odoo/odoo/commit/2231148db55cfc6fa3f3f5b2b5c5250b74f2feac runbot-107920 Forward-Port-Of: odoo/odoo#188551 Forward-Port-Of: odoo/odoo#188480
Original PR description
Since this commit [1], where the "media dialog insert media" was added, the runbot sometimes fails because the tour contacts the "media-api.odoo.com" API, which is not allowed in a tour. This commit fixes the issue by inserting an icon instead of an image, as the icon does not require any API call. [1]: https://github.com/odoo/odoo/commit/2231148db55cfc6fa3f3f5b2b5c5250b74f2feac runbot-107920 Forward-Port-Of: odoo/odoo#188551 Forward-Port-Of: odoo/odoo#188480
Currently, an error occurs when the user attempts to preview an invoice, and invoice date is not available. Step to produce: - Install the ```account``` module. - Create a new invoice, add a customer name and invoice line, and add a 'Payment Terms' which have an 'Early Discount' available. - 'Cancel' this invoice. - Click on the 'Preview' button (ensure that the invoice has no date). ```TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta'``` An error occurs whe
Original PR description
Currently, an error occurs when the user attempts to preview an invoice, and invoice date is not available. Step to produce: - Install the ```account``` module. - Create a new invoice, add a customer name and invoice line, and add a 'Payment Terms' which have an 'Early Discount' available. - 'Cancel' this invoice. - Click on the 'Preview' button (ensure that the invoice has no date). ```TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta'``` An error occurs when the system attempts to calculate the discount days with the invoice date, but the invoice date is not available there. To resolve this issue, we hide the preview button on canceled invoices. Sentry-6006569495 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188134 Forward-Port-Of: odoo/odoo#184817
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint. https://github.com/odoo/odoo/blob/5ba361ddffa757cf60968f37180c7fd1304b3fd4/odoo/models.py#L3209 Replacing `%` by `%%` works for `LIKE` operator because they are equivalent. Since they are sent as-is to the DB the constraint could actually be plainly wrong. ```sql test_17=> SELECT coalesce(d.description, p
Original PR description
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint.…
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint. https://github.com/odoo/odoo/blob/5ba361ddffa757cf60968f37180c7fd1304b3fd4/odoo/models.py#L3209
Replacing `%` by `%%` works for `LIKE` operator because they are equivalent. Since they are sent as-is to the DB the constraint could actually be plainly wrong.
```sql
test_17=> SELECT coalesce(d.description, pg_get_constraintdef(c.oid))
FROM pg_constraint c
JOIN pg_class t
ON t.oid = c.conrelid
LEFT JOIN pg_description d
ON c.oid = d.objoid
WHERE t.relname = 'ir_model_fields'
AND conname = 'ir_model_fields_name_manual_field'
+------------------------------------------------+
| coalesce |
|------------------------------------------------|
| CHECK (state != 'manual' OR name LIKE 'x\_%%') |
+------------------------------------------------+
```
Example where the definition sent to the DB is wrong:
```py
class A(models.Model):
_inherit = "res.users"
_sql_constraints = [("test_constraint", "CHECK (login !~ '%')", "Cannot have % in login")]
```
```sql
test_17=> \d res_users
...
Check constraints:
"res_users_test_constraint" CHECK (login::text !~ '%%'::text)
...
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#188593Issue ===== When a GS1 barcode is scanned, if it starts with a FNC1, it can't be parsed. How to reproduce ================ - In Inventory Settings, select "Default GS1 Nomenclature" as the used nomenclature; - Create a product with a valid EAN13 as barcode (eg. 1234567891231); - Open the Barcode app, then the Inventory Adjustments; - Scan a GS1 barcode for the created product who start with the FNC1 (eg. "\x1D0101234567891231") -> The product's barcode is not decoded. Solution
Original PR description
Issue ===== When a GS1 barcode is scanned, if it starts with a FNC1, it can't be parsed. How to reproduce ================ - In Inventory Settings, select "Default GS1 Nomenclature" as the used nomenclature; - Create a product with a valid EAN13 as barcode (eg. 1234567891231); - Open the Barcode app, then the Inventory Adjustments; - Scan a GS1 barcode for the created product who start with the FNC1 (eg. "\x1D0101234567891231") -> The product's barcode is not decoded. Solution ======== To fix this issue, before to be parsed, the given barcode will be cleaned and if it starts with a FNC1, it will be removed from the string. opw-4118637 Forward-Port-Of: odoo/odoo#188162 Forward-Port-Of: odoo/odoo#187875
Introduced in #57155 (commit da29586). Steps to reproduce: - Install Odoo on a Windows machine - The install path defaults to Program Files as expected - Uninstall Odoo - Try to install Odoo again - The install path defaults to the empty string, forcing the user to manually set one Expected behaviour: - The install path defaults to the previous install path task-4104451 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-O
Original PR description
Introduced in #57155 (commit da29586). Steps to reproduce: - Install Odoo on a Windows machine - The install path defaults to Program Files as expected - Uninstall Odoo - Try to install Odoo again - The install path defaults to the empty string, forcing the user to manually set one Expected behaviour: - The install path defaults to the previous install path task-4104451 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188637
Raise an error when the user tries to load syscebnl template the same way we block syscohada, as those templates should not be used directly. chart added in https://github.com/odoo/odoo/pull/166211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187274
Original PR description
Raise an error when the user tries to load syscebnl template the same way we block syscohada, as those templates should not be used directly. chart added in https://github.com/odoo/odoo/pull/166211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187274
Steps to reproduce: - create two workcenters, one having a shift with a lunch pause (WC A) (i.e. the default 40hours week will do the job), the other having no lunch pause (WC B). - create a MO with a work order of a sufficient duration to be splitted in two part (before and after lunch) (6h for instance) and add it on the WC A. - plan the MO - go to the planning by workcenter view - move the WO from WC A to WC B (in the same day) - move it back to WC A (in the same day) - move the WO a
Original PR description
Steps to reproduce: - create two workcenters, one having a shift with a lunch pause (WC A) (i.e. the default 40hours week will do the job), the other having no lunch pause (WC B). - create a MO with…
Steps to reproduce: - create two workcenters, one having a shift with a lunch pause (WC A) (i.e. the default 40hours week will do the job), the other having no lunch pause (WC B). - create a MO with a work order of a sufficient duration to be splitted in two part (before and after lunch) (6h for instance) and add it on the WC A. - plan the MO - go to the planning by workcenter view - move the WO from WC A to WC B (in the same day) - move it back to WC A (in the same day) - move the WO a day later (on the same WC) Problem: The duration displayed changes from 6h (correct one) to 7h on the first step, which is incorrect. Moving the MO back to it's original WC will change the time to 5h which is also incorrect, but moving it a day later fixes the issue (6h) The problem is that computing the date_finished in the write method is incorrect when `workcenter_id` is in vals, as calling `_calculate_date_finished` will return the value computed with the non-modified yet workcenter opw-4321104 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188130 Forward-Port-Of: odoo/odoo#187864
This commit will correct the fact that the siret and APE number must be displayed also when the country code is from the DOM-TOM task:4290323 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188383 Forward-Port-Of: odoo/odoo#185862
Original PR description
This commit will correct the fact that the siret and APE number must be displayed also when the country code is from the DOM-TOM task:4290323 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188383 Forward-Port-Of: odoo/odoo#185862
Install mass-mailing and crm. Change the email address of Brandon to a@example.com;b@example.com. In the list view of crm, add the select all leads and change their customer to Brandon (the customer column is not displayed by default, just make it visible). Create a new mass-mailing with the recipient list as "Lead/Opportunity". Start the campaign. Brandon receives as many emails as there are leads but he shall only receive one. The system has a known limitation when it comes to filtering dup
Original PR description
Install mass-mailing and crm. Change the email address of Brandon to a@example.com;b@example.com. In the list view of crm, add the select all leads and change their customer to Brandon (the customer…
Install mass-mailing and crm. Change the email address of Brandon to a@example.com;b@example.com. In the list view of crm, add the select all leads and change their customer to Brandon (the customer column is not displayed by default, just make it visible). Create a new mass-mailing with the recipient list as "Lead/Opportunity". Start the campaign. Brandon receives as many emails as there are leads but he shall only receive one. The system has a known limitation when it comes to filtering duplicates: it skips all records that have multiple recipients. In this case Brandon has two: [a@example.com](mailto:a@example.com) and [b@example.com](mailto:b@example.com). The de-duplication mechanism was skipped for every lead he was the customer of and each time a new email was sent, spamming him. In this work we make it possible to also process records with multiple recipients. It is a best-effort and will still let some duplicates through. Nonetheless it solves the current problem with minimal changes. Note: any([]) and any(['']) are both False while all([]) is True, hence we now check for empty list / empty email first otherwise an empty list would be considered to be opt-out instead of empty. Task-3927361 Forward-Port-Of: odoo/odoo#186799 Forward-Port-Of: odoo/odoo#186149
Description of the issue/feature this PR addresses: This PR adds the signed corporate Contributor License Agreement (CLA) for Xcellent Exchange, allowing contributions from our organization to the Odoo repository in compliance with Odoo's contribution policies. Current behavior before PR: Contributions from Xcellent Exchange are not formally recognized due to the absence of a signed CLA in the Odoo repository. Desired behavior after PR is merged: The signed corporate CLA for Xcellent Ex
Original PR description
Description of the issue/feature this PR addresses: This PR adds the signed corporate Contributor License Agreement (CLA) for Xcellent Exchange, allowing contributions from our organization to the Odoo repository in compliance with Odoo's contribution policies. Current behavior before PR: Contributions from Xcellent Exchange are not formally recognized due to the absence of a signed CLA in the Odoo repository. Desired behavior after PR is merged: The signed corporate CLA for Xcellent Exchange is added to the Odoo repository. Contributions from Xcellent Exchange can be properly acknowledged and merged. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188672
The query in `_get_invoice_matching_so_candidates` will frequently plan a Seq Scan because of the low selectivity of the conditions. And when it does not, the number of rows returned by the CTE is expected to high. Because of that, filtering the resulting rows by a sequence of `OR` conditions can quickly become slow. In this commit, the `OR` conditions are replaced by `LIKE(ANY(ARRAY[]))` conditions. That way the CTE is only referenced once in the conditions and applying the filter on each ro
Original PR description
The query in `_get_invoice_matching_so_candidates` will frequently plan a Seq Scan because of the low selectivity of the conditions. And when it does not, the number of rows returned by the CTE is…
The query in `_get_invoice_matching_so_candidates` will frequently plan a Seq Scan because of the low selectivity of the conditions. And when it does not, the number of rows returned by the CTE is expected to high. Because of that, filtering the resulting rows by a sequence of `OR` conditions can quickly become slow. In this commit, the `OR` conditions are replaced by `LIKE(ANY(ARRAY[]))` conditions. That way the CTE is only referenced once in the conditions and applying the filter on each row is way faster. We also discarded duplicated `text_tokens` to reduce the size of the `ARRAY`. The reason why using a `LIKE(ANY(ARRAY[]))` is faster is because postgres inlines the CTE in the outer query. This means that it performs a Seq Scan on sale.order and injects the CTE definition of sub.name inside the `WHERE` conditions of the outer query, along with injecting the `WHERE` conditions of the CTE. So, the regex functions are distributed among the `OR` conditions. I.e. every `OR` condition left operand will contain the regex functions. As those have to be executed for every `OR` condition, this quickly becomes slow. We can explicitely materialize the CTE to avoid that. This makes postgres evaluate the regex functions only once. But it will still have lots of `OR` conditions to check along with running pattern matching for each one of them. `LIKE(ANY(ARRAY[]))` avoids this issue. The CTE is still inlined but since we now only have a single condition, the regex functions are only evaluated once and pattern matched once against an array of options. This makes the whole query faster and scale better. #### speedup Customer database with 808341 sale.orders. Query timing when increasing the number of text tokens. | Number of tokens | Before PR | After PR | |:-------------------:|:----------:|:--------:| | 2 | 7s | 1.3s | | 5 | 10s | 1.3s | | 10 | 18s | 1.4s | | 20 | 33s | 1.55s | opw-4329067 opw-4316765 Forward-Port-Of: odoo/enterprise#73755
Fix validation to ensure the CFDI origin field is assigned properly. Prevents cases like `04|`, ensuring the UUID is correctly validated. Before: `{'tipo_relacion': '04', 'cfdi_relationado_list': ['']}` After: `{'tipo_relacion': '04', 'cfdi_relationado_list': []}` Forward-Port-Of: odoo/enterprise#74226
Original PR description
Fix validation to ensure the CFDI origin field is assigned properly. Prevents cases like `04|`, ensuring the UUID is correctly validated.
Before:
`{'tipo_relacion': '04', 'cfdi_relationado_list': ['']}`
After:
`{'tipo_relacion': '04', 'cfdi_relationado_list': []}`
Forward-Port-Of: odoo/enterprise#74226Issue ===== When tracked product setting was disabled, the "Group by products" barcode setting for operation type was ignored. How to reproduce ================ - Install `stock_barcode_picking_batch`; - Ensure "Lots & Serial Numbers" is disabled, to be sure, go in Inventory > Configuration > Settings; - Now, go in Configuration > Operation Type > Receipts > Barcode App, and check "Group batch lines"; - Create a receipt for a product and confirm it; - Duplicate this receipt and co
Original PR description
Issue ===== When tracked product setting was disabled, the "Group by products" barcode setting for operation type was ignored. How to reproduce ================ - Install `stock_barcode_picking_batch`; - Ensure "Lots & Serial Numbers" is disabled, to be sure, go in Inventory > Configuration > Settings; - Now, go in Configuration > Operation Type > Receipts > Barcode App, and check "Group batch lines"; - Create a receipt for a product and confirm it; - Duplicate this receipt and confirm it aswell; - Add these two pickings in a batch and open it in the Barcode app -> You can see the lines for the same product are not grouped. Cause ===== The issue was, in the `BarcodeModel` code, we skip the method who group the lines if tracking is disabled. [task-4291149](https://www.odoo.com/odoo/project.task/4353554) Forward-Port-Of: odoo/enterprise#74696
### Steps to reproduce: - In Accounting Dashboard, click on "import file" in the Bank kanban box - Select a CSV file with two missing values on a line, for example: ``` Transaction Type,Bank Reference,Narrative,Debit Amount,Credit Amount TRANSFER,bank_ref_1,bank_statement_line_1,,1000 TRANSFER,,bank_statement_line_2,,3500 ``` (missing `bank_ref_2`) - Complete the Odoo fields: Transaction Type, Reference, Label, Debit, Credit - Import - Go in Accounting Dashboard > Bank Reconciliation
Original PR description
### Steps to reproduce: - In Accounting Dashboard, click on "import file" in the Bank kanban box - Select a CSV file with two missing values on a line, for example: ``` Transaction Type,Bank…
### Steps to reproduce: - In Accounting Dashboard, click on "import file" in the Bank kanban box - Select a CSV file with two missing values on a line, for example: ``` Transaction Type,Bank Reference,Narrative,Debit Amount,Credit Amount TRANSFER,bank_ref_1,bank_statement_line_1,,1000 TRANSFER,,bank_statement_line_2,,3500 ``` (missing `bank_ref_2`) - Complete the Odoo fields: Transaction Type, Reference, Label, Debit, Credit - Import - Go in Accounting Dashboard > Bank Reconciliation and select the list view - `bank_statement_line_2` appears in Reference instead of Label ### Cause: In `_parse_import_data` some line values are added and some are expected to be removed. The values expected to be removed are stored by index but they are removed by value. In this case the index supposed to be removed is 3 but its value is empty like index 1. On the line `line.remove(line[index])` the first occurrence is removed, so index 1 is removed instead of 3. ### Solution: Use `del` to remove by index. opw-4319464 Forward-Port-Of: odoo/enterprise#74512
Related to https://github.com/odoo/odoo/pull/187430 Forward-Port-Of: odoo/enterprise#73969 Forward-Port-Of: odoo/enterprise#73927
Original PR description
Related to https://github.com/odoo/odoo/pull/187430 Forward-Port-Of: odoo/enterprise#73969 Forward-Port-Of: odoo/enterprise#73927
Since `xlrd >= 2.0` dropped XLSX support, we use `openpyxl` to open XLSX files if the `xlrd >= 2.0` is installed.[^1] However, the tests in `account_base_import` are skipped unless `xlrd.xlsx` can be imported. As a result, they are not run on runbot, where `xlrd >= 2.0` is installed. We therefore need to avoid skipping them if openpyxl is installed. runbot-108001 [^1]: https://github.com/odoo/odoo/pull/169245 Forward-Port-Of: odoo/enterprise#74676 Forward-Port-Of: odoo/enterprise#74
Original PR description
Since `xlrd >= 2.0` dropped XLSX support, we use `openpyxl` to open XLSX files if the `xlrd >= 2.0` is installed.[^1] However, the tests in `account_base_import` are skipped unless `xlrd.xlsx` can be imported. As a result, they are not run on runbot, where `xlrd >= 2.0` is installed. We therefore need to avoid skipping them if openpyxl is installed. runbot-108001 [^1]: https://github.com/odoo/odoo/pull/169245 Forward-Port-Of: odoo/enterprise#74676 Forward-Port-Of: odoo/enterprise#74608
The module description of `account_sepa_direct_debit` in the manifest states that posting an invoice will automatically generate a payment. Actually that feature was dropped in Odoo 13 with commit e3d390c4455c620793c481874b4503fa91bb6125 but the `__manifest__.py` was not updated at that time. This makes the situation uncomfortable where a feature not present in the code is still advertised in the module description. This commit updates the description of the module in the manifest. Forward-P
Original PR description
The module description of `account_sepa_direct_debit` in the manifest states that posting an invoice will automatically generate a payment. Actually that feature was dropped in Odoo 13 with commit e3d390c4455c620793c481874b4503fa91bb6125 but the `__manifest__.py` was not updated at that time. This makes the situation uncomfortable where a feature not present in the code is still advertised in the module description. This commit updates the description of the module in the manifest. Forward-Port-Of: odoo/enterprise#74532 Forward-Port-Of: odoo/enterprise#73380
Currently the view has the default priority and become the main search view for product despite being specific to industry_fsm_sale. It creates issues in inventory at date view where the filters doesn't exist due to this. Forward-Port-Of: odoo/enterprise#74600
Original PR description
Currently the view has the default priority and become the main search view for product despite being specific to industry_fsm_sale. It creates issues in inventory at date view where the filters doesn't exist due to this. Forward-Port-Of: odoo/enterprise#74600
this commit prevent the auto installation of the french payroll because it's not up to date and currently maintained task-4283506 Forward-Port-Of: odoo/enterprise#72980
Original PR description
this commit prevent the auto installation of the french payroll because it's not up to date and currently maintained task-4283506 Forward-Port-Of: odoo/enterprise#72980