Wednesday, January 8, 2025
46 changes · saas-18.1
Enhancements to existing features
Odoo IoT boxes can now automatically print their status using Zebra label printers, in addition to Epson and STAR printers. This makes setup and troubleshooting easier for businesses that rely on Zebra hardware.
Original PR description
Before this commit, the IoT box would only automatically print its status using Epson or STAR printers. This commit adds status printing support for ZPL (Zebra) printers. task-4460563 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The IoT Box image now includes a more helpful Vim editor configuration for people working directly on the device. This makes maintenance easier by adding code highlighting, file type detection, a status bar, and mouse support in the editor.
Original PR description
This PR adds some features to the vim configuration used on the IoT Box (a new image is needed to make it work) 1. `filetype on` allows vim to detect the file extension and adjust syntax highglighting accordingly 2. `set laststatus=2` allows to display useful infobar at the bottom of the editor 3. `set mouse=a` enables the mouse in vim 4. `syntax on` uses colors to highlight code in vim
Miscellaneous changes
Before this commit, the "Record created" message, shown as the very 1st message of chatter, had some horizontal start padding in text content. This was unaligned with header and looks off. This was happening because the message looks like a logged note, but it didn't have the `.o-note` modifier class to put the appropriate padding for the body of message with such a look. Due to the missing `.o-note` classname, this was assuming the style was the one with a bubble around, which needs extra pa
Original PR description
Before this commit, the "Record created" message, shown as the very 1st message of chatter, had some horizontal start padding in text content. This was unaligned with header and looks off. This was…
Before this commit, the "Record created" message, shown as the very 1st message of chatter, had some horizontal start padding in text content. This was unaligned with header and looks off. This was happening because the message looks like a logged note, but it didn't have the `.o-note` modifier class to put the appropriate padding for the body of message with such a look. Due to the missing `.o-note` classname, this was assuming the style was the one with a bubble around, which needs extra padding, hence the problematic padding. This commit fixes the issue by adding `.o-note` in classname of such message notification that looks like a logged note, so that the padding matches the one with logged note. task-4291913 Before / After <img width="245" alt="Screenshot 2025-01-08 at 12 51 17" src="https://github.com/user-attachments/assets/8e388a88-705f-4c19-a6ec-d2168f1e6e56" /> <img width="243" alt="Screenshot 2025-01-08 at 12 50 48" src="https://github.com/user-attachments/assets/092b1508-d663-4336-900a-b55875437c05" /> Forward-Port-Of: odoo/odoo#192860
When printing long product names with long variants, the lines were overlapping. Steps to reproduce: ------------------- * Create a product with some long variant names * Setup a kitchen printer * Add the order to a PoS order * Print the order on the kitchen printer > Observation: The product name and variant name are overlapping Before:  After:  After:  opw-4414311 Forward-Port-Of: odoo/odoo#192690 Forward-Port-Of: odoo/odoo#192544
# Description When we reload the chart of accounts parsed CSV data is altered after iterating the first company because we are Only updating the tags of existing taxes For existing tax, we are mapping repartition lines here https://github.com/odoo/odoo/blob/a4c14fab299ed98024b7d7148d89bf17e914ccd1/addons/account/models/chart_template.py#L359 So that data_list has been altered after for the next company for the next iterator company, it has been eligible for obsolete here https://githu
Original PR description
# Description When we reload the chart of accounts parsed CSV data is altered after iterating the first company because we are Only updating the tags of existing taxes For existing tax, we are…
# Description
When we reload the chart of accounts parsed CSV data is altered after iterating
the first company because we are Only updating the tags of existing taxes
For existing tax, we are mapping repartition lines here https://github.com/odoo/odoo/blob/a4c14fab299ed98024b7d7148d89bf17e914ccd1/addons/account/models/chart_template.py#L359
So that data_list has been altered after for the next company
for the next iterator company, it has been eligible for obsolete here https://github.com/odoo/odoo/blob/a4c14fab299ed98024b7d7148d89bf17e914ccd1/addons/account/models/chart_template.py#L400
So, it is better to keep parsing data as it is while reloading the chart accounts for each company
TBG: [Traceback Group-1421](https://upgrade.odoo.com/web#id=1421&cids=1&menu_id=107&model=upgrade.request.traceback.group&view_type=form)
OPWS:
- [4391978](https://www.odoo.com/odoo/project/70/tasks/4391978)
- [4402365](https://www.odoo.com/odoo/70/tasks/4402365)
```py
2024-12-26 10:21:46,303 16 INFO higo_2397155_18.0 odoo.addons.base.models.ir_module: module l10n_in_withholding: no translation for language en_IN
2024-12-26 10:21:47,426 16 INFO higo_2397155_18.0 odoo.addons.l10n_in_withholding: Company Repose Foods Private Limited already has the Indian localization installed, updating...
> /home/odoo/src/odoo/18.0/addons/account/models/chart_template.py(322)_pre_reload_data()
-> for model_name, records in data.items():
(Pdb) len([i for i in data['account.tax'].values() if i.get('name')])
163
(Pdb) c
> /home/odoo/src/odoo/18.0/addons/account/models/chart_template.py(397)_pre_reload_data()
-> if obsolete_xmlid:
(Pdb) len([i for i in data['account.tax'].values() if i.get('name')])
75
(Pdb) c
2024-12-26 10:22:14,417 16 INFO higo_2397155_18.0 odoo.addons.l10n_in_withholding: Company M/S Repose already has the Indian localization installed, updating...
> /home/odoo/src/odoo/18.0/addons/account/models/chart_template.py(322)_pre_reload_data()
-> for model_name, records in data.items():
(Pdb) len([i for i in data['account.tax'].values() if i.get('name')])
75
(Pdb) c
> /home/odoo/src/odoo/18.0/addons/account/models/chart_template.py(397)_pre_reload_data()
-> if obsolete_xmlid:
(Pdb) l
392 skip_update.add((model_name, xmlid))
393
394 for skip_model, skip_xmlid in skip_update:
395 data[skip_model].pop(skip_xmlid, None)
396 import pdb; pdb.set_trace()
397 -> if obsolete_xmlid:
398 self.env['ir.model.data'].search([
399 ('name', 'in', [f"{company.id}_{xmlid}" for xmlid in obsolete_xmlid]),
400 ('module', '=', 'account'),
401 ]).unlink()
402
(Pdb) len(obsolete_xmlid)
88
(Pdb) c
2024-12-26 10:22:56,209 16 INFO higo_2397155_18.0 odoo.models.unlink: User #1 deleted ir.model.data records with IDs: [48827, 48804, 48815, 48813, 48823, 48828, 48811, 48809, 48807, 48821, 48817, 48819, 48805, 48812, 48816, 48814, 48806, 48810, 48808, 48822, 48818, 48820, 48824, 48826, 48825, 48887, 48888, 48829, 48831, 48833, 48835, 48843, 48848, 48856, 48862, 48865, 48867, 48869, 48871, 48873, 48877, 48889, 48839, 48858, 48885, 48890, 48830, 48832, 48834, 48836, 48841, 48844, 48846, 48847, 48849, 48850, 48852, 48854, 48857, 48859, 48861, 48863, 48866, 48868, 48870, 48876, 48872, 48874, 48881, 48884, 48886, 48878, 48840, 48855, 48864, 48882, 48837, 48838, 48879, 48891, 48842, 48845, 48851, 48853, 48860, 48875, 48880, 48883]
2024-12-26 10:22:56,738 16 ERROR higo_2397155_18.0 odoo.sql_db: bad query: b'INSERT INTO "account_tax" ("active", "amount", "amount_type", "company_id", "country_id", "create_date", "create_uid", "description", "formula", "include_base_amount", "invoice_label", "is_base_affected", "l10n_in_section_id", "l10n_in_tds_tax_type", "name", "sequence", "tax_exigibility", "tax_group_id", "tax_scope", "type_tax_use", "write_date", "write_uid") ...
```
**Traceback**
```py
2024-12-26 06:49:10,588 26 INFO higo_2403300_18.0 odoo.addons.l10n_in_withholding: Company Sah Estates already has the Indian localization installed, updating...
2024-12-26 07:14:31,217 26 INFO higo_2403300_18.0 odoo.addons.l10n_in_withholding: Company sahaccounts already has the Indian localization installed, updating...
2024-12-26 07:16:43,050 26 INFO higo_2403300_18.0 odoo.models.unlink: User #1 deleted ir.model.data records with IDs: [26281, 26258, 26269, 26267, 26277, 26282, 26265, 26263, 26261, 26275, 26271, 26273, 26259, 26266, 26270, 26268, 26260, 26264, 26262, 26276, 26272, 26274, 26278, 26280, 26279, 26341, 26342, 26283, 26285, 26287, 26289, 26297, 26302, 26310, 26316, 26319, 26321, 26323, 26325, 26327, 26331, 26343, 26293, 26312, 26339, 26344, 26284, 26286, 26288, 26290, 26295, 26298, 26300, 26301, 26303, 26304, 26306, 26308, 26311, 26313, 26315, 26317, 26320, 26322, 26324, 26330, 26326, 26328, 26335, 26338, 26340, 26332, 26294, 26309, 26318, 26336, 26291, 26292, 26333, 26345, 26296, 26299, 26305, 26307, 26314, 26329, 26334, 26337]
2024-12-26 07:35:03,359 28 ERROR higo_2397155_18.0 odoo.modules.registry: Failed to load registry
2024-12-26 07:35:03,359 28 CRITICAL higo_2397155_18.0 odoo.service.server: Failed to initialize database `higo_2397155_18.0`.
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/service/server.py", line 1306, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-13>", line 2, in new
File "/home/odoo/src/odoo/18.0/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/odoo/modules/registry.py", line 127, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 480, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 364, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 245, in load_module_graph
getattr(py_module, post_init)(env)
File "/home/odoo/src/odoo/18.0/addons/l10n_in_withholding/__init__.py", line 26, in _l10n_in_withholding_post_init
ChartTemplate._load_data(data)
File "/tmp/tmpqk9sqppy/migrations/account/0.0.0/pre-ensure-deferred-accounts.py", line 36, in _load_data
return super()._load_data(data, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/addons/account/models/chart_template.py", line 635, in _load_data
created_records[model] = self.with_context(lang='en_US').env[model]._load_records(all_records_vals, ignore_duplicates=ignore_duplicates)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5467, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5371, in _load_records_create
records = self.create(vals_list)
File "<decorator-gen-228>", line 2, in create
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 480, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/18.0/addons/account/models/account_tax.py", line 599, in create
taxes = super(AccountTax, self.with_context(context)).create([self._sanitize_vals(vals) for vals in vals_list])
File "<decorator-gen-140>", line 2, in create
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 480, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/18.0/addons/mail/models/mail_thread.py", line 268, in create
threads = super(MailThread, self).create(vals_list)
File "<decorator-gen-120>", line 2, in create
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 480, in _model_create_multi
return create(self, arg)
File "/tmp/tmpqk9sqppy/migrations/util/orm.py", line 244, in wrapper
return f(*args, **kwargs)
File "/tmp/tmpqk9sqppy/migrations/base/0.0.0/pre-models-match_uniq.py", line 96, in create
records = super().create([vals_list[idx] for idx in create_idx_list])
File "<decorator-gen-31>", line 2, in create
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 480, in _model_create_multi
return create(self, arg)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 4975, in create
records = self._create(data_list)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5159, in _create
cr.execute(SQL(
File "/home/odoo/src/odoo/18.0/odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
psycopg2.errors.NotNullViolation: null value in column "name" of relation "account_tax" violates not-null constraint
DETAIL: Failing row contains (1941, 18, 1, 12, null, 104, 1, 1, sale, null, percent, on_invoice, null, null, null, 0.0000, t, f, t, null, 2024-12-26 07:34:58.528488, 2024-12-26 07:34:58.528488, price_unit * 0.10, null, null, null, null, null).
```
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#191770Those constraints are blocking the flow for no good reason as we - don't find them in the official documentation - they don't really make sense in the context of a credit note Therefore we decide to remove them for credit notes. They don't seem to be required for the facturx validity. task-4454115 Forward-Port-Of: odoo/odoo#192495
Original PR description
Those constraints are blocking the flow for no good reason as we - don't find them in the official documentation - they don't really make sense in the context of a credit note Therefore we decide to remove them for credit notes. They don't seem to be required for the facturx validity. task-4454115 Forward-Port-Of: odoo/odoo#192495
[FIX] html_editor: space removal by wrapInlinesInBlocks <- fix required for the following one [FIX] html_editor: outdent list item with empty nodes task-4398327 Forward-Port-Of: odoo/odoo#190484
Original PR description
[FIX] html_editor: space removal by wrapInlinesInBlocks <- fix required for the following one [FIX] html_editor: outdent list item with empty nodes task-4398327 Forward-Port-Of: odoo/odoo#190484
By design, nested combos aren't supported (i.e. products of type `combo` can't be used as combo items). However, since we used a python constraint to enforce this, it was still possible to change the type of a product to `combo` after using it as a combo item. To prevent this, we changed the python constraint to an SQL constraint. Forward-Port-Of: odoo/odoo#192172
Original PR description
By design, nested combos aren't supported (i.e. products of type `combo` can't be used as combo items). However, since we used a python constraint to enforce this, it was still possible to change the type of a product to `combo` after using it as a combo item. To prevent this, we changed the python constraint to an SQL constraint. Forward-Port-Of: odoo/odoo#192172
Before this commit: pos_stripe doesn't specify a Stripe version when doing its requests. Because of this, Stripe defaults to the API version defined on the Stripe account. This varies from customer to customer, as it is automatically configured to use the latest API version available when the first API request is received. Stripe regularly makes breaking changes to their API: https://docs.stripe.com/changelog?breaking=true for example removing the `charges` attribute: https://docs.stripe.com
Original PR description
Before this commit: pos_stripe doesn't specify a Stripe version when doing its requests. Because of this, Stripe defaults to the API version defined on the Stripe account. This varies from customer to customer, as it is automatically configured to use the latest API version available when the first API request is received. Stripe regularly makes breaking changes to their API: https://docs.stripe.com/changelog?breaking=true for example removing the `charges` attribute: https://docs.stripe.com/changelog/2022-11-15/removes-charges-attribute-paymentintent which we use in pos_stripe. After this commit: We rely on payment_stripe._stripe_make_request which hardcode the API version number. Such change was already started in `pos_stripe.stripe_capture_payment` opw-4375876 Forward-Port-Of: odoo/odoo#192008
**Current behavior before PR:** Messages posted by visitors in demo data incorrectly displayed the author name as `Odoobot` instead of `Visitor`. This happened because the messages created for visitors in the demo data do not have the `author_id` field explicitly set to `False`, leading the `_message_compute_author()` method to compute the author incorrectly. **Desired behavior after PR is merged:** Messages posted by visitors in demo data correctly display the author name as Visitor
Original PR description
**Current behavior before PR:** Messages posted by visitors in demo data incorrectly displayed the author name as `Odoobot` instead of `Visitor`. This happened because the messages created for visitors in the demo data do not have the `author_id` field explicitly set to `False`, leading the `_message_compute_author()` method to compute the author incorrectly. **Desired behavior after PR is merged:** Messages posted by visitors in demo data correctly display the author name as Visitor. Task-[4420677](https://www.odoo.com/odoo/project/1519/tasks/4420677) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192003
Description of the issue this PR addresses: Current behavior before PR: Triple-clicking to select text, with a nextSibling set as contenteditable false, would reset the selection to its previous state. Desired behavior after PR is merged: Correct the triple click selection when applying font-size. task-4440354 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192387 Forward-Port-Of: odoo/odoo#192139
Original PR description
Description of the issue this PR addresses: Current behavior before PR: Triple-clicking to select text, with a nextSibling set as contenteditable false, would reset the selection to its previous state. Desired behavior after PR is merged: Correct the triple click selection when applying font-size. task-4440354 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192387 Forward-Port-Of: odoo/odoo#192139
### Steps to reproduce: - Insert a table. - Observe the HTML, noticing that the table does not have a fixed width or height. - Insert a new column or row. - Observe the HTML, noticing that the width and/or height of the table has been fixed. ### Description of the issue/feature this PR addresses: - When a new column is inserted into the table, the table's width is fixed, and the widths of the first row/column cells (TDs and THs) are also fixed. - When a new row is inserted, the hei
Original PR description
### Steps to reproduce: - Insert a table. - Observe the HTML, noticing that the table does not have a fixed width or height. - Insert a new column or row. - Observe the HTML, noticing that the width and/or height of the table has been fixed. ### Description of the issue/feature this PR addresses: - When a new column is inserted into the table, the table's width is fixed, and the widths of the first row/column cells (TDs and THs) are also fixed. - When a new row is inserted, the height is added to the table rows (TRs), even if the table initially did not have fixed dimensions. ### Desired behavior after PR is merged: - The width and height of the table will not be fixed when a new column or row is added, as long as the table did not have fixed dimensions (width/height) to begin with. task-4402552 Forward-Port-Of: odoo/odoo#190814
Before this commit, when going back from the payment screen to the product screen, the search bar wasn't visible. opw-4318710 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188058
Original PR description
Before this commit, when going back from the payment screen to the product screen, the search bar wasn't visible. opw-4318710 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188058
[FIX] portal, point_of_sale: return new instance of fields list This commit contains a backport of https://github.com/odoo/odoo/commit/1e39d5c2e5f4d4c77b0190ea1eb4781e2143657f to fix the following issue: In the l10n_mx localization, the field RFC(VAT) and zipcode should be required to prevent the field from being defaulted to "public en general". How to reproduce: -Install l10n_mx -Go to POS and sell an article to generate the ticket -Go to the POS portal to request an invoice -Fill
Original PR description
[FIX] portal, point_of_sale: return new instance of fields list This commit contains a backport of https://github.com/odoo/odoo/commit/1e39d5c2e5f4d4c77b0190ea1eb4781e2143657f to fix the following issue: In the l10n_mx localization, the field RFC(VAT) and zipcode should be required to prevent the field from being defaulted to "public en general". How to reproduce: -Install l10n_mx -Go to POS and sell an article to generate the ticket -Go to the POS portal to request an invoice -Fill all the fields except for RFC -Odoo does not request this field and allows the client to submit the information -The invoice will be generated to "public en general" and not to the client requesting the invoice (Expected when there is no RFC) opw-4332357 enterprise pr: https://github.com/odoo/enterprise/pull/74072 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192167 Forward-Port-Of: odoo/odoo#187674
When we aggregate one of the field of "product.product" introduced by 'product_margin' module, it will generate a SQL update on all records read. It is because we call the compute method manually without protecting computed fields, which will lead to call BaseModel.write() that update write_date/write_uid. Fix it by calling `compute_value` of one of the field. ### Notes - Should we backport it in 17.0 but then we need to backport https://github.com/odoo/odoo/pull/155585 too ? Al
Original PR description
When we aggregate one of the field of "product.product" introduced by 'product_margin' module, it will generate a SQL update on all records read. It is because we call the compute method manually without protecting computed fields, which will lead to call BaseModel.write() that update write_date/write_uid. Fix it by calling `compute_value` of one of the field. ### Notes - Should we backport it in 17.0 but then we need to backport https://github.com/odoo/odoo/pull/155585 too ? Also for the 16.0 ? - For master: remove the return of `_compute_product_margin_fields_values`, people shouldn't call that manually too avoid the issue mention in the commit message. Forward-Port-Of: odoo/odoo#192629
Context: In Peppol, we have multiple EDI mode: - `production` that will call the real Peppol infrastructure, - `test` that will call the sandbox Peppol, - `demo` that makes no call at all, everything is mocked. By default, runbots and demo data are set to `demo`. In tests, the value is therefore also `demo`, which is what we want: No call to external services. Before this commit, we were doing some weird and useless override in the handling of demo functions, which is useless: if you w
Original PR description
Context: In Peppol, we have multiple EDI mode: - `production` that will call the real Peppol infrastructure, - `test` that will call the sandbox Peppol, - `demo` that makes no call at all, everything is mocked. By default, runbots and demo data are set to `demo`. In tests, the value is therefore also `demo`, which is what we want: No call to external services. Before this commit, we were doing some weird and useless override in the handling of demo functions, which is useless: if you want to test Odoo in a particular mode, just set it (this is what we do in Peppol tests' `setUpClass`), for all other tests, keeping the default demo mode should be preferred. This was a problem because tests ran by other modules with Peppol installed were trying to make external calls. task-no Forward-Port-Of: odoo/odoo#192560
Based on PEPPOL-COMMON-R042 (https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/PEPPOL-COMMON-R042/) when using the 0184 scheme the VAT number should be used (CVR number prefixed by the country code) @JulienVR @smetl --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190952
Original PR description
Based on PEPPOL-COMMON-R042 (https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/PEPPOL-COMMON-R042/) when using the 0184 scheme the VAT number should be used (CVR number prefixed by the country code) @JulienVR @smetl --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190952
With previous refactor, we simplified the demo mode by trying to mock the fewer methods possible. In particular, we are aligning all calls to proxy to go through the `_call_peppol_proxy(...)`. This should simplify future refactoring work to get rid of account_edi_x models. Some calls to make_request were still existing, since it's no longer mocked in demo mode, an error is raised. Replace all those calls to use the `_call_peppol_proxy` method. task-no Forward-Port-Of: odoo/odoo#192649
Original PR description
With previous refactor, we simplified the demo mode by trying to mock the fewer methods possible. In particular, we are aligning all calls to proxy to go through the `_call_peppol_proxy(...)`. This should simplify future refactoring work to get rid of account_edi_x models. Some calls to make_request were still existing, since it's no longer mocked in demo mode, an error is raised. Replace all those calls to use the `_call_peppol_proxy` method. task-no Forward-Port-Of: odoo/odoo#192649
**Problem**: When selecting all content (`Ctrl+A`) in an empty editable area, the selection includes only a `<br>` element. This causes issues when interacting with non-selectable content inside the selection, leading to unexpected behavior. **Solution**: If the selection contains only on `br` element, reset the selection on click to avoid inconsistent states. **Steps to Reproduce**: 1. Open the editor. 2. Press `Ctrl+A` to select all. 3. Click anywhere within the editable area to hid
Original PR description
**Problem**: When selecting all content (`Ctrl+A`) in an empty editable area, the selection includes only a `<br>` element. This causes issues when interacting with non-selectable content inside the selection, leading to unexpected behavior. **Solution**: If the selection contains only on `br` element, reset the selection on click to avoid inconsistent states. **Steps to Reproduce**: 1. Open the editor. 2. Press `Ctrl+A` to select all. 3. Click anywhere within the editable area to hide the toolbar. 4. Observe that the toolbar remains visible, and the selection state does not update. opw-4438513 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192084
Step to Reproduce: 1. Enter the edit mode of Homepage 2. click on drop zone area having "Drag building blocks here" message. -> sometime the "drag and drop a building block here" unexpectedly moves up. which should stay as it is. Before this commit, all `<p>` and `<div>` elements were considered as potential PowerBox elements, making them editable using the `/` command. This occurred even when the elements had the `o_not_editable` class or `contenteditable="false"` attribute. For
Original PR description
Step to Reproduce: 1. Enter the edit mode of Homepage 2. click on drop zone area having "Drag building blocks here" message. -> sometime the "drag and drop a building block here" unexpectedly moves…
Step to Reproduce: 1. Enter the edit mode of Homepage 2. click on drop zone area having "Drag building blocks here" message. -> sometime the "drag and drop a building block here" unexpectedly moves up. which should stay as it is. Before this commit, all `<p>` and `<div>` elements were considered as potential PowerBox elements, making them editable using the `/` command. This occurred even when the elements had the `o_not_editable` class or `contenteditable="false"` attribute. For example, in the case of the `#wrap` element, it has the `o_editable` class along with `contenteditable="false"`. This caused PowerBox element or placeholders to be added unnecessarily, even though no text editing was allowed. In this commit, we adapted the solution merged[1] in master and specify the selector to make sure that no command hint shown on div while having `o_not_editable` class or `contenteditable=false` attribute. [1] https://github.com/odoo/odoo/commit/302250cdde936a47048b8f3403e024e2e617ace7 Before this PR :  Desired behavior after PR is merged: No hint/placeholder is added to contenteditable false block, resulting in data editor message to stay on its place. task-3443430 Forward-Port-Of: odoo/odoo#192012 Forward-Port-Of: odoo/odoo#153001
Before this commit, when the user sets a project as a default value for his tasks, that default value will also be applied inside To-Do app because a to-do is in fact a private task (that is, a task without any project set). This commit adds a default value inside the context of the main action used in To-Do to make sure the default value for `project_id` field in To-Do is false and nothing else. Steps to reproduce ================== 1. Install Project app 2. Go to Project app 3. Sel
Original PR description
Before this commit, when the user sets a project as a default value for his tasks, that default value will also be applied inside To-Do app because a to-do is in fact a private task (that is, a task…
Before this commit, when the user sets a project as a default value for his tasks, that default value will also be applied inside To-Do app because a to-do is in fact a private task (that is, a task without any project set). This commit adds a default value inside the context of the main action used in To-Do to make sure the default value for `project_id` field in To-Do is false and nothing else. Steps to reproduce ================== 1. Install Project app 2. Go to Project app 3. Select/create a project 4. Select/create and edit a task inside 5. Enable the debug mode 6. Click on debug menu and select `Set Default Values` 7. Apply `project = <your project selected/created>` and save 8. Go to To-Do app 9. Create a to-do Expected Behavior ----------------- A to-do should be created without any issue in the kanban view. Current Behavior ---------------- A form view will be displayed inside a modal to create the to-do but the form view is in fact the one used in Project app and the project set is the one set as default value instead of having no project since the user is creating a to-do and not a task inside that project. Forward-Port-Of: odoo/odoo#192205 Forward-Port-Of: odoo/odoo#191583
- add check on `employee_id` to the contract domain to exclude templates from the contract count on the stat buttons as it gives misleading info about the real contracts count Task: 4402795 Forward-Port-Of: odoo/odoo#192145
Original PR description
- add check on `employee_id` to the contract domain to exclude templates from the contract count on the stat buttons as it gives misleading info about the real contracts count Task: 4402795 Forward-Port-Of: odoo/odoo#192145
Before this commit, if you validated an order while offline and then synced the order when back online, the post-process loyalty actions would not occur, resulting in data not being updated on the server. opw-4290171 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187238
Original PR description
Before this commit, if you validated an order while offline and then synced the order when back online, the post-process loyalty actions would not occur, resulting in data not being updated on the server. opw-4290171 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187238
Since the introduction of new layouts (e.g. folder), the invoice number is not displayed in Hungary. This is because the xpath is incorrect because the new layouts now have two children instead of one. The old ones only had one child node: https://github.com/odoo/odoo/blob/4dad76c045f94861632929189baa96d69f662275/addons/web/views/report_templates.xml#L478-L506 Whereas the new ones have two: https://github.com/odoo/odoo/blob/4dad76c045f94861632929189baa96d69f662275/addons/web/views
Original PR description
Since the introduction of new layouts (e.g. folder), the invoice number is not displayed in Hungary. This is because the xpath is incorrect because the new layouts now have two children instead of…
Since the introduction of new layouts (e.g. folder), the invoice number is not displayed in Hungary. This is because the xpath is incorrect because the new layouts now have two children instead of one. The old ones only had one child node: https://github.com/odoo/odoo/blob/4dad76c045f94861632929189baa96d69f662275/addons/web/views/report_templates.xml#L478-L506 Whereas the new ones have two: https://github.com/odoo/odoo/blob/4dad76c045f94861632929189baa96d69f662275/addons/web/views/report_templates.xml#L535-L550 https://github.com/odoo/odoo/blob/4dad76c045f94861632929189baa96d69f662275/addons/web/views/report_templates.xml#L551-L579 So the problem with the current xpath is that it's replacing both children, even though only the second one should be. By 'replacing' the first one (by iffing it), `layout_document_title` is not displayed anymore and therefore no invoice number appears on the invoice. To fix this, we use a different xpath on the `img` parent. For consistency and maintainability reasons, we apply this new xpath on all the layouts and not just the new ones. opw-4397438 Forward-Port-Of: odoo/odoo#192650
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from th
Original PR description
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string >…
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from the search bar: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L685 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/views/product_views.xml#L78 This trick is notably used in order to take the warehouse into account in the computation of the various quantity fields associated to products by generating custom location domains: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L136-L137 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L250-L255 However, since that context key was added via the search bar, it type might be: a string, an integerId or a list of either/both other types. (E.g. to create a list of a string and integer type and select a string and then type a string allowing you to find a real warehouse id that you can select after clicking on the dropdown arrow). Therefore, in order to be properly used, this context key needs to be parsed to be used properly as done in the `_get_domain_locations` for instance. However, the `warehouse` context key is used at many other places in the code, each time expecting a single integer id, and since the warehouse context key is not cleaned from one action to an other you are technically able to provide a string where the code is expecting a an integer. ### Fix: The proper fix of this use case would be to change the context key name used by the search view to only match flows expecting such a context. However, this change is not stable as it requires to modify a view and hence can't be applied before master (18.1). As such, in prior versions, we add a context parser for to extract a single integer id from the `warehouse` context key where it is used but unexpected to match something else. ### Note: This patch will improve other fixes and hopefully prevent yet unoticed error raised by this issue: 903d8beeea5d332e556ef81e231a3b8b4c51cd45 and afa7c6bf25c9de5fc0c878faa29e1cc35bc11805 opw-4290818 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190490 Forward-Port-Of: odoo/odoo#187413
Steps: - Install sale app. - Upload PO field which contain EDI data. Issue: - Order is not imported properly and giving error. Cause: - When `_retrieve_line_vals` call from order edi it should not contain invoice related values but when `account.move.line` has `deferred_start_date` and `deferred_end_date` it return those field even it called from order edi and SOL does not contain those fields Fix: - Move invoice related specific code in other method and only keep generic code
Original PR description
Steps: - Install sale app. - Upload PO field which contain EDI data. Issue: - Order is not imported properly and giving error. Cause: - When `_retrieve_line_vals` call from order edi it should not contain invoice related values but when `account.move.line` has `deferred_start_date` and `deferred_end_date` it return those field even it called from order edi and SOL does not contain those fields Fix: - Move invoice related specific code in other method and only keep generic code which can be used in both invoice and order in generic method to ensure there is no invoice flow impacted by order edi and vice versa. Issued PR: https://github.com/odoo/odoo/pull/191487 Forward-Port-Of: odoo/odoo#192278
**Current behavior:** Setting a global lead time may result in this time being counted twice in the breakdown of the replenishment for some orderpoint. **Expected behavior:** The global lead time should be counted one time. **Steps to reproduce:** 1. Create a product with a subcontracted BoM 2. Set the system parameter stock.visiblity_days = 365 3. Create a supplierinfo (vendor) on the subcontracted product with 0 delay (lead time) 4. Create a sale order for the subcontracted p
Original PR description
**Current behavior:** Setting a global lead time may result in this time being counted twice in the breakdown of the replenishment for some orderpoint. **Expected behavior:** The global lead time…
**Current behavior:** Setting a global lead time may result in this time being counted twice in the breakdown of the replenishment for some orderpoint. **Expected behavior:** The global lead time should be counted one time. **Steps to reproduce:** 1. Create a product with a subcontracted BoM 2. Set the system parameter stock.visiblity_days = 365 3. Create a supplierinfo (vendor) on the subcontracted product with 0 delay (lead time) 4. Create a sale order for the subcontracted product 5. In the replenishment report, create an orderpoint for the product and click the (i) on the tree view line 6. See that global visibility days are double-counted **Cause of the issue:** `_get_lead_days()` is called twice here, the second time it ignores vendor lead time but re-counts global visibility days. **Fix:** Ignore the global visibility in a similar manner via context the second time. opw-4370201 Forward-Port-Of: odoo/odoo#190297 Forward-Port-Of: odoo/odoo#189857
When the user tries to reset the password, a traceback will appear. Steps to reproduce the error: - Install ``auth_signup`` - Configure "Outgoing mail server" - Now Log out - Click on Sign in > Reset Password > Enter your email > Click on ``Reset Password`` twice Traceback: ``` InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block File "odoo/http.py", line 2365, in __call__ response = request._serve_db() File "odoo/htt
Original PR description
When the user tries to reset the password, a traceback will appear. Steps to reproduce the error: - Install ``auth_signup`` - Configure "Outgoing mail server" - Now Log out - Click on Sign in > Reset…
When the user tries to reset the password, a traceback will appear.
Steps to reproduce the error:
- Install ``auth_signup``
- Configure "Outgoing mail server"
- Now Log out
- Click on Sign in > Reset Password > Enter your email >
Click on ``Reset Password`` twice
Traceback:
```
InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
File "odoo/http.py", line 2365, in __call__
response = request._serve_db()
File "odoo/http.py", line 1892, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1955, 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 1922, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2082, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 331, in _dispatch
result.flatten()
File "odoo/http.py", line 1389, in flatten
self.response.append(self.render())
File "odoo/http.py", line 1381, in render
return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
File "home/odoo/src/enterprise/18.0/web_studio/models/ir_ui_view.py", line 1315, in _render_template
return super(View, self)._render_template(template, values)
File "odoo/addons/base/models/ir_ui_view.py", line 2185, in _render_template
return self.env['ir.qweb']._render(template, values)
File "odoo/tools/profiler.py", line 306, in _tracked_method_render
return method_render(self, template, values, **options)
File "odoo/addons/base/models/ir_qweb.py", line 597, in _render
template_functions, def_name = irQweb._compile(template)
File "odoo/tools/profiler.py", line 314, in _tracked_compile
return method_compile(self, template)
File "odoo/addons/base/models/ir_qweb.py", line 666, in _compile
return self._load_values(base_key_cache, generate_functions)
File "odoo/addons/base/models/ir_qweb.py", line 2524, in _load_values
return get_value()
File "odoo/addons/base/models/ir_qweb.py", line 635, in generate_functions
code, options, def_name = self._generate_code(template)
File "odoo/addons/base/models/ir_qweb.py", line 691, in _generate_code
element, document, ref = self._get_template(template)
File "odoo/addons/base/models/ir_qweb.py", line 822, in _get_template
doc_or_elem, ref = self._load(ref_alias) or (None, None)
File "odoo/addons/base/models/ir_qweb.py", line 859, in _load
view = IrUIView._get(ref)
File "odoo/addons/base/models/ir_ui_view.py", line 2085, in _get
return self.browse(self._get_view_id(view_ref))
File "odoo/addons/base/models/ir_ui_view.py", line 2073, in _get_view_id
view = self.sudo().search([('key', '=', template)], limit=1)
File "odoo/models.py", line 1717, in search
return self.search_fetch(domain, [], offset=offset, limit=limit, order=order)
File "odoo/models.py", line 1749, in search_fetch
return self._fetch_query(query, fields_to_fetch)
File "odoo/models.py", line 4180, in _fetch_query
fetched = self.browse(query)
File "odoo/models.py", line 6154, in browse
if not ids:
File "odoo/tools/query.py", line 261, in __bool__
return bool(self.get_result_ids())
File "odoo/tools/query.py", line 225, in get_result_ids
self._ids = tuple(id_ for id_, in self._env.execute_query(self.select()))
File "odoo/api.py", line 962, in execute_query
self.cr.execute(query)
File "odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
```
After this commit, user can not click on ``Reset Password`` button multiple times.
sentry-5661309399
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#190833
Forward-Port-Of: odoo/odoo#184862**Steps to reproduce:** - Install point_of_sale and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create a product with an UNSPSC Category - In POS settings, enable "Use QR code on ticket" option - Open a POS session - Make an orders with the created product (without invoice) - Print the receipt - Close the POS session - Scan the QR code on the receipt with a mobile (Or just open the link retrieved from the QR code in a browser from the computer without being
Original PR description
**Steps to reproduce:** - Install point_of_sale and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create a product with an UNSPSC Category - In POS settings, enable "Use QR…
**Steps to reproduce:** - Install point_of_sale and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create a product with an UNSPSC Category - In POS settings, enable "Use QR code on ticket" option - Open a POS session - Make an orders with the created product (without invoice) - Print the receipt - Close the POS session - Scan the QR code on the receipt with a mobile (Or just open the link retrieved from the QR code in a browser from the computer without being logged) - Enter all the required data - Click several times on "Get my invoice" button quickly to generate the invoice **Issue:** Several concurrent processes are executed to create the invoice. In the Mexican localization, an electronic invoice is also generated and signed. However, an error is raised when trying to commit the electronic invoice document from the concurrent processes. These errors prevents the normal flow to continue after the creation of the invoice and the reversal of the POS closing entry is not generated as expected. **Solution:** Disable the "Get my invoice" button when the form is submitted to prevent concurrent calls to the action. opw-4399540 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192016
**Steps to reproduce:** - Install hr_expense - Create 2 alias domains - Go to "Settings / Technical / Email / Aliases" - Check the values for Expense model - Go to Expenses settings - Change the prefix and the domain of the alias - Save - Go to "Settings / Technical / Email / Aliases" - Check the values for Expense model again **Issue:** The prefix has correctly been modified but not the domain. The domain from Expenses settings and the domain of the Expense alias are different.
Original PR description
**Steps to reproduce:** - Install hr_expense - Create 2 alias domains - Go to "Settings / Technical / Email / Aliases" - Check the values for Expense model - Go to Expenses settings - Change the…
**Steps to reproduce:** - Install hr_expense - Create 2 alias domains - Go to "Settings / Technical / Email / Aliases" - Check the values for Expense model - Go to Expenses settings - Change the prefix and the domain of the alias - Save - Go to "Settings / Technical / Email / Aliases" - Check the values for Expense model again **Issue:** The prefix has correctly been modified but not the domain. The domain from Expenses settings and the domain of the Expense alias are different. **Cause:** The domain field in Expenses settings is in fact the Email Domain (alias_domain_id) of the company, which makes no sense to combine the prefix and the domain from 2 different sources. **Solution:** Add a non-stored computed field to map the domain displayed in Expenses settings with the domain of the Expense alias. Not great in stable, but there is no other way if we want to keep the option. opw-4293936 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192571 Forward-Port-Of: odoo/odoo#190252
Current behavior before PR: - In mass mailing, when the link popover opens, clicking on a link that is available near the edge of the mailing template beside the sidebar would sometimes cause the popover to appear behind the sidebar. Desired behavior after PR is merged: - Clicking on a link near the edge of the mailing template now ensures that the link popover opens correctly within the body of the mailing template. task-4237091 Forward-Port-Of: odoo/odoo#187873
Original PR description
Current behavior before PR: - In mass mailing, when the link popover opens, clicking on a link that is available near the edge of the mailing template beside the sidebar would sometimes cause the popover to appear behind the sidebar. Desired behavior after PR is merged: - Clicking on a link near the edge of the mailing template now ensures that the link popover opens correctly within the body of the mailing template. task-4237091 Forward-Port-Of: odoo/odoo#187873
In Bank Statement list view users may select a statement and download a pdf report. However, currently, users have 2 download action, one of which is downloading a seemingly random account move Steps to reproduce: - In Accounting Dashboard, from a bank journal card, 3 dots > Statements - Select a line - Download > PDF Issue: PDF target is loaded via the `loadExtraPrintItems` method However, the request is done to the `account.move` model using the id of the bank statement, so it may
Original PR description
In Bank Statement list view users may select a statement and download a pdf report. However, currently, users have 2 download action, one of which is downloading a seemingly random account move Steps to reproduce: - In Accounting Dashboard, from a bank journal card, 3 dots > Statements - Select a line - Download > PDF Issue: PDF target is loaded via the `loadExtraPrintItems` method However, the request is done to the `account.move` model using the id of the bank statement, so it may retrieve an invoice, or fail Note: Download > Statement is working properly A solution is to avoid loading extra print item with loadExtraPrintItems if we are not in the `account.move` model opw-4388554 Forward-Port-Of: odoo/odoo#192346
Description of the issue this PR addresses: Current behavior before PR: It was not possible to use the move node handler when the collaborator is on the same node, because the collaboration avatar is hidden using opacity 0 which still allowed the avatar to be selectable. Desired behavior after PR is merged: Hide the collaboration avatar using visibility hidden, ensuring it is not selectable. task-4348275 --- I confirm I have signed the CLA and read the PR guidelines at www.odo
Original PR description
Description of the issue this PR addresses: Current behavior before PR: It was not possible to use the move node handler when the collaborator is on the same node, because the collaboration avatar is hidden using opacity 0 which still allowed the avatar to be selectable. Desired behavior after PR is merged: Hide the collaboration avatar using visibility hidden, ensuring it is not selectable. task-4348275 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190795
Since the Select owl componenent is used to display the benefits values, the 'options' of the select are displayed alphabetically. It is caused by the default value to 'true' for the autoSort attribute of the component. As we give the data in a specific order to the select in salary cofigurator we don't want the JS to re-order it. e.g.: the cars are sorted by cost and we don't wan't it in the alphabetical order. Forward-Port-Of: odoo/enterprise#76642
Original PR description
Since the Select owl componenent is used to display the benefits values, the 'options' of the select are displayed alphabetically. It is caused by the default value to 'true' for the autoSort attribute of the component. As we give the data in a specific order to the select in salary cofigurator we don't want the JS to re-order it. e.g.: the cars are sorted by cost and we don't wan't it in the alphabetical order. Forward-Port-Of: odoo/enterprise#76642
- In version 17.3, the activity view mode is defined for both the project_task_action_fsm action and the project_task_action_fsm_map action. However, it has been observed that a record named project_task_action_fsm_map_view_activity also exists. This redundancy causes the project_task_action_fsm action to not be properly configured with the activity view mode, as no corresponding view link or defined view exists. - Additionally, the record project_task_action_fsm_map_view_activity has the sa
Original PR description
- In version 17.3, the activity view mode is defined for both the project_task_action_fsm action and the project_task_action_fsm_map action. However, it has been observed that a record named…
- In version 17.3, the activity view mode is defined for both the project_task_action_fsm action and the project_task_action_fsm_map action. However, it has been observed that a record named project_task_action_fsm_map_view_activity also exists. This redundancy causes the project_task_action_fsm action to not be properly configured with the activity view mode, as no corresponding view link or defined view exists. - Additionally, the record project_task_action_fsm_map_view_activity has the same name, but no corresponding record has been created. To resolve this issue, I have renamed the record to ensure consistency with its definition in the XML file. see upgrade : odoo/upgrade/pull/6838 [Reference](https://github.com/odoo/enterprise/commit/f16c338c2c20a0424ef749bdf35d1b7863347a8e#diff-170f2bf3c03ad1bf01ffe9fd0d8490e6ee7e193f96da6ad8d8babfe6e3867706R471) **Steps to Reproduce:** 1) Create a database in version saas-17.4 and install the industry_fsm module. 2) Check the project_task_action_fsm action and note that the activity view mode and view are not defined. upg-2202488 tbg-1597 Forward-Port-Of: odoo/enterprise#74465
Before this commit, fields that were always invisible (with an `invisible` attribute equals to True|1) were not listed in the Sidebar's "Existing Fields", and were not available for drag/drop. This was rather impractical as such field may be in the arch just to have their data loaded, not really displayed. Moreover, since odoo/odoo@6f06420e4a9443c52dc0cb427f8f55eb4aecabce, fields may be added in the view automatically based on whether their value will be used in some condition or context else
Original PR description
Before this commit, fields that were always invisible (with an `invisible` attribute equals to True|1) were not listed in the Sidebar's "Existing Fields", and were not available for drag/drop. This was rather impractical as such field may be in the arch just to have their data loaded, not really displayed. Moreover, since odoo/odoo@6f06420e4a9443c52dc0cb427f8f55eb4aecabce, fields may be added in the view automatically based on whether their value will be used in some condition or context elsewhere in the view. After this commit, always invisible fields are always proposed for addition in the view. opw-4450351 Forward-Port-Of: odoo/enterprise#76608
**Steps to reproduce:** - Install accountant - Create an invoice for $1000 - Register a payment of $100 for the invoice - Register a second payment of $200 for the invoice - Create a batch payment with both payments - Validate the batch payment - Create a bank statement with an amount equal to the batch payment (i.e. $300) - Reconcile the statement with the batch payment **Issue:** A UserError is raised stating that the moves are not balanced. One amount is equal to the sum of the 2
Original PR description
**Steps to reproduce:** - Install accountant - Create an invoice for $1000 - Register a payment of $100 for the invoice - Register a second payment of $200 for the invoice - Create a batch payment…
**Steps to reproduce:** - Install accountant - Create an invoice for $1000 - Register a payment of $100 for the invoice - Register a second payment of $200 for the invoice - Create a batch payment with both payments - Validate the batch payment - Create a bank statement with an amount equal to the batch payment (i.e. $300) - Reconcile the statement with the batch payment **Issue:** A UserError is raised stating that the moves are not balanced. One amount is equal to the sum of the 2 payments (i.e. $300), but the other one is equal to the amount of the payment term line of the invoice (i.e. $1000). **Cause:** When reconciling a batch payment, only "amount_currency" field from the invoice lines are used in "_validation_lines_vals". But in this case, the payments are partial and their sum is not equal to the amount of of the invoice lines. **Solution:** Use the amount from each payment of the batch for the reconciliation instead of the amount from the account move lines. opw-4304772 Forward-Port-Of: odoo/enterprise#76037
task-4418589 Forward-Port-Of: odoo/enterprise#76451 Forward-Port-Of: odoo/enterprise#76089
Original PR description
task-4418589 Forward-Port-Of: odoo/enterprise#76451 Forward-Port-Of: odoo/enterprise#76089
In GanttModel, we markup html values like it is done in the util function parseServerValue so that is it now possible to use t-out on html field values in the gantt popovers (and possibly elsewhere) and have correct results. Task ID: 4382205 Forward-Port-Of: odoo/enterprise#76625 Forward-Port-Of: odoo/enterprise#76530
Original PR description
In GanttModel, we markup html values like it is done in the util function parseServerValue so that is it now possible to use t-out on html field values in the gantt popovers (and possibly elsewhere) and have correct results. Task ID: 4382205 Forward-Port-Of: odoo/enterprise#76625 Forward-Port-Of: odoo/enterprise#76530
Fixing a leftover traceback when there's no IBAN on the partner's bank. Fixed in 17.0. Task [link](https://www.odoo.com/odoo/project/967/tasks/4254966) task-4254966 Forward-Port-Of: odoo/enterprise#76091
Original PR description
Fixing a leftover traceback when there's no IBAN on the partner's bank. Fixed in 17.0. Task [link](https://www.odoo.com/odoo/project/967/tasks/4254966) task-4254966 Forward-Port-Of: odoo/enterprise#76091
Steps to Reproduce the Bug: - Create a storable product “P1”. - Create a Quality Point with the following settings: - Product: P1 - Operation Type: Receipt - Control Per: Product - Type: Pass-Fail - Create a receipt for 10 units of P1. - Mark it as "To Do". - Set the field "Quantity" to 5 units. - Validate. - A wizard to create a backorder is triggered -> Validate the creation. - A wizard for the quality check is triggered. - Pass the quality check. Problem: A backorde
Original PR description
Steps to Reproduce the Bug: - Create a storable product “P1”. - Create a Quality Point with the following settings: - Product: P1 - Operation Type: Receipt - Control Per: Product - Type: Pass-Fail -…
Steps to Reproduce the Bug: - Create a storable product “P1”. - Create a Quality Point with the following settings: - Product: P1 - Operation Type: Receipt - Control Per: Product - Type: Pass-Fail - Create a receipt for 10 units of P1. - Mark it as "To Do". - Set the field "Quantity" to 5 units. - Validate. - A wizard to create a backorder is triggered -> Validate the creation. - A wizard for the quality check is triggered. - Pass the quality check. Problem: A backorder is created, but the first quality check is incorrectly linked to this new picking instead of creating new one, because the `default_quality_check` was set in the context and not cleared. Before this commit, the picking was not validated after confirming the quality check wizard: https://github.com/odoo/enterprise/commit/936e8f84a3a70a26692cc4620f146539bde81a17#diff-56e04e66113804374104e1d1ccf225cb88ab2040c65743e0eb01a970351cdb7fR106-R107 **Opw-4428051** Forward-Port-Of: odoo/enterprise#76338
Steps to reproduce: 1. Open the `Approvals` app. 2. Select `Create RFQs`. 3. Add any product. 4. Try to create a new vendor for the added product. 5. An error will occur. Explanation of the bug: In order to specify a vendor, one needs to specify the vendor data, the price of the product and the quantity of the product sold for that price. So, when the user starts typing to create a new vendor and then presses on `Create`, an error occurs because it can't be determined
Original PR description
Steps to reproduce: 1. Open the `Approvals` app. 2. Select `Create RFQs`. 3. Add any product. 4. Try to create a new vendor for the added product. 5. An error will occur. Explanation of the bug: In order to specify a vendor, one needs to specify the vendor data, the price of the product and the quantity of the product sold for that price. So, when the user starts typing to create a new vendor and then presses on `Create`, an error occurs because it can't be determined which field should be filled with the entered data. i.e. will the entered data be used to fill the vendor data, the product price or the product quantity? This commit fixes the bug by only allowing `Create and Edit` option for the vendor column. task-4337135 Forward-Port-Of: odoo/enterprise#73936
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from th
Original PR description
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string >…
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from the search bar: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L685 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/views/product_views.xml#L78 This trick is notably used in order to take the warehouse into account in the computation of the various quantity fields associated to products by generating custom location domains: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L136-L137 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L250-L255 However, since that context key was added via the search bar, it type might be: a string, an integerId or a list of either/both other types. (E.g. to create a list of a string and integer type and select a string and then type a string allowing you to find a real warehouse id that you can select after clicking on the dropdown arrow). Therefore, in order to be properly used, this context key needs to be parsed to be used properly as done in the `_get_domain_locations` for instance. However, the `warehouse` context key is used at many other places in the code, each time expecting a single integer id, and since the warehouse context key is not cleaned from one action to an other you are technically able to provide a string where the code is expecting a an integer. ### Fix: The proper fix of this use case would be to change the context key name used by the search view to only match flows expecting such a context. However, this change is not stable as it requires to modify a view and hence can't be applied before master (18.1). As such, in prior versions, we add a context parser for to extract a single integer id from the `warehouse` context key where it is used but unexpected to match something else. ### Note: This patch will improve other fixes and hopefully prevent yet unoticed error raised by this issue: 903d8beeea5d332e556ef81e231a3b8b4c51cd45 and afa7c6bf25c9de5fc0c878faa29e1cc35bc11805 Community: https://github.com/odoo/odoo/pull/187808 opw-4290818 X-original-commit: 856409a1fb35c6c49fe4c404931587a95d99d370 Forward-Port-Of: odoo/enterprise#75547 Forward-Port-Of: odoo/enterprise#74188
When adding a column that is not in the query result in the partner ledger, such as `amount_residual` for example, we get an ugly traceback when unfolding a partner. With this commit, we raise an UserError instead. opw-4416369 Forward-Port-Of: odoo/enterprise#76521 Forward-Port-Of: odoo/enterprise#76284
Original PR description
When adding a column that is not in the query result in the partner ledger, such as `amount_residual` for example, we get an ugly traceback when unfolding a partner. With this commit, we raise an UserError instead. opw-4416369 Forward-Port-Of: odoo/enterprise#76521 Forward-Port-Of: odoo/enterprise#76284
Steps to reproduce: ------------------- - Install sale_subscription and inventory. - Create a subscription product. - Log in as a non-Sales user (e.g., Inventory user). - Access the product list in Kanban view.(from stock) Issue: ------- Non-Sales users encounter an AccessError when the Kanban view attempts to read product_subscription_pricing_ids. This is due to: - "record.product_subscription_pricing_ids.raw_value.length" Attempted to be computed even if the user does not h
Original PR description
Steps to reproduce: ------------------- - Install sale_subscription and inventory. - Create a subscription product. - Log in as a non-Sales user (e.g., Inventory user). - Access the product list in Kanban view.(from stock) Issue: ------- Non-Sales users encounter an AccessError when the Kanban view attempts to read product_subscription_pricing_ids. This is due to: - "record.product_subscription_pricing_ids.raw_value.length" Attempted to be computed even if the user does not have the access rights. Fix: ----- Updated the Kanban view to conditionally render subscription pricing fields only for users in the Sales group. opw-4404190 Forward-Port-Of: odoo/enterprise#75677
This error occurs when the user enters an ``End Date`` that is one day earlier than the ``Start Date``(e.g. Start Date: '25/12/2024' and End Date: '24/12/2024'). Steps to reproduce: --- - Install the ``account_budget`` module - Create a new budget, fill in all required fields, and add a line - ``Start Date: '25/12/2024' and End Date: '24/12/2024'`` Traceback: --- ``ZeroDivisionError: float division by zero`` At [1], this error occurs because when the ``End Date`` is set to one day
Original PR description
This error occurs when the user enters an ``End Date`` that is one day earlier than the ``Start Date``(e.g. Start Date: '25/12/2024' and End Date: '24/12/2024'). Steps to reproduce: --- - Install the ``account_budget`` module - Create a new budget, fill in all required fields, and add a line - ``Start Date: '25/12/2024' and End Date: '24/12/2024'`` Traceback: --- ``ZeroDivisionError: float division by zero`` At [1], this error occurs because when the ``End Date`` is set to one day before the ``Start Date``, the ``line_timedelta`` becomes zero. As a result, the denominator evaluates to zero. [1]- https://github.com/odoo/enterprise/blob/3cfb6517220ae252d633bb9debc5010a0f14efbe/account_budget/models/budget_line.py#L77-L79 This commit resolves the error by ensuring zero should not be in the denominator. sentry-6174377667 Forward-Port-Of: odoo/enterprise#76176