Monday, June 24, 2024
22 changes · 17.0
Resolved issues and error corrections
This fixes an accidental change in the point-of-sale self-ordering interface by removing updates that were not meant to be included. It helps keep the customer ordering experience consistent and avoids unintended behavior from the earlier change.
Original PR description
The diff introduced here https://github.com/odoo/odoo/pull/170267 was absolutely not wanted. It needs to be removed opw-3787201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures the accounting tax lock date value is recalculated when its underlying tax lock date changes. It mainly improves reliability in automated tests and edge cases, with little expected impact on normal production use.
Original PR description
The field `max_tax_lock_date` is not always computed correctly. This is since the compute function does not depend on the `tax_lock_date` field. It should not happen in production since the `tax_lock_date` and the check of `max_tax_lock_date` should not happen in the same transaction. But it can still cause issues in tests. The missing dependency is added in this commit. enterprise PR (fixing a test): https://github.com/odoo/enterprise/pull/65262
The point-of-sale display now checks connected IoT devices much less often, changing from near-constant requests to once per minute. This reduces unnecessary load on devices and the system while keeping device status updates available.
Original PR description
Increased delay between every request to iot_devices. Requests were performed every 10ms, now every minute.
New project setup now correctly carries over the configured email alias domain when the setup wizard opens. This prevents missing default values and helps ensure project-related email routing uses the expected company setting.
Original PR description
Steps: - Install the project - Enable use custom enable server from general settings. Set an alias domain - Create a new project - Wizard pops up Issue: - Default value of alias domain is not set. Cause: - alias_domain_id is related to alias_id and it is not present in the view. Fix: - Issue is been fixed by adding a field in wizard view as alias domain was getting fetched on that field. - Additionally the same field is been to added to form view as well. task-3744319
This fixes an error that could occur when users cancelled a filter in a project burndown chart. The change helps keep project reporting views stable and prevents an unnecessary interruption during chart analysis.
Original PR description
Description of the issue/feature this PR addresses: - When a user cancels a filter on a burndown chart, if stageIdSearchItemId is undefined, an error is raised. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating a company and installing an accounting chart template before setting a country no longer causes an error. The company country is now aligned with the selected chart template, helping users complete setup smoothly.
Original PR description
Before this commit, when creating a company and directly installing a chart template without putting a country first, the installation of the chart template was giving a traceback. By updating the country of the company by the one of the chart template, the issues will not happen again. task: 3945833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents the website editor from crashing in debug mode when users adjust a snippet's color filter after adding a background image. It ensures opacity values are handled in the expected format, making the editing experience more reliable.
Original PR description
Since [1], `opacity` needs to be a number as defined in ColorPlaette's props definition. However, in the ColorpickerUserValueWidget, when the props is passed to the ColorPalette component, it is given from the dataAttributes, which are strings. This leads to a crash in debug mode as the types are miss-matching. This commit fixes that by parsing the dataAttribute to float. [1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997#diff-c4e4c8cbbe59c3e61eba1cdcfd8f23809818a0b78c118d84606a1ab5d7bf1203 task-4001189
This fixes list views so columns with set widths no longer stretch unexpectedly. Business users get more predictable table layouts, making records easier to scan and reducing visual disruption in everyday workflows.
Original PR description
// TODO if validated Task 3866837 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
This update fixes a test in the Luxembourg tax reporting module that was not properly respecting tax lock date restrictions. The fix ensures the test will continue to work correctly after an upstream improvement to tax lock date validation. This is a maintenance update that prevents test failures and ensures the tax reporting system functions as intended.
Original PR description
Currently the tax lock date is not checked correctly in a test when posting a move. This problem is solved in the related community PR. This commit ensures the test does not fail after the community fix. To do this we just remove and re-introduce the tax lock date. community PR: https://github.com/odoo/odoo/pull/170475
This update fixes a button contrast issue in the Sign module that was making text difficult to read. By removing an unnecessary styling class, the button now displays with proper contrast in both light and dark modes, improving the user experience without requiring any action from users.
Original PR description
This PR fixes a contrast issue on a primary button within the sign module due to a `text-white` class applied. The default button utility classes already provide a good contrast, meaning that adding extra class is not useful. To fix the issue, we simply remove the class from the button. task-3692048 | Light mode (`:focus` state) | Dark mode | |--------|--------| | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/b73a2fe7-f802-4461-9015-16a2f4b46d92"> | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/8354c78f-6525-4aef-9057-fdb706b3cd0d"> |
A recent system update automatically assigns a country to companies based on their chart template. This caused Peru sales tests to fail because document validation rules were unexpectedly triggered. This fix updates the tests to properly handle the new document requirement validation.
Original PR description
With this commit: https://github.com/odoo/odoo/pull/166896/commits/90088bd97ec096fa8c360868e3a1addef91bd4ce We automatically add the country of the chart template to the company if the company does not have one by default. This change had a side effect that in the context of the test "TestPeSales," the boolean field l10n_latam_use_documents on the journal was now set to True. The consequence of that was that the constraint _check_l10n_latam_documents was breaking since this constraint checks that for the posted moves that use documents, the move must have a document type and a document number. task: 3945833
This update configures the translation system to properly export Swiss payroll-related text for translation into other languages. By adding these terms to the translation configuration, the Swiss payroll module can now be fully localized, ensuring that payroll documents and communications are available in multiple languages for international teams.
Miscellaneous changes
This commit fixes a bug where there would be a traceback occuring when the user would either create a favorite with a name that already exists or one with an empty name by pressing enter instead of save. The crash occurs because the keydown event is not passed to saveFavorite and in these cases, saveFavorite will invoke stopPropagation on an undefined event. Solution: pass the event to saveFavorite. Forward-Port-Of: odoo/odoo#170366 Forward-Port-Of: odoo/odoo#170320
Original PR description
This commit fixes a bug where there would be a traceback occuring when the user would either create a favorite with a name that already exists or one with an empty name by pressing enter instead of save. The crash occurs because the keydown event is not passed to saveFavorite and in these cases, saveFavorite will invoke stopPropagation on an undefined event. Solution: pass the event to saveFavorite. Forward-Port-Of: odoo/odoo#170366 Forward-Port-Of: odoo/odoo#170320
This traceback occurs when the user tries to activate stripe through onboarding without installing `website_payment`. To reproduce this issue:- 1) Install `sale` 2) Now switch to a new company by creating a `new company` 4) With the new company try to `activate the stripe` from the `sales Onboarding` 5) A traceback occurs Error:- ``` ValueError: Invalid field 'website_id' on model 'payment.provider' ``` As you can see `website_id` field is defined in `website_payment` at [1]
Original PR description
This traceback occurs when the user tries to activate stripe through onboarding without installing `website_payment`. To reproduce this issue:- 1) Install `sale` 2) Now switch to a new company by creating a `new company` 4) With the new company try to `activate the stripe` from the `sales Onboarding` 5) A traceback occurs Error:- ``` ValueError: Invalid field 'website_id' on model 'payment.provider' ``` As you can see `website_id` field is defined in `website_payment` at [1], but it is used in the `payment` module [2]. Which leads to the above traceback when `website_payment` is not installed. [1] https://github.com/odoo/odoo/blob/16e8de01b14ddac69cd706f8f64e762406769542/addons/website_payment/models/payment_provider.py#L12-L16 [2] https://github.com/odoo/odoo/blob/16e8de01b14ddac69cd706f8f64e762406769542/addons/payment/models/res_company.py#L48-L53 sentry-5504774122 Forward-Port-Of: odoo/odoo#169953
When an event is private the override of the read function hides the original value by assigning `False` instead: see here: https://github.com/odoo/odoo/commit/32931e77513b88fe080026909c941b537c857a08#diff-6c4c124bfb9e4397bed7221c7534c8f877904775e9db4cf81f72b5430b36ad06R593 For 2many fields this causes an issue during upgrades because `read` is expected to return an empty list for those. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward
Original PR description
When an event is private the override of the read function hides the original value by assigning `False` instead: see here: https://github.com/odoo/odoo/commit/32931e77513b88fe080026909c941b537c857a08#diff-6c4c124bfb9e4397bed7221c7534c8f877904775e9db4cf81f72b5430b36ad06R593 For 2many fields this causes an issue during upgrades because `read` is expected to return an empty list for those. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170197 Forward-Port-Of: odoo/odoo#169946
Steps to reproduce the issue: - Create a storable product “P1” with a BoM: - Component: Select any component - Work order: OP1: 60 minutes in workcenter “Assembly Line 1” - Go to workcenter “Assembly Line 1”: - Specific capacities: P1, capacity: 1, setup: 10 minutes - Alternative workcenter: “Assembly Line 2”: - Specific capacities: P1, capacity: 1, setup: 5 minutes - Create a manufacturing order “MO1” to produce 1 unit: - Date: May 10, 2024, 08:00:00 -
Original PR description
Steps to reproduce the issue:
- Create a storable product “P1” with a BoM:
- Component: Select any component
- Work order: OP1: 60 minutes in workcenter “Assembly Line 1”
- Go to workcenter “Assembly Line 1”:
- Specific capacities: P1, capacity: 1, setup: 10 minutes
- Alternative workcenter: “Assembly Line 2”:
- Specific capacities: P1, capacity: 1, setup: 5 minutes
- Create a manufacturing order “MO1” to produce 1 unit:
- Date: May 10, 2024, 08:00:00
- Create a manufacturing order “MO2” to produce 1 unit:
- Date: May 10, 2024, 08:00:00
Issue:
- After confirming and planning MO1, the expected duration is 70 minutes.
- After confirming and planning MO2, the expected duration is 75 minutes
instead of 65.
The setup time of workcenter Assembly Line 1 for specific product is not
reduced from the expected time.
opw-3904023
Forward-Port-Of: odoo/odoo#165128**Current behavior:** Sharing an editable link to a project with a portal user creates an undesirable scenario where they can read a project record and associated tasks but trying to use the chatter on a task's page results in a vague access error. **Expected behavior:** An editable share link should require the invitee to login prior to accessing records and the chatter. **Steps to reproduce:** 1. Make a project shareable with external users, share an editable link with a por
Original PR description
**Current behavior:** Sharing an editable link to a project with a portal user creates an undesirable scenario where they can read a project record and associated tasks but trying to use the chatter…
**Current behavior:**
Sharing an editable link to a project with a portal user creates
an undesirable scenario where they can read a project record and
associated tasks but trying to use the chatter on a task's page
results in a vague access error.
**Expected behavior:**
An editable share link should require the invitee to login prior
to accessing records and the chatter.
**Steps to reproduce:**
1. Make a project shareable with external users, share an
editable link with a portal user
2. Open the generated link in an incognito window, go to a task
that has the chatter text area input available
3. Try to leave a comment, observe the vague error
(access error behind the scenes)
**Cause of the issue:**
The hash which is generated with the share link for the invitee
uses the project record's `_mail_post_token_field` to permit
access on that record. The system which should recognize this
case and also permit access to that project's task records is
not working properly. Eventually, we fail a consteq() check on
the hash in the URL and the token generated by the ORM to
determine accessibility of the record (because it uses the
task's `_mail_post_token_field` value while ours was generated
using the project's).
**Fix:**
Create a method on the `mail.thread` extension in `portal` which
can be overridden in inheriting classes to return a logical
parent's `_sign_token()` result.
When checking for chatter post access, check both values against
the provided hash.
opw-3777597
Forward-Port-Of: odoo/odoo#160170The COGS registered was wrong when invoicing a product that is a kit with UOM A and component uses UOM B. Steps to reproduce: ------------------- * Create Comp A with UOM Dozens. It's cost should be 12000 * Create Product A with UOM Units. * Make sure both use the same category, and the category should use automcatic inventory valuation. * Create a kit bom for product A that contains 1 comp A. * Sell this kit in the PoS and invoice it. * Close the PoS and go to the order then on th
Original PR description
The COGS registered was wrong when invoicing a product that is a kit with UOM A and component uses UOM B. Steps to reproduce: ------------------- * Create Comp A with UOM Dozens. It's cost should be…
The COGS registered was wrong when invoicing a product that is a kit with UOM A and component uses UOM B. Steps to reproduce: ------------------- * Create Comp A with UOM Dozens. It's cost should be 12000 * Create Product A with UOM Units. * Make sure both use the same category, and the category should use automcatic inventory valuation. * Create a kit bom for product A that contains 1 comp A. * Sell this kit in the PoS and invoice it. * Close the PoS and go to the order then on the invoice. * Check the journal items > Observation: the COGS is 12000 it's wrong. It should be 1000 Why the fix: ------------ The `_get_pos_anglo_saxon_price_unit` is not taking the product uom into account. So in this example the price unit will be for a dozen, but the bom specifies that we are using a unit and not a dozen. So the quantity needs to be modified from a dozen to unit. That's what the `_compute_price` method is doing. opw-3787201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166382
Commit [1] made it so that, in grid mode, a video alone in its column would take the whole width/height of the column, just like was already the case for images since commit [2]. However, it did not adapt the part of the code that checks whether the image is alone in its column (which then adds the `.o_grid_item_image` class to the column). That check only happens when toggling the grid mode. This commit makes sure that, upon toggling the grid mode, the check is also run for video-only columns
Original PR description
Commit [1] made it so that, in grid mode, a video alone in its column would take the whole width/height of the column, just like was already the case for images since commit [2]. However, it did not…
Commit [1] made it so that, in grid mode, a video alone in its column would take the whole width/height of the column, just like was already the case for images since commit [2]. However, it did not adapt the part of the code that checks whether the image is alone in its column (which then adds the `.o_grid_item_image` class to the column). That check only happens when toggling the grid mode. This commit makes sure that, upon toggling the grid mode, the check is also run for video-only columns. Steps to reproduce: - Drop a Text - Image snippet - Set it to full-width - Replace the image with a video - Toggle grid mode - Save => the video takes more space than it should, it sticks out further than its section. Note that the same bug may still happen if you use a text column, toggle grid mode, and only after that place a video or an image and remove any text from the column: because the check isn't run after toggling, the proper class is not set, and the size of the image/video doesn't match what would be expected. [1]: https://github.com/odoo/odoo/commit/b54b34e6c34f435b2923e7b571b2bb2e4e9e0f08 [2]: https://github.com/odoo/odoo/commit/e9c7e020daf88022d6e02de0a5620074e8417b5a opw-3959262 Forward-Port-Of: odoo/odoo#170262
Methods from l10n_cl_edi has been moved from l10n_cl_edi (enterprise) as part of https://github.com/odoo/enterprise/pull/46593. This includes _l10n_cl_get_amounts and _float_repr_float_round on the account move model, as well as the method _l10n_cl_get_line_amounts on the account move line model. They can therefore be removed in this commit. The VAT section for the electronic ticket document is also being transferred in the same manner, and can thus be removed in the template here. As par
Original PR description
Methods from l10n_cl_edi has been moved from l10n_cl_edi (enterprise) as part of https://github.com/odoo/enterprise/pull/46593. This includes _l10n_cl_get_amounts and _float_repr_float_round on the…
Methods from l10n_cl_edi has been moved from l10n_cl_edi (enterprise) as part of https://github.com/odoo/enterprise/pull/46593. This includes _l10n_cl_get_amounts and _float_repr_float_round on the account move model, as well as the method _l10n_cl_get_line_amounts on the account move line model. They can therefore be removed in this commit. The VAT section for the electronic ticket document is also being transferred in the same manner, and can thus be removed in the template here. As part of the same refactor, methods _l10n_cl_get_invoice_totals_for_report and _l10n_cl_prices_and_taxes had been deprecated, and additionally there is a new exclusive qweb totals widget for chilean invoices. This will allow showing in PDF reports, invoices that had been generated in a foreign currencies or in UF index. X-original-commit: 7d22eaaf135e20b5c94e8419b8b6418483f1a139 [FIX] l10n_cl: replace t-esc with t-out (cherry picked from commit 27f592e49b381cf3344b808db8358c677a528489) 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#162147
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the `Introduction` page by adding a new block under the event name for example - Save it and go back to backend - Create a new event with same name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button Issue: ------ The second event will have the edited
Original PR description
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the…
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the `Introduction` page by adding a new block under the event name for example - Save it and go back to backend - Create a new event with same name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button Issue: ------ The second event will have the edited `Introduction` page from the first event. Cause: ------ When creating the menu, since we do not create a page, the URL retrieved in the process will be always the same and therefore redirect to the edited page of the first event (since the last part of the URL is used to retrieve the right view). Solution: --------- Ensure the URL is unique by using the view key (who is unique) as last part of the URL. opw-3945840 Forward-Port-Of: odoo/odoo#170149 Forward-Port-Of: odoo/odoo#169770
A traceback is occurig when the user creating a SO without Qutation date. To reproduce this issue:- 1) Install `Sales` 2) Enable `Sales Credit Limit` in the settings 3) Try to create a `Quotation` by removing the default `Quotation Date` and then add a `Customer` 4) A traceback occurs Error:- ``` AttributeError: 'bool' object has no attribute 'date' ``` When the user removes the `date_order` its value will be false. This leads to the traceback when the `date` is extracte
Original PR description
A traceback is occurig when the user creating a SO without Qutation date. To reproduce this issue:- 1) Install `Sales` 2) Enable `Sales Credit Limit` in the settings 3) Try to create a `Quotation` by removing the default `Quotation Date` and then add a `Customer` 4) A traceback occurs Error:- ``` AttributeError: 'bool' object has no attribute 'date' ``` When the user removes the `date_order` its value will be false. This leads to the traceback when the `date` is extracted from `date_order`. https://github.com/odoo/odoo/blob/16e8de01b14ddac69cd706f8f64e762406769542/addons/sale/models/sale_order.py#L385 After applying this commit will resolve this issue by taking the current date if the 'date_order' is false. This makes code more robust. senrty-5500467446 Forward-Port-Of: odoo/odoo#169911