Daily updates from Odoo
Thursday, June 27, 2024
30 changes · master
Enhancements to existing features
When Mexican e-invoicing providers Quadrum or Finkok return an error, users will now see the detailed explanation instead of only a generic message. This should make it easier for businesses to understand and resolve invoicing issues without extra support investigation.
Original PR description
'Mensaje' only contains a generic error message. 'ExtraInfo' contains the actual explaination for the error so this field should be shown to the user task-3876805
Document settings now include a dedicated Trash Management section, making deletion delay options easier to find and understand. Related document integration settings are also arranged in two columns, improving readability for users configuring document workflows.
Original PR description
- This commit enhances document organization by relocating 'Deletion Delay' under the newly created 'Trash Management' section in Settings. - Also, adjusted the Settings UI so that the bridge options now appear in two columns instead of a single column. Task-3918898
Activity actions now use proper clickable elements instead of relying on icons or text alone. This improves accessibility for users who navigate with assistive tools and makes the activity interface more reliable to use.
Original PR description
Before this PR, t-on-click where directly on `<i>` and `<span>` elements. This is not correct since they are not clickable html element and could be a challenge for people using accessibility tools. This PR adds clickable elements to the t-on-clicks Community PR: https://github.com/odoo/odoo/pull/170000/
Attendees who open a cancelled appointment now see a clear cancelled event page instead of potentially seeing an outdated booking page. The appointment page is also forced to reload when using browser navigation, reducing confusion after a booking is cancelled.
Original PR description
This PR provides a cancelled front page to attendees who access an event that has been cancelled. - As inline-block elements cannot directly inherit the 'text-decoration' property from the parent, we change `<label>` to `<span>` tags in the template. - When the user books an appointment, immediately cancels it, and uses the browser navigation to go back, the page should load with the cancelled event. - We prevent the browser from caching the page, so it reloads every time we navigate with browser navigation. Task-3959537
The reporting date filter now supports moving into future periods, making forecasts and upcoming-period analysis easier. Related report definitions and tests were updated so period labels and comparisons work consistently for both past and future dates.
Original PR description
This commit will add the possibility to go in the future with the date filter added with this commit: https://github.com/odoo/enterprise/commit/37224239a4f4309ce3453988313750d9e0c83f6c To do that: - Change the order of the period, before when going in the future the period would go in negative. We now do the opposite. - Change previous_period with just period since we can now go in the future - Remove last_period task-3961087 community pr: https://github.com/odoo/odoo/pull/168875
This update adjusts internal test expectations to account for an extra database check when deleting an accounting move. It helps keep automated validation accurate for document accounting behavior without changing the user experience.
Original PR description
One additionnal query is made to check if we need to set the marker for a gap created when unlinking the move.
Pricer tags can now be linked to products directly from the Pricer Store form by scanning the product barcode and then the tag barcode. This speeds up store setup work and gives users immediate success or error notifications after each pairing attempt.
Original PR description
Currently, the process of linking a Pricer tag to a product is a very slow and tedious procedure. This PR adds the possibility to quickly connect the products to the pricer tags through the Pricer Store form view The user needs to scan the product barcode, then the Pricer tag barcode and Odoo will automatically create the link between the two Odoo notification system will notify the user of the succesful link between the two or an error otherwise  task-3619639
Appointment flows now show prices with tax included when the administrator has configured the website to display tax-included prices. This keeps appointment pricing consistent with the rest of the website and helps customers see the expected total more clearly.
Original PR description
If the admin configures prices to be displayed with tax included(https://tinyurl.com/225pkohb) Include tax in the prices present in Appointment flows.(https://tinyurl.com/28zuxok4) Task-3898034
Resolved issues and error corrections
This fixes how subscription-related sales permission checks are tested by placing them with the module where they belong. It helps keep validation reliable for subscription sales and stock flows without changing day-to-day user behavior.
Original PR description
Related: odoo/enterprise#60912 https://github.com/odoo/enterprise/pull/65331/files#r1651151330
This update corrects an internal planning calendar test so it checks the expected event end time consistently. It also fixes the test setup to use a defined timezone, reducing false test failures caused by different machine settings.
Original PR description
Before this commit, a planning calendar test was wrong. In this test, we resized two events to make them end at 14:30 but then check that they end at 15:30 which is inconsistent. This commit adds a mockDate with a defined timezone which will prevent the test to depend on the machine local timezone.
The reporting option to hide lines with zero amounts now ignores informational text columns such as VAT numbers or countries. This helps users keep financial reports focused on meaningful amount-based entries without being blocked by non-financial details.
Original PR description
Some reports display some informational columns (like the VAT for a partner, or the country of origin). These columns sometimes prevent the `Hide Lines at 0` option to correctly do its work: the desired behavior of this option is to hide the lines where the amounts are null. It shouldn't care about the "informational" columns, that are usually always present This commit force the `Hide Lines at 0` feature to ignore columns displaying information other than float, integer of monetary ones. task-4006235
Code cleanup and technical improvements
Gantt views now receive progress bar information together with the main scheduling data, making progress display more consistent across affected apps. This also streamlines related view code and formatting so users see clearer progress values with less duplicated handling behind the scenes.
Original PR description
We make get_gantt_data return progress bar info along the main data (groups, records) as it has been done in https://github.com/odoo/enterprise/pull/64263 for unavailabilities. We have added a key "ratio_formatted" to the progress bars and simplified some gantt js_classes. The method gantt_progress_bar becomes private.
The spreadsheet-related modules now share a common way to load actions instead of maintaining separate duplicate logic. This reduces maintenance effort and helps keep behavior consistent across document spreadsheets, dashboard editing, and spreadsheet history views.
Original PR description
*documents_spreadsheet,spreadsheet_dashboard_edition
Miscellaneous changes
Forward-Port-Of: odoo/enterprise#65634
Original PR description
Forward-Port-Of: odoo/enterprise#65634
Since Python 3.12 a deprecation warning is emitted when testing the truth value of an xml etree element. See: https://docs.python.org/3.12/whatsnew/3.12.html#deprecated Forward-Port-Of: odoo/enterprise#63585
Original PR description
Since Python 3.12 a deprecation warning is emitted when testing the truth value of an xml etree element. See: https://docs.python.org/3.12/whatsnew/3.12.html#deprecated Forward-Port-Of: odoo/enterprise#63585
[FIX] appointments: precision issue in appointment durations Representing duration given in HH:MM as fractions of an hour (i.e. as float) causes precision issues. Added comparia [Reproduce] - Install website_appointment - Open an appointment, modify "Appointment Duration" to 1:50 - Open preview for the appointment, try scheduling a slot - BUG: 404 opw-3914117 Forward-Port-Of: odoo/enterprise#65424 Forward-Port-Of: odoo/enterprise#63335
Original PR description
[FIX] appointments: precision issue in appointment durations Representing duration given in HH:MM as fractions of an hour (i.e. as float) causes precision issues. Added comparia [Reproduce] - Install website_appointment - Open an appointment, modify "Appointment Duration" to 1:50 - Open preview for the appointment, try scheduling a slot - BUG: 404 opw-3914117 Forward-Port-Of: odoo/enterprise#65424 Forward-Port-Of: odoo/enterprise#63335
**Issue:** When a transaction is done for a subscription, we force the creation and sending of an invoice. However, depending on the localization of the company, many additional processes can be performed when generating/sending an invoice, like the generation/sending of an EDI document. In these cases, we may want to distinguish these forced creations from the manual ones as the treament of the invoice could differ depending on the case. opw-3936227 Linked community PR: https://git
Original PR description
**Issue:** When a transaction is done for a subscription, we force the creation and sending of an invoice. However, depending on the localization of the company, many additional processes can be performed when generating/sending an invoice, like the generation/sending of an EDI document. In these cases, we may want to distinguish these forced creations from the manual ones as the treament of the invoice could differ depending on the case. opw-3936227 Linked community PR: https://github.com/odoo/odoo/pull/170144 Forward-Port-Of: odoo/enterprise#65549 Forward-Port-Of: odoo/enterprise#65086
Prior to this PR, the padding (introduced in commit b857e39666a1f3decf67aab48c3629f2d9723d17) of `o_form_nosheet` was triggered globally if barcode was installed. It causes issues in other places (like `account_accountant` reconciliation). task-3951200 --- | Before | After | |--------|--------| |  |  of `o_form_nosheet` was triggered globally if barcode was installed. It causes issues in other places (like `account_accountant` reconciliation). task-3951200 --- | Before | After | |--------|--------| |  |  | Forward-Port-Of: odoo/enterprise#63271
This commit introduces the possibility to add a key/value to the state, but omit it on the URL, a new function `addKeystoOmit` was added to this effect. Note that, this key will also be added in the state that is sent to the browser history. Allowing to retrieve the complete state (including the omitted keys) when clicking the back button on the browser. Forward-Port-Of: odoo/enterprise#65052
Original PR description
This commit introduces the possibility to add a key/value to the state, but omit it on the URL, a new function `addKeystoOmit` was added to this effect. Note that, this key will also be added in the state that is sent to the browser history. Allowing to retrieve the complete state (including the omitted keys) when clicking the back button on the browser. Forward-Port-Of: odoo/enterprise#65052
Currently when trying to send a document in production mode (`l10n_co_dian_test_environment` being False), the document is rejected with error code FAD07: "Rechazo: @schemeID no indica un valor válido para ambiente de destino del documento (1=Producción, 2=Prueba)". This is caused by `/Invoice/cbc:UUID/@schemeID` being always set to "2". This commit fixes this. task-3998395 Forward-Port-Of: odoo/enterprise#65001
Original PR description
Currently when trying to send a document in production mode (`l10n_co_dian_test_environment` being False), the document is rejected with error code FAD07: "Rechazo: @schemeID no indica un valor válido para ambiente de destino del documento (1=Producción, 2=Prueba)". This is caused by `/Invoice/cbc:UUID/@schemeID` being always set to "2". This commit fixes this. task-3998395 Forward-Port-Of: odoo/enterprise#65001
This will add a rule for the "Crédit d'impôt salaire social minimum" to the Luxembourg loca. Task: 3970762 Forward-Port-Of: odoo/enterprise#65323 Forward-Port-Of: odoo/enterprise#64257
Original PR description
This will add a rule for the "Crédit d'impôt salaire social minimum" to the Luxembourg loca. Task: 3970762 Forward-Port-Of: odoo/enterprise#65323 Forward-Port-Of: odoo/enterprise#64257
Forward-Port-Of: odoo/enterprise#65163 Forward-Port-Of: odoo/enterprise#64863
Original PR description
Forward-Port-Of: odoo/enterprise#65163 Forward-Port-Of: odoo/enterprise#64863
The issue: Our code generally assumes that strings are uppercase, which is typically true. However, in some cases, such as the one described in this ticket, the input string is only capitalized (the first character in uppercase). The Fix: convert the keys to uppercase before retrieving their values from the array, and use the get method instead of the bracket notation for safer access. opw-3979945 Forward-Port-Of: odoo/enterprise#64887
Original PR description
The issue: Our code generally assumes that strings are uppercase, which is typically true. However, in some cases, such as the one described in this ticket, the input string is only capitalized (the first character in uppercase). The Fix: convert the keys to uppercase before retrieving their values from the array, and use the get method instead of the bracket notation for safer access. opw-3979945 Forward-Port-Of: odoo/enterprise#64887
**Steps to reproduce:** - Install Accounting and l10n_pe_edi - Switch to a Peruvian company (e.g. PE Company) - In Accounting settings, select "SUNAT" as Signature Provider and activate "QR Codes" option - Create an invoice for a Peruvian contact - Sent the invoice to Peru UBL 2.1 - Generate the invoice via "Send & Print" button **Issue:** The QR code doesn't appear on the invoice. **Cause:** There's a condition on the parent element of the QR element that checks if "spot" is defin
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_pe_edi - Switch to a Peruvian company (e.g. PE Company) - In Accounting settings, select "SUNAT" as Signature Provider and activate "QR Codes" option - Create an invoice for a Peruvian contact - Sent the invoice to Peru UBL 2.1 - Generate the invoice via "Send & Print" button **Issue:** The QR code doesn't appear on the invoice. **Cause:** There's a condition on the parent element of the QR element that checks if "spot" is defined. **Solution:** The display of the QR code should be independent of the "spot" variable. opw-3990721 Forward-Port-Of: odoo/enterprise#65307
Forward-Port-Of: odoo/enterprise#65413
Original PR description
Forward-Port-Of: odoo/enterprise#65413
Forward-Port-Of: odoo/enterprise#65430 Forward-Port-Of: odoo/enterprise#65399
Original PR description
Forward-Port-Of: odoo/enterprise#65430 Forward-Port-Of: odoo/enterprise#65399
Steps to reproduce: ------------------- - Install `Documents` and `Inventory` (for test purpose) modules - Go to Settings and enable `Centralize files attached to products` - Go to Inventory > Products > Choose any product - Add an attachment to the Product - Go to Documents, then select the `Products` workspace - Select document related to product just uploaded - `Replace` the attachment with a new one (old one should be added to `History`) Issue: ------ The new attachment, and
Original PR description
Steps to reproduce: ------------------- - Install `Documents` and `Inventory` (for test purpose) modules - Go to Settings and enable `Centralize files attached to products` - Go to Inventory > Products > Choose any product - Add an attachment to the Product - Go to Documents, then select the `Products` workspace - Select document related to product just uploaded - `Replace` the attachment with a new one (old one should be added to `History`) Issue: ------ The new attachment, and therefore the document, is not related to the product anymore. Cause: ------ When uploading a new attachment, we link the attachment to the document, and we don't keep the related record. Solution: --------- Keep the related record on the new attachment and remove it from the old attachment to not have all versions of the attachments displayed on the attachments of the products. opw-3932497 Forward-Port-Of: odoo/enterprise#64530
When timezone of user is empty and the user clicks on Add a Leave button, a traceback will appear. Steps to reproduce the error: - Open Profile > Preferences > Select empty in timezone > Save - Install 'Appointments' - Go to Appointments > Schedule > Resource Bookings > Add a Leave Traceback: ``` AttributeError: 'bool' object has no attribute 'upper' File "odoo/http.py", line 2254, in __call__ response = request._serve_db() File "odoo/http.py", line 1829, in _serve_db
Original PR description
When timezone of user is empty and the user clicks on Add a Leave button, a traceback will appear. Steps to reproduce the error: - Open Profile > Preferences > Select empty in timezone > Save -…
When timezone of user is empty and the user clicks on Add a Leave button,
a traceback will appear.
Steps to reproduce the error:
- Open Profile > Preferences > Select empty in timezone > Save
- Install 'Appointments'
- Go to Appointments > Schedule > Resource Bookings > Add a Leave
Traceback:
```
AttributeError: 'bool' object has no attribute 'upper'
File "odoo/http.py", line 2254, in __call__
response = request._serve_db()
File "odoo/http.py", line 1829, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1849, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1827, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1834, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2059, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 871, in onchange
defaults = self.default_get(missing_names)
File "odoo/models.py", line 1524, in default_get
defaults[name] = field.default(self)
File "home/odoo/src/enterprise/saas-17.2/appointment/wizard/appointment_manage_leaves.py", line 20, in <lambda>
leave_start_dt = fields.Datetime('Start Date', required=True, default=lambda self: self._default_time(0, 0))
File "home/odoo/src/enterprise/saas-17.2/appointment/wizard/appointment_manage_leaves.py", line 14, in _default_time
user_timezone = pytz.timezone(self.env.user.tz or self.env.context.get('tz', 'utc'))
File "odoo/tools/_monkeypatches_pytz.py", line 129, in timezone
return original_pytz_timezone(name)
File "__init__.py", line 183, in timezone
if zone.upper() == 'UTC':
```
https://github.com/odoo/enterprise/blob/7640860f415028d2d516a2df5e4bc26d9d6dd3b4/appointment/wizard/appointment_manage_leaves.py#L14 When the user selects an empty timezone, tz will be False.
So, It will lead to the above traceback.
sentry-5443573507
Forward-Port-Of: odoo/enterprise#63858**Steps to reproduce:** - Install Accounting, Sales and account_avatax_sale - Configure AvaTax in Accounting settings - Create a product with an AvaTax Category (e.g. [D00000000] Digital goods) - Create a SO: * Customer: [US customer] (e.g. Azure Interior) * Product: [the created product] * Unit Price: [any] (e.g. $ 200.00) * Fiscal Position (Other Info tab): Automatic Tax Mapping (AvaTax) - Confirm the SO => The taxes will be recomputed with AvaTax (e.g. $ 20.50) - Create a d
Original PR description
**Steps to reproduce:** - Install Accounting, Sales and account_avatax_sale - Configure AvaTax in Accounting settings - Create a product with an AvaTax Category (e.g. [D00000000] Digital goods) -…
**Steps to reproduce:** - Install Accounting, Sales and account_avatax_sale - Configure AvaTax in Accounting settings - Create a product with an AvaTax Category (e.g. [D00000000] Digital goods) - Create a SO: * Customer: [US customer] (e.g. Azure Interior) * Product: [the created product] * Unit Price: [any] (e.g. $ 200.00) * Fiscal Position (Other Info tab): Automatic Tax Mapping (AvaTax) - Confirm the SO => The taxes will be recomputed with AvaTax (e.g. $ 20.50) - Create a down payment from SO (via "Create Invoice" button): * Create Invoice: Down payment (percentage) * Down Payment Amount: 50% **Issues:** 1) There is no tax on the down payment 2) When confirming the down payment, AvaTax taxes are computed from the Down payment product. It should not because the Down payment product may have a different AvaTax category than the product on the SO, which may lead to different computed taxes. The taxes on the down payment should be the same than the ones on the SO. **Cause:** 1) In "sale_external_tax" module, the "tax_ids" field is removed when preparing the invoice line (in "_prepare_invoice_line" method). Even though "account_avatax_sale" module depends on "sale_external_tax", we want to keep "tax_ids" when using AvaTax. **Solution:** 1) Create a method checking if taxes should be removed in "sale_external_tax" and override it in "account_avatax_sale" module to keep them. 2) Exclude down payments from external taxes recomputation. opw-3971513 Forward-Port-Of: odoo/enterprise#64900
When exporting tax report to xml, a comment tag is added in the xml even when empty or set to False. Per https://finances.belgium.be/fr/E-services/Intervat/comment-utiliser-intervat/deposer-declaration-periodique#q5 tags cannot be empty Steps to reproduce: 1.In a belgian company > accounting > Reporting > Tax Report 2.Export in xml 3.Do not fill information in the pop up > Export XML 4.Notice how the <comment> tag is present yet empty cause: comment is being added to the xml format
Original PR description
When exporting tax report to xml, a comment tag is added in the xml even when empty or set to False. Per https://finances.belgium.be/fr/E-services/Intervat/comment-utiliser-intervat/deposer-declaration-periodique#q5 tags cannot be empty Steps to reproduce: 1.In a belgian company > accounting > Reporting > Tax Report 2.Export in xml 3.Do not fill information in the pop up > Export XML 4.Notice how the <comment> tag is present yet empty cause: comment is being added to the xml formatting even when empty Solution: add comment when not empty opw-3980954 Forward-Port-Of: odoo/enterprise#64798