Daily updates from Odoo
Friday, November 15, 2024
81 changes
13 changes
Miscellaneous changes
Step to reproduce. 1. Drag and drop a Contact Us Form 2. Select the form action as : " Apply for Job" 3. Select a field Type : "Activities" or "Kanban Stage" 4. Now on other field set visibility depending on this field 5. Now set the visibility options. -> Visibility value shows ID instead actual value/name. Prior to this commit, fields with conditional visibility showed the record's ID instead of its display name when the dependent field was a checkbox or radio button. This commit
Original PR description
Step to reproduce. 1. Drag and drop a Contact Us Form 2. Select the form action as : " Apply for Job" 3. Select a field Type : "Activities" or "Kanban Stage" 4. Now on other field set visibility depending on this field 5. Now set the visibility options. -> Visibility value shows ID instead actual value/name. Prior to this commit, fields with conditional visibility showed the record's ID instead of its display name when the dependent field was a checkbox or radio button. This commit fix the issue by displaying the displayName of the record instead ID. task-4267217 Forward-Port-Of: odoo/odoo#184232
When a user visits a product page, the product gets marked as "recently viewed" after 8 seconds. This delay is too long, as a user can realistically view the product and navigate away before the 8 seconds have passed (in which case the product isn't marked as recently viewed). In particular, this is problematic when the website contains a "recently viewed products" carousel, where the user expects to see all products they recently viewed (even if they didn't stay on the product page f
Original PR description
When a user visits a product page, the product gets marked as "recently viewed" after 8 seconds. This delay is too long, as a user can realistically view the product and navigate away before the 8 seconds have passed (in which case the product isn't marked as recently viewed). In particular, this is problematic when the website contains a "recently viewed products" carousel, where the user expects to see all products they recently viewed (even if they didn't stay on the product page for 8 seconds). We decided to reduce the delay to 0.5 seconds, which is long enough to prevent the product from being marked as "recently viewed" if the user visits a product page by mistake and immediately navigates away, but short enough to prevent problematic behaviors such as the one mentioned above. opw-4114364 Forward-Port-Of: odoo/odoo#187025
When reversing a move of type 'in/out refund', we create a move of type 'entry' instead of 'in/out invoice' opw-4247643 Forward-Port-Of: odoo/odoo#184909
Original PR description
When reversing a move of type 'in/out refund', we create a move of type 'entry' instead of 'in/out invoice' opw-4247643 Forward-Port-Of: odoo/odoo#184909
Steps: - Create a dynamic attribute with some attribute Lines - Create a product with attributes set to the new attribute - Change cost price and save - Reload the webpage Issue: - Cost price changes back to 0 Cause: - `_compute_template_field_from_variant_field` is called on `_compute_standard_price` which sets the value of field to default (false) for variant_count=0 Fix: - Cost price will be invisible for variant_count=0 (only on saved records, to allow products with non-dynam
Original PR description
Steps: - Create a dynamic attribute with some attribute Lines - Create a product with attributes set to the new attribute - Change cost price and save - Reload the webpage Issue: - Cost price changes back to 0 Cause: - `_compute_template_field_from_variant_field` is called on `_compute_standard_price` which sets the value of field to default (false) for variant_count=0 Fix: - Cost price will be invisible for variant_count=0 (only on saved records, to allow products with non-dynamic attributes to still be configured directly on creation). opw-4054647 Forward-Port-Of: odoo/odoo#181836
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186968
Original PR description
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186968
Steps to reproduce: 1. Have multiple companies 2. Create a multiple employee allocation 3. Connect to the other company: you should be able to find the allocation This commit further restricts multi-company access to allocations, so that it is accessible only when at least one of the employees on the allocation have the same company. task-4241723 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183937
Original PR description
Steps to reproduce: 1. Have multiple companies 2. Create a multiple employee allocation 3. Connect to the other company: you should be able to find the allocation This commit further restricts multi-company access to allocations, so that it is accessible only when at least one of the employees on the allocation have the same company. task-4241723 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183937
### Issue: - When picking up a SO in POS, the discount on products sold with a non groupable UOM disappears. ### Steps to reproduce: - Create a SO in the sales app. - Include a product that has a UOM of which the uom category is not grouped in POS (g for example). - Add a discount to the product. - Pick up the order in POS. - Notice that the discount is not applied. ### Solution: - In `_onClickSaleOrder` I set the discount on the `splitted_line` before adding it to the orderline.
Original PR description
### Issue: - When picking up a SO in POS, the discount on products sold with a non groupable UOM disappears. ### Steps to reproduce: - Create a SO in the sales app. - Include a product that has a UOM of which the uom category is not grouped in POS (g for example). - Add a discount to the product. - Pick up the order in POS. - Notice that the discount is not applied. ### Solution: - In `_onClickSaleOrder` I set the discount on the `splitted_line` before adding it to the orderline. opw-4133659 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185289 Forward-Port-Of: odoo/odoo#185109
### Steps to reproduce: - Create 2 storable products: Final product (FP) and Component (COMP) - Put 10 units of COMP in stock - Create a Bill of Material for FP: - raw move: 10 x COMP - 1 operation: "Register COMP" - Add an instruction on your operation: - type: "Register consumed component" - Product To Register: COMP - Create and confirm an MO for 1 Unit of FP - Go to the shopfloor > "Register COMP" - Change the quantity to 3 > Validate #### > Go back to the MO the
Original PR description
### Steps to reproduce: - Create 2 storable products: Final product (FP) and Component (COMP) - Put 10 units of COMP in stock - Create a Bill of Material for FP: - raw move: 10 x COMP - 1 operation:…
### Steps to reproduce:
- Create 2 storable products: Final product (FP) and Component (COMP)
- Put 10 units of COMP in stock
- Create a Bill of Material for FP:
- raw move: 10 x COMP
- 1 operation: "Register COMP"
- Add an instruction on your operation:
- type: "Register consumed component"
- Product To Register: COMP
- Create and confirm an MO for 1 Unit of FP
- Go to the shopfloor > "Register COMP"
- Change the quantity to 3 > Validate
#### > Go back to the MO the quantity of the raw move is still 10
### Cause of the issue:
Clicking on "Validate" as well as on "Continue consumption" will trigger a call of the `_next` method with `continue_production=False` and `True` respectively:
https://github.com/odoo/enterprise/blob/e86b97f57e2388b3b65326cecedd3c14ca02ddb1/mrp_workorder/models/quality.py#L346-L352 However, if you underconsume, a new move line will be created for the remaining quantity in both cases and it should only when you `Continue consumption`.
### Note:
If you underconsume, and change the quantity of the raw move without changing its original demand. As such, its state will itself change. Hence, if you come back to the MO, the reservation sate of the MO will be recomputed and be updated from assigned to confirmed. However, as the raw move is picked it should not alter the reservation state of the MO anymore:
https://github.com/odoo/odoo/blob/9918e8f3d627f3c52238d6b04bcd15c05d34e40c/addons/mrp/models/mrp_production.py#L613 This is the purpose of the community PR.
opw-4216910
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#186475### Steps to reproduce: - Install "l10n_ch" and switch to the Swiss company - In the Accounting settings activate the QRcodes on invoices - Change the name of the Swiss company - Create an invoice - The old company name is still displayed next to the QR code ### Cause: The field displayed is the field `account_holder_name` which is not updated when changing the company name. Solution: As the field `account_holder_name` is not supposed to be shown anymore in 18.0, we can display dire
Original PR description
### Steps to reproduce: - Install "l10n_ch" and switch to the Swiss company - In the Accounting settings activate the QRcodes on invoices - Change the name of the Swiss company - Create an invoice - The old company name is still displayed next to the QR code ### Cause: The field displayed is the field `account_holder_name` which is not updated when changing the company name. Solution: As the field `account_holder_name` is not supposed to be shown anymore in 18.0, we can display directly the partner name. opw-4273688 Forward-Port-Of: odoo/odoo#186479
Steps to reproduce: - Enable Analytic Accounting and Anglo-Saxon Accounting in the settings - Create a storable product - Set inventory valuation to Automated on the product's category - Add a cost to the product - Create an invoice with the product and add an analytic distribution - When the invoice is confirmed, the distribution is also applied to the CoGS line. For example, in an invoice where the product’s sale price equals its cost, the account plan will show a balance
Original PR description
Steps to reproduce:
- Enable Analytic Accounting and Anglo-Saxon Accounting in the settings
- Create a storable product
- Set inventory valuation to Automated on the product's category
- Add a cost to the product
- Create an invoice with the product and add an analytic distribution
- When the invoice is confirmed, the distribution is also applied to the CoGS line.
For example, in an invoice where the product’s sale price equals its cost, the account plan will show a balance of 0 (debit = credit).
After this fix, the account plan will show a balance of 10.
Task 2008567 led to the commit https://github.com/odoo/odoo/commit/3590efa47849be09e694e7755ec640f41cb14313, which removed the analytic distribution from the stock interim account. However, the expense line was not modified accordingly.
opw-4177695
Forward-Port-Of: odoo/odoo#183066Steps to reproduce the issue: ============================= - Set the company of the website to one that uses (euro) currency. - Open the website editor - Drag a banner block and a products carousel block under it - Set the last template to the products block (last one in the list) - Try to edit the title of the banner block - One of two keystrokes are reverted Origin of the issue: ==================== When we added content, we do historyStep which calls sanitize on the target (the
Original PR description
Steps to reproduce the issue: ============================= - Set the company of the website to one that uses (euro) currency. - Open the website editor - Drag a banner block and a products carousel block under it - Set the last template to the products block (last one in the list) - Try to edit the title of the banner block - One of two keystrokes are reverted Origin of the issue: ==================== When we added content, we do historyStep which calls sanitize on the target (the editable), which will sanitize the non editable elements inside it and have `oe_unremovable`. observerApply now will mark this._toRollback as true so in the next keystroke it will revert the changes and so on... Solution: ========= We should not unwrap content for `oe_currency_value` spans opw-4252743 Forward-Port-Of: odoo/odoo#185995
When we try to print multiple invoice who have multiple pages and have H2 title in the comments, the system treats the document as separate files, resulting in error: `AttributeError: 'NoneType' object has no attribute 'getValue'`. Steps to reproduce: - Create an invoice without any attachment. - Create another invoice, ensuring that its printout spans multiple pages, and add an H2 title in the comments (narration). - In the list view, attempt to print both invoices. - Ensure that the r
Original PR description
When we try to print multiple invoice who have multiple pages and have H2 title in the comments, the system treats the document as separate files, resulting in error: `AttributeError: 'NoneType' object has no attribute 'getValue'`. Steps to reproduce: - Create an invoice without any attachment. - Create another invoice, ensuring that its printout spans multiple pages, and add an H2 title in the comments (narration). - In the list view, attempt to print both invoices. - Ensure that the report being printed contains a value in the "Save as attachment prefix" field. The issue arises because the presence of multiple H2 headings causes the system to treat the document as separate files. Consequently, the condition `if has_same_number_of_outlines and has_top_level_heading:` is not satisfied, which results in a stream to be None. opw-4247013 Forward-Port-Of: odoo/odoo#183881
Product images are lazy-loaded on the cart page, causing them to be displayed later than the rest of the page. As a result, some parts of the page were shifted once the image was loaded (since the image had no size before loading). This change wraps the image in a fixed-size container to avoid the layout shift. Incidentally, this change also fixes some alignment issues when the cart contains images with various aspect ratios. opw-4029017 Forward-Port-Of: odoo/odoo#187297
Original PR description
Product images are lazy-loaded on the cart page, causing them to be displayed later than the rest of the page. As a result, some parts of the page were shifted once the image was loaded (since the image had no size before loading). This change wraps the image in a fixed-size container to avoid the layout shift. Incidentally, this change also fixes some alignment issues when the cart contains images with various aspect ratios. opw-4029017 Forward-Port-Of: odoo/odoo#187297
39 changes
Enhancements to existing features
When a salary offer is created, the related applicant is automatically added as a follower. This helps ensure the applicant receives email notifications for messages posted in the offer discussion, improving communication during recruitment.
Original PR description
This commit, adds a feature that automatically adds the applicant as a follower when an offer is created. This ensures that the applicant receives notifications via email whenever a message is sent in the chatter. task-4062860
Resolved issues and error corrections
This change reverts an older workaround because the underlying behavior has been addressed elsewhere. Gantt popovers should continue to open properly within the visible browser area, reducing awkward positioning near the edge of the screen.
Original PR description
This reverts commit ebeb633be737eb7bd614c2b474fafd65cd54f0ae.
This update fixes attachment display issues so uploaded file elements no longer overlap in affected screens, including signing flows. It also removes unnecessary styling, making the interface more reliable and easier to maintain without changing business workflows.
Original PR description
* = social_facebook,social_instagram,social_linkedin,social_twitter This commits fixes: * file DOM element don't overlap when git filename (`o_attachement` in `sign`) * remove useless CSS task-4333465
This update adjusts internal Helpdesk email-related tests after a related file name change. It helps keep automated checks reliable while preparing for upcoming email recipient improvements, with no expected change for day-to-day users.
Code cleanup and technical improvements
This change removes use of an old, unmaintained configuration component and relies on the current configuration system instead. It is part of a broader cleanup effort and should reduce long-term maintenance risk without changing business workflows.
Original PR description
This commit is part of a larger refactor, see associated PR. The `odoo.conf` module was first introduced by Vo Minh Thu in 2011 with the following header message: > For now, configuration code is in openerp.tools.config. It is in mainly > unprocessed form, e.g. addons_path is a string with commas-separated > paths. The aim is to have code related to configuration (command line > parsing, configuration file loading and saving, ...) in this module > and provide real Python variables, e.g. addons_paths is really a list > of paths. The same year Vo Minh Thu resigned and nobody did maintain this module ever since. Fast forward 13 (!) years later, `odoo.tools.config` now expose processed options, i.e. addons_path is a list of paths.
This update renames the sales order line tax field to use a consistent naming convention across related Odoo apps. It helps reduce internal complexity for tax, delivery, subscription, and electronic invoicing flows without changing the intended business behavior.
Original PR description
This commit rename `tax_id` field on sale.order.line to `tax_ids` to follow guidelines and have consistent name with other model specifically with account.move.line to have generic methods for both EDI without doing some ugly operations. task-4206350
Miscellaneous changes
It defeats the purpose to use `SQL` with f-strings. We observed that if there is an uppercase letter in field names we get an error. Steps to reproduce: 1. Install account_reports 2. Add a manual field `x_M` to `account.move.line` 3. Open Profit and Loss report 4. Group by Analytic. Error (edited to reduce space): ``` 2024-11-13 11:12:53,437 1855548 ERROR test_17.4 odoo.sql_db: bad query: -- Create a temporary table, dropping not null constraints because we're not filling
Original PR description
It defeats the purpose to use `SQL` with f-strings. We observed that if there is an uppercase letter in field names we get an error. Steps to reproduce: 1. Install account_reports 2. Add a manual…
It defeats the purpose to use `SQL` with f-strings. We observed that if there is an uppercase letter in field names we get an error. Steps to reproduce:
1. Install account_reports
2. Add a manual field `x_M` to `account.move.line`
3. Open Profit and Loss report
4. Group by Analytic.
Error (edited to reduce space):
```
2024-11-13 11:12:53,437 1855548 ERROR test_17.4 odoo.sql_db: bad query:
-- Create a temporary table, dropping not null constraints because we're not filling those columns
CREATE TEMPORARY TABLE IF NOT EXISTS analytic_temp_account_move_line () inherits (account_move_line) ON COMMIT DROP;
ALTER TABLE analytic_temp_account_move_line NO INHERIT account_move_line;
ALTER TABLE analytic_temp_account_move_line DROP CONSTRAINT IF EXISTS account_move_line_check_amount_currency_balance_sign;
ALTER TABLE analytic_temp_account_move_line ALTER COLUMN move_id DROP NOT NULL;
ALTER TABLE analytic_temp_account_move_line ALTER COLUMN currency_id DROP NOT NULL;
INSERT INTO analytic_temp_account_move_line (...)
SELECT account_move_line.company_id AS "account_move_line.company_id",... to_jsonb(UNNEST(ARRAY[account_analytic_line.account_id, x_plan2_id, x_plan3_id])) AS "account_move_line.analytic_distribution", ... account_move_line.x_M AS "account_move_line.x_M", ...
FROM account_analytic_line
LEFT JOIN account_move_line
ON account_analytic_line.move_line_id = account_move_line.id
WHERE
account_analytic_line.general_account_id IS NOT NULL;
-- Create a supporting index to avoid seq.scans
CREATE INDEX IF NOT EXISTS analytic_temp_account_move_line__composite_idx ON analytic_temp_account_move_line (analytic_distribution, journal_id, date, company_id);
-- Update statistics for correct planning
ANALYZE analytic_temp_account_move_line
ERROR: column account_move_line.x_m does not exist
LINE 10: ... AS "account_move_line.discount_amount_currency", account_mo...
^
HINT: Perhaps you meant to reference the column "account_move_line.x_M".
```
After this patch the same query is:
```
-- Create a temporary table, dropping not null constraints because we're not filling those columns
CREATE TEMPORARY TABLE IF NOT EXISTS analytic_temp_account_move_line () inherits (account_move_line) ON COMMIT DROP;
ALTER TABLE analytic_temp_account_move_line NO INHERIT account_move_line;
ALTER TABLE analytic_temp_account_move_line DROP CONSTRAINT IF EXISTS account_move_line_check_amount_currency_balance_sign;
ALTER TABLE analytic_temp_account_move_line ALTER COLUMN move_id DROP NOT NULL;
ALTER TABLE analytic_temp_account_move_line ALTER COLUMN currency_id DROP NOT NULL;
INSERT INTO analytic_temp_account_move_line (...)
SELECT "account_move_line"."company_id" AS "account_move_line.company_id", ... "account_move_line"."x_M" AS "account_move_line.x_M", ... to_jsonb(UNNEST(ARRAY["account_analytic_line"."account_id", "account_analytic_line"."x_plan2_id", "account_analytic_line"."x_plan3_id"])) AS "account_move_line.analytic_distribution", ...
FROM account_analytic_line
LEFT JOIN account_move_line
ON account_analytic_line.move_line_id = account_move_line.id
WHERE
account_analytic_line.general_account_id IS NOT NULL;
-- Create a supporting index to avoid seq.scans
CREATE INDEX IF NOT EXISTS analytic_temp_account_move_line__composite_idx ON analytic_temp_account_move_line (analytic_distribution, journal_id, date, company_id);
-- Update statistics for correct planning
ANALYZE analytic_temp_account_move_line
```
A similar issue can be triggered if we add a manual field `x_plan2_id` to `account.move.line`:
```
ERROR: column reference "x_plan2_id" is ambiguous
LINE 10: ...nb(UNNEST(ARRAY[account_analytic_line.account_id, x_plan2_id...
```
Both issues are fixed here.
This was observed during upgrades. Mainly due to studio fields being generated with uppercase letters. Still, as shown above, it also fails for manual fields.
Forward-Port-Of: odoo/enterprise#737351. Set up Avatax on the current company 2. In Settings > Sales > Quotations& Orders active 'Lock Confirmed Sales' 3. Create a SO with fiscal position 'Automatic Tax Mapping (AvaTax)' 4. Add a partner and product having avatax category defined 5. Compute taxes 6. Confirm order, it will be automatically locked 7. Click "Send by Email" Issue: Action will be blocked by User Error ``` It is forbidden to modify the following fields in a locked order ``` This occurs because when sending
Original PR description
1. Set up Avatax on the current company 2. In Settings > Sales > Quotations& Orders active 'Lock Confirmed Sales' 3. Create a SO with fiscal position 'Automatic Tax Mapping (AvaTax)' 4. Add a partner and product having avatax category defined 5. Compute taxes 6. Confirm order, it will be automatically locked 7. Click "Send by Email" Issue: Action will be blocked by User Error ``` It is forbidden to modify the following fields in a locked order ``` This occurs because when sending by email we recompute external taxes, but it should not be the case for locked orders It also occurs on the web shop when finalizing the payment opw-4261396 Forward-Port-Of: odoo/enterprise#73846 Forward-Port-Of: odoo/enterprise#73505
Statements (using the partner ledger send button) are currently being sent to followers of the partner. This should not be the case, only the partner or specified recipients should receive the email. Task-4320475 Forward-Port-Of: odoo/enterprise#73596
Original PR description
Statements (using the partner ledger send button) are currently being sent to followers of the partner. This should not be the case, only the partner or specified recipients should receive the email. Task-4320475 Forward-Port-Of: odoo/enterprise#73596
Workflow rule can be configured to link a document to any model (the user has to choose the model when executing the action). In order to migrate such workflow rule, we make the parameter model of the method action_link_to_record optional. Also to ease the conversion of workflow rule into server action, we make the folder_id optional on the method document_sign_create_sign_template_x of documents_sign. Task-4283330 Forward-Port-Of: odoo/enterprise#73376
Original PR description
Workflow rule can be configured to link a document to any model (the user has to choose the model when executing the action). In order to migrate such workflow rule, we make the parameter model of the method action_link_to_record optional. Also to ease the conversion of workflow rule into server action, we make the folder_id optional on the method document_sign_create_sign_template_x of documents_sign. Task-4283330 Forward-Port-Of: odoo/enterprise#73376
**Description of the issue/feature this PR addresses**: Argentinean Localization: Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type must report to afip the customer vat when the invoice has an amount higher than $344487 is validated but because the vat is not reported to afip then it is not allowed to validate the invoice. The bug was introduced on this pr: https:
Original PR description
**Description of the issue/feature this PR addresses**: Argentinean Localization: Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification…
**Description of the issue/feature this PR addresses**: Argentinean Localization: Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type must report to afip the customer vat when the invoice has an amount higher than $344487 is validated but because the vat is not reported to afip then it is not allowed to validate the invoice. The bug was introduced on this pr: https://github.com/odoo/enterprise/pull/71562 --> The goal of this pr was to be able to create Factura B for a foreign customer. But prior to this pr the user was allowed to validate an invoice Factura B to a customer "Consumidor Final" without a country set on that customer, with "DNI" identification type, with a vat and "Consumidor final" afip responsibility type when the invoice has an amount higher than $344487 **Video explaining the bug**: https://drive.google.com/file/d/1Qb2oUtT26twjCI-pB6oMGMC9gZ6_EBSz/view **Steps to reproduce**: 1) Log ing with admin user on runbot odoo enterprise 16 or 17 instance, activate developer mode and install l10n_ar_edi module. 2) Take position on company "Responsable Inscripto". 3) Create an electronic invoice "Factura B" for customer "Consumidor Final Anónimo" with an invoice line with quantity 1 and price 500000. Select electronic journal. The Partner doesn`t have country and has "dni" identification type, dni and "Consumidor final" afip responsibility type.   4) Validate the invoice and then you will receive this message:  **Current behavior before PR**: It is not allowed to validate Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type when the invoice has an amount higher than $344487. **Desired behavior after PR is merged**: It is allowed to validate Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type when the invoice has an amount higher than $344487. Ticket Adhoc side: 82498 Task latam side: 1283 Forward-Port-Of: odoo/enterprise#73200
…aration TaskID: 4283466 Forward-Port-Of: odoo/enterprise#73088
Original PR description
…aration TaskID: 4283466 Forward-Port-Of: odoo/enterprise#73088
Purpose ======= Simplify the company folder domain. Now the domain is just the documents owned by Odoobot, and without a parent folder. The search panel now use the same domain, and so the only difference now between the kanban view and the search panel is that the search panel only show folders. Technical ========= Because the old `is_pinned_folder` is used in access rule, we can not just set it to False, it needs to reflect the owner_id / folder_id values (it will be cleaned in mast
Original PR description
Purpose ======= Simplify the company folder domain. Now the domain is just the documents owned by Odoobot, and without a parent folder. The search panel now use the same domain, and so the only difference now between the kanban view and the search panel is that the search panel only show folders. Technical ========= Because the old `is_pinned_folder` is used in access rule, we can not just set it to False, it needs to reflect the owner_id / folder_id values (it will be cleaned in master). Task-4293841 Forward-Port-Of: odoo/enterprise#73037
This is a known bug somehow reintroduced in sharepocalypse that prevents other flows (namely the OCR) from writing the correct values. Task-4260511 Forward-Port-Of: odoo/enterprise#73546
Original PR description
This is a known bug somehow reintroduced in sharepocalypse that prevents other flows (namely the OCR) from writing the correct values. Task-4260511 Forward-Port-Of: odoo/enterprise#73546
### Steps to reproduce: - In the settings: Enable "product packaging" - Create a storable product - Inventory > Configuration > Product Packaging > New - Create a packaging for that product with a quantity of 15 units - In the barcode app > inventory adjustment > + Add product > You are redirected towards a digipad without any set product_id. - Add a product #### > The packaging button is not displayed for you to add multiples of 15 Follow up of Commit 8db17ef7aa7d0f989da1ab3f05de66
Original PR description
### Steps to reproduce: - In the settings: Enable "product packaging" - Create a storable product - Inventory > Configuration > Product Packaging > New - Create a packaging for that product with a quantity of 15 units - In the barcode app > inventory adjustment > + Add product > You are redirected towards a digipad without any set product_id. - Add a product #### > The packaging button is not displayed for you to add multiples of 15 Follow up of Commit 8db17ef7aa7d0f989da1ab3f05de661fba7a9fc7 opw-4156249 --- Forward-Port-Of: odoo/enterprise#73672 Forward-Port-Of: odoo/enterprise#72626
Tax closing with fiscal positions was not working properly. 1. If the generic tax report doesn't have a specific country and the filter for fiscal position, it should take into account `all` fiscal positions. 3. The closing mechanism until version 18.0 does not work properly with the oss reports. It was not intended for the user to be able to do a closing there before version 18.0. opw-3974388 Forward-Port-Of: odoo/enterprise#73486 Forward-Port-Of: odoo/enterprise#66901
Original PR description
Tax closing with fiscal positions was not working properly. 1. If the generic tax report doesn't have a specific country and the filter for fiscal position, it should take into account `all` fiscal positions. 3. The closing mechanism until version 18.0 does not work properly with the oss reports. It was not intended for the user to be able to do a closing there before version 18.0. opw-3974388 Forward-Port-Of: odoo/enterprise#73486 Forward-Port-Of: odoo/enterprise#66901
We were misconfiguring some accounts in ec localization: - EDI purchase journal default account opw-4127252 Forward-Port-Of: odoo/enterprise#73819 Forward-Port-Of: odoo/enterprise#69561
Original PR description
We were misconfiguring some accounts in ec localization: - EDI purchase journal default account opw-4127252 Forward-Port-Of: odoo/enterprise#73819 Forward-Port-Of: odoo/enterprise#69561
### Steps to reproduce: - Set a main currency and a second one. - Upload a document in the expense module for the second currency - Refresh ### Cause: In the for loop there are more than one possible currency detected so `vals['currency_id']` does not exist but the if statement tries to read this value causing an error. ### Solution: Check if the currency_id is in the vals dictionary. If not, the default currency value will be in the Expense. opw-4307845 Forward-Port-Of: odoo/ente
Original PR description
### Steps to reproduce: - Set a main currency and a second one. - Upload a document in the expense module for the second currency - Refresh ### Cause: In the for loop there are more than one possible currency detected so `vals['currency_id']` does not exist but the if statement tries to read this value causing an error. ### Solution: Check if the currency_id is in the vals dictionary. If not, the default currency value will be in the Expense. opw-4307845 Forward-Port-Of: odoo/enterprise#73660
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account: * Account Name: [any] * Code: 123456789 * Type: Bank and Cash - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the XML on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx) **Issue:** The
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account:…
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account: * Account Name: [any] * Code: 123456789 * Type: Bank and Cash - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the XML on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx) **Issue:** The validation fails because the XML contains lines with incorrect or missing value for "CodAgrup" attribute. **Cause:** The "CodAgrup" in the "COA SAT (XML)" refers to the code of the account groups. The accepted values are defined in the "Catálogo de Códigos Agrupadores" XSD file. https://github.com/odoo/enterprise/blob/ecce698637dc2ef13dfdb27dfde303a7f1191aaf/l10n_mx_xml_polizas/data/xsd/1.3/CatalogosParaEsqContE.xsd#L4-L1086 The created account [123456789] is put in the root account group with code "1" and a line is added in the "COA SAT (XML)" with this value. However, it is not an accepted value. **Solution:** From the account groups created automatically by MX localization, only the root account groups (i.e. with code "1", "2", "3",...) do not have a valid code for the "COA SAT (XML)". These ones can be ignored. This solution is not perfect as it is still possible to create an account group with an invalid code that is not a root account group. However, handling this use case would require to check that each code is included in the set of valid codes (there is more than a thousand). opw-4209089 Forward-Port-Of: odoo/enterprise#73647
In its current state, payment initiation isn't working in production due to the lack of the KYC flow. This commits adds that alongside other minor changes and imporvements. Task ID: 4216281 Forward-Port-Of: odoo/enterprise#72628
Original PR description
In its current state, payment initiation isn't working in production due to the lack of the KYC flow. This commits adds that alongside other minor changes and imporvements. Task ID: 4216281 Forward-Port-Of: odoo/enterprise#72628
For the PFA (prime de fin d'année), the unpredictable leaves should be considered as paid. Task: 4331164 Forward-Port-Of: odoo/enterprise#73721
Original PR description
For the PFA (prime de fin d'année), the unpredictable leaves should be considered as paid. Task: 4331164 Forward-Port-Of: odoo/enterprise#73721
This commit will add the ec sales list report for Slovenian localisation Community PR: odoo/odoo#166559 Task [link](https://www.odoo.com/odoo/project/967/tasks/3901247) task-3901247 Forward-Port-Of: odoo/enterprise#73308 Forward-Port-Of: odoo/enterprise#65817
Original PR description
This commit will add the ec sales list report for Slovenian localisation Community PR: odoo/odoo#166559 Task [link](https://www.odoo.com/odoo/project/967/tasks/3901247) task-3901247 Forward-Port-Of: odoo/enterprise#73308 Forward-Port-Of: odoo/enterprise#65817
The `delivery_ups_rest` module icon was using the old one. This commit replaces it for the new UPS icon. task-4317822 Forward-Port-Of: odoo/enterprise#73582
Original PR description
The `delivery_ups_rest` module icon was using the old one. This commit replaces it for the new UPS icon. task-4317822 Forward-Port-Of: odoo/enterprise#73582
Versions -------- - saas-17.4+ Community PR: https://github.com/odoo/odoo/pull/186284 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday); 3. open in Gantt view in weekly granularity; 4. go to the week of 2024-12-30. Issue ----- Label on top right displays "W1 2024"; Cause ----- It uses the `getLocalWeekNumber` function to get the week number of 2024-12-30, which falls in the first week of 2025. It then combines it
Original PR description
Versions -------- - saas-17.4+ Community PR: https://github.com/odoo/odoo/pull/186284 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday);…
Versions -------- - saas-17.4+ Community PR: https://github.com/odoo/odoo/pull/186284 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday); 3. open in Gantt view in weekly granularity; 4. go to the week of 2024-12-30. Issue ----- Label on top right displays "W1 2024"; Cause ----- It uses the `getLocalWeekNumber` function to get the week number of 2024-12-30, which falls in the first week of 2025. It then combines it with the `year` of the date, which is 2024. Solution -------- ### Community: - Like the `weeknumber` function added in https://github.com/odoo/odoo/commit/9c47e911d0ca707826d8907ae773aeb7484a270b to `odoo.tools.date_utils`, have a function in `web` that returns both year and week number. - Remove the `getLocalWeekNumber` function in master, and replace usages with `getLocalYearAndWeek(date).week`. ### Enterprise: - Define a `formatLocalWeekYear` function in `web_gantt` using the new `getLocalYearAndWeek` function from `web`. opw-4280192 Forward-Port-Of: odoo/enterprise#73318
Steps to Reproduce: - Set up a website for a Colombian company. - Go to the shop section. - Purchase any product. Issue: - A traceback occurs when the checkout address form opens. - Another traceback appears upon clicking submit. Cause: - The error is due to an attempt to access an element in the form that is not present. Fix: - Added a condition to ensure that the element is accessed only when the address_type is set to billing. - Updated the view to display the identification
Original PR description
Steps to Reproduce: - Set up a website for a Colombian company. - Go to the shop section. - Purchase any product. Issue: - A traceback occurs when the checkout address form opens. - Another traceback appears upon clicking submit. Cause: - The error is due to an attempt to access an element in the form that is not present. Fix: - Added a condition to ensure that the element is accessed only when the address_type is set to billing. - Updated the view to display the identification type field when use_delivery_as_billing is enabled. opw-4278790 Forward-Port-Of: odoo/enterprise#72965
Before, we relied on just _l10n_br_get_error_from_response() which checks for the presence of an "error" key in the response. Unfortunately that only seems to catch errors directly raised by Avalara. The government can reject the cancellation for a myriad of reasons [1]. We could hardcode all successful status codes (24 codes), but to be more robust in case the codes change we just look if any XML is returned. The lack of XML response should reliably indicate that the cancellation failed. [1
Original PR description
Before, we relied on just _l10n_br_get_error_from_response() which checks for the presence of an "error" key in the response. Unfortunately that only seems to catch errors directly raised by Avalara. The government can reject the cancellation for a myriad of reasons [1]. We could hardcode all successful status codes (24 codes), but to be more robust in case the codes change we just look if any XML is returned. The lack of XML response should reliably indicate that the cancellation failed. [1] 4.4. Lista das Regras de Validação in https://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=J%20I%20v4eN00E= Forward-Port-Of: odoo/enterprise#73342
Steps to reproduce: - Create a subscription product with two or more plans - Go to the product's page on eCommerce - Choose another plan than the default one - Add it to the cart - Notice the default plan is the one added to the cart Current behavior before PR: After this change https://github.com/odoo/enterprise/pull/71347/commits/a847237eaf91df641d6af6c7122a1e7216621f9a there is a div got added before the tag of the select dropdown menu. So when we are getting the value of the pl
Original PR description
Steps to reproduce: - Create a subscription product with two or more plans - Go to the product's page on eCommerce - Choose another plan than the default one - Add it to the cart - Notice the default plan is the one added to the cart Current behavior before PR: After this change https://github.com/odoo/enterprise/pull/71347/commits/a847237eaf91df641d6af6c7122a1e7216621f9a there is a div got added before the tag of the select dropdown menu. So when we are getting the value of the plan_id selected https://github.com/odoo/enterprise/blob/18.0/website_sale_subscription/static/src/js/website_sale_subscription.js#L14 we don't find any element with this path. Desired behavior after PR is merged: We are changing the path that we get the value of the selected plan out of so we can make sure it is getting the right element which will get the right value accordingly. opw-4296527 Forward-Port-Of: odoo/enterprise#73768 Forward-Port-Of: odoo/enterprise#73677
Brazil is now requiring that each line includes the barcode [1]. This is being rolled out gradually per state, as of now it's only rolled out in Paraná as far as we are aware. We're applying this change to Odoo 17 and later because it only affects EDI. Odoo 16 only supported tax calculation. Validation is done based on the Avalara documentation [2]. [1] As outlined in "Nota Técnica 2021.003 Validação GTIN" https://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=SrQT9ys8OD
Original PR description
Brazil is now requiring that each line includes the barcode [1]. This is being rolled out gradually per state, as of now it's only rolled out in Paraná as far as we are aware.
We're applying this change to Odoo 17 and later because it only affects EDI. Odoo 16 only supported tax calculation.
Validation is done based on the Avalara documentation [2].
[1] As outlined in "Nota Técnica 2021.003 Validação GTIN"
https://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=SrQT9ys8ODo=
[2] https://avataxbr-docs.avalarabrasil.com.br/#/Calculations/payloadCalculation
task-4222168
Forward-Port-Of: odoo/enterprise#73709
Forward-Port-Of: odoo/enterprise#73517In production, there is a delay of around 1 second between the moment the user clicks on the share button and the share/permission panel appears. That is not good UX. To reduce that delay, this commit removes the fetching of partner options (for members' invite) when the permission panel is about to open. The RPC call is now done when users open the select menu to invite new members. task-4309414 Forward-Port-Of: odoo/enterprise#73271
Original PR description
In production, there is a delay of around 1 second between the moment the user clicks on the share button and the share/permission panel appears. That is not good UX. To reduce that delay, this commit removes the fetching of partner options (for members' invite) when the permission panel is about to open. The RPC call is now done when users open the select menu to invite new members. task-4309414 Forward-Port-Of: odoo/enterprise#73271
This commit makes cancelled depreciation entries appear in grey in the depreciation board. It also turns the the depreciation entry's name into a link towards the move's form view. Forward-Port-Of: odoo/enterprise#73705 Forward-Port-Of: odoo/enterprise#72819
Original PR description
This commit makes cancelled depreciation entries appear in grey in the depreciation board. It also turns the the depreciation entry's name into a link towards the move's form view. Forward-Port-Of: odoo/enterprise#73705 Forward-Port-Of: odoo/enterprise#72819
2 small fixes for the quality worksheet in the shop floor. Please refer to the individual feature commits for details. Forward-Port-Of: odoo/enterprise#73592 Forward-Port-Of: odoo/enterprise#70703
Original PR description
2 small fixes for the quality worksheet in the shop floor. Please refer to the individual feature commits for details. Forward-Port-Of: odoo/enterprise#73592 Forward-Port-Of: odoo/enterprise#70703
This reverts commit fd46e62809544702193e636ec388103eea11f788. Task-4314619 Forward-Port-Of: odoo/enterprise#73611 Forward-Port-Of: odoo/enterprise#73506
Original PR description
This reverts commit fd46e62809544702193e636ec388103eea11f788. Task-4314619 Forward-Port-Of: odoo/enterprise#73611 Forward-Port-Of: odoo/enterprise#73506
Users of the Certification Provider Quadrum (finkok) may experience failed validation of the payment cfdi due to the wrong payment rate computed by the system Use case: - In an MX Company with PAC Quadrum - Enable currency USD - Set up 2 rates, date1: 0.051571645909, date2: 0.049598992148 - Create an invoice in USD, date 1, with a line of qty 1, price 13125.00, tax 16% - Confirm - Make 2 partial payments of 100'000 MXN - On the Invoice, click 'Update Payments' - In the CFDI tab, on one
Original PR description
Users of the Certification Provider Quadrum (finkok) may experience failed validation of the payment cfdi due to the wrong payment rate computed by the system Use case: - In an MX Company with PAC…
Users of the Certification Provider Quadrum (finkok) may experience failed validation of the payment cfdi due to the wrong payment rate computed by the system Use case: - In an MX Company with PAC Quadrum - Enable currency USD - Set up 2 rates, date1: 0.051571645909, date2: 0.049598992148 - Create an invoice in USD, date 1, with a line of qty 1, price 13125.00, tax 16% - Confirm - Make 2 partial payments of 100'000 MXN - On the Invoice, click 'Update Payments' - In the CFDI tab, on one of the payments, click 'Force CFDI' Issue: Validation will fail with error Note: This does not occur with other providers (Solucion Factibles) ``` Code : CRP20275 Message : La suma de los valores registrados en el campo ImpPagado del nodo DoctoRelacionado, convertidos a la moneda del pago, no es menor o igual que el valor del campo Monto. ``` This occurs because, when computing the payment rate in USD, we obtain 4959.90. Due to rounding, this amount, reconverted in MXN is 100000.02 so we need to transmit an adjusted rate for Providers with a lower error tolerance opw-4314798 Forward-Port-Of: odoo/enterprise#73772 Forward-Port-Of: odoo/enterprise#73696
Before this commit: The logo is not updated when users change the icon or image and click the confirm button. The updated logo appears after refreshing the page. After this commit: When users change the icon or image and click the confirm button, the logo is now updated Task-4219545 Forward-Port-Of: odoo/enterprise#73771 Forward-Port-Of: odoo/enterprise#71512
Original PR description
Before this commit: The logo is not updated when users change the icon or image and click the confirm button. The updated logo appears after refreshing the page. After this commit: When users change the icon or image and click the confirm button, the logo is now updated Task-4219545 Forward-Port-Of: odoo/enterprise#73771 Forward-Port-Of: odoo/enterprise#71512
Steps to reproduce ================== - Go to documents - Switch to the list view - Select a record - Resize a column => The selection is lost Solution ======== Ignore clicks in the header opw-4203375 Forward-Port-Of: odoo/enterprise#73687 Forward-Port-Of: odoo/enterprise#71774
Original PR description
Steps to reproduce ================== - Go to documents - Switch to the list view - Select a record - Resize a column => The selection is lost Solution ======== Ignore clicks in the header opw-4203375 Forward-Port-Of: odoo/enterprise#73687 Forward-Port-Of: odoo/enterprise#71774
Steps to reproduce: - Install Attendances - New employee > New Contract > Set a wage - Set 'Work Entry Source' to 'Attendances' - Payroll app > New Payslip > Compute Sheet - Salary Computation tab > Basic salary = contract Wage Steps to check salary configurator: - Install Salary Configurator and Recruitment - Recruitment > Any Job Position > New Application - Generate Offer > Pick template > Configure your package - Under 'Net Salary' click Details The basic salary should be 0 as
Original PR description
Steps to reproduce: - Install Attendances - New employee > New Contract > Set a wage - Set 'Work Entry Source' to 'Attendances' - Payroll app > New Payslip > Compute Sheet - Salary Computation tab >…
Steps to reproduce: - Install Attendances - New employee > New Contract > Set a wage - Set 'Work Entry Source' to 'Attendances' - Payroll app > New Payslip > Compute Sheet - Salary Computation tab > Basic salary = contract Wage Steps to check salary configurator: - Install Salary Configurator and Recruitment - Recruitment > Any Job Position > New Application - Generate Offer > Pick template > Configure your package - Under 'Net Salary' click Details The basic salary should be 0 as no work hours have been recorded, note that this is different from having leaves recorded we're talking about a case where no records are available to compute the payslip basic salary. We might still want to generate a payslip in such cases to account for the flat allowances / deductions the employee might have on their contract's salary structure. We can't just set it to 0 though: This workaround is needed because the salary configurator also uses salary computation, where we do want to get the monthly wage (Since the contract is still provisional we don't have worked hours, but we still want it to be reflective of the position's monthly wage). In the case of an active employee however, paying a basic wage when no hours have been worked does not make sense so it should invariably be 0. This could also be relevant with other work entry sources than attendances but a contract based on worked entries automatically generates worked hours according to the schedule so it is more difficult to reach. opw-4266880 Forward-Port-Of: odoo/enterprise#73469
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header propose to scan a product - Do not scan the product by click on `+ ADD PRODUCT` - Add 1 unit of your favorite product > The header propose to scan a product or a destination location - Scan the location you had set #### > The location scan is ignored ### Cause of the issue: During the
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header propose to scan a product - Do not scan the product by click on `+ ADD PRODUCT` - Add 1 unit of your favorite product > The header propose to scan a product or a destination location - Scan the location you had set #### > The location scan is ignored ### Cause of the issue: During the `_parseBracode` called to determine what was scanned by the barcode, a location corresponding to the barcode scanned will be found. To use this barcode, if it makes sense, the `_setLocationFromBcode` will be called in turn. However, during internal transfers, this location will only be used as a destination location under very specific conditions: https://github.com/odoo/enterprise/blob/8035abddf9991f6bfb71bb7889b703e5ed31a179/stock_barcode/static/src/models/barcode_picking_model.js#L1603-L1619 And, since we did add the product manually rather than using a scan, in our case, `this.previousScannedLines.lengt` will be null rather than positive so that the location will not be used to set the destination. opw-4201489 Forward-Port-Of: odoo/enterprise#73114 Forward-Port-Of: odoo/enterprise#72283
### API Changes 1. **Dependencies** - Replaced `shared.method_name` with `dependencies.pluginName.methodName` - Plugin `name` property renamed `id` to avoid clashing with the global `name` property on classes. Values changed to camelCase. 2. **Commands** - Introduced "user commands" as a unified interface for commands that can be triggered by users (e.g. from the toolbar, powerbox and powerbuttons) - Standardized api for toolbar items, powerbox items, shortcuts, and power bu
Original PR description
### API Changes 1. **Dependencies** - Replaced `shared.method_name` with `dependencies.pluginName.methodName` - Plugin `name` property renamed `id` to avoid clashing with the global `name` property…
### API Changes
1. **Dependencies**
- Replaced `shared.method_name` with `dependencies.pluginName.methodName`
- Plugin `name` property renamed `id` to avoid clashing with the global `name` property on classes. Values changed to camelCase.
2. **Commands**
- Introduced "user commands" as a unified interface for commands that can be triggered by users (e.g. from the toolbar, powerbox and powerbuttons)
- Standardized api for toolbar items, powerbox items, shortcuts, and power buttons
- Removed `Plugin.dispatch` and `Plugin.handleCommand` methods
- Introduced `dispatchTo` for event handling and `delegateTo` for overrides
3. **Resource Categorization**
- handlers: functions that are called in response to an event (e.g. selectionchange_handlers)
- overrides: functions that replace a default behavior (e.g. paste_text_overrides)
- predicates: functions that test a condition, returning boolean (e.g. unremovable_node_predicates)
- providers: functions that supply data on demand (e.g. collaboration_peer_metadata_providers)
- processors: composable functions that transform data (e.g. history_step_processors)
- data (no suffix): not functions (e.g. system_classes)
task-4266746
Community: https://github.com/odoo/odoo/pull/186637
Forward-Port-Of: odoo/enterprise#73500TO REPRODUCE =========== 1. Create an appointment with users A and B 2. ...using 'no picture' and 'user then time' 3. go to front end 4. pick a date D both users have slots in 5. go to next month 6. change user in the dropdown (or change TZ) 7. slots appear for day D in previous month ISSUE ===== When selecting an other resource or user in the dropdown in resource_time mode, even if the selected one has no available slot for the current month, slots will appear in the slot list, c
Original PR description
TO REPRODUCE =========== 1. Create an appointment with users A and B 2. ...using 'no picture' and 'user then time' 3. go to front end 4. pick a date D both users have slots in 5. go to next month 6.…
TO REPRODUCE =========== 1. Create an appointment with users A and B 2. ...using 'no picture' and 'user then time' 3. go to front end 4. pick a date D both users have slots in 5. go to next month 6. change user in the dropdown (or change TZ) 7. slots appear for day D in previous month ISSUE ===== When selecting an other resource or user in the dropdown in resource_time mode, even if the selected one has no available slot for the current month, slots will appear in the slot list, corresponding to the first availability overall. This leads to a very strange mismatch between the calendar dates and the slots. The user may select a slot and book for a month they do not currently see on the calendar. SOLUTION ======== Now, we will select the previously selected date if it is in the current month and has slots. Otherwise we select the first day with slots in the currently displayed month (NOT overall). This way, the day is selected and displayed as so in the calendar. The slots match that day. If no availability exist for the current month, we do not click on any day, and show no slots. Task-4169513 Forward-Port-Of: odoo/enterprise#73673 Forward-Port-Of: odoo/enterprise#71460
24 changes
Enhancements to existing features
Kitchen preparation cards now show the custom name of a floating order instead of only its tracking number. This helps staff identify orders more clearly and reduces confusion when order names have been changed.
Original PR description
Before this commit: ==================== Only the tracking number was shown on the kitchen card for floating orders. If the user changed the name of a floating order, it could create confusion if the displayed name was different. After this commit: ================== The floating order name will be displayed for floating orders, otherwise, the tracking number will be shown. task- 4274465
Resolved issues and error corrections
List views can now apply a configured column width to action buttons. This gives business teams more control over list layouts, especially where button columns need consistent spacing or alignment.
Original PR description
Before this commit, it was not possible to set the width attribute in a list view arch on `<button>` nodes. This commit allows it. One difficulty was that there's already some magic around button columns. Indeed, adjacent buttons in the arch are gathered in a single column. This doesn't map well with the width logic, as we want to be able to define a width on a button, which will thus define the width of its column. This can only work if the button is alone in its column. For that reason, when a button has a width, we do not group it with its potential adjacent buttons. Task~4307553 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
The rental website checkout test now targets the actually selected date instead of a visually highlighted date. This helps keep date selection behavior reliable as related date picker changes are introduced, reducing the risk of future checkout regressions.
Original PR description
This commit fixes a selector targetting the wrong property (datepicker "highlighted" date instead of the "selected" one). This becomes relevant in an incoming commit in community changing the overall selection in date pickers. Community: https://github.com/odoo/odoo/pull/184844 Part of task [3433683](https://www.odoo.com/odoo/project.task/3433683)
This fixes how adjustment values are handled in the Italian point of sale fiscal receipt flow. It helps ensure the fiscal printer receives the expected numeric value, reducing the risk of receipt printing errors for discounts or other item adjustments.
Original PR description
Change the adjustmentType prop type to Number instead of String
Miscellaneous changes
Steps to reproduce: 1. Open time off app. 2. Go to overview 3. select calendar view. 4. Employees' names are repeated twice on records. Fix: * Replace the repated employee's name with the name of the time off type. For example, Mitchell Mitchell 3 days would be replaced with Mitchell Paid Time Off 3 days. task-4128789 Forward-Port-Of: odoo/odoo#177422
Original PR description
Steps to reproduce: 1. Open time off app. 2. Go to overview 3. select calendar view. 4. Employees' names are repeated twice on records. Fix: * Replace the repated employee's name with the name of the time off type. For example, Mitchell Mitchell 3 days would be replaced with Mitchell Paid Time Off 3 days. task-4128789 Forward-Port-Of: odoo/odoo#177422
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186968
Original PR description
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186968
The Send & Print dialog will not consider attachments that have the same name as removed ones, example: - Create an invoice - Confirm it - From the action menu: `Print` > `Invoice` - Download the file to disk - e.g. `INV_2024_00001.pdf` - Open the `Send & Print` dialog - Select `Email` only - Remove the generated attachment `INV_2024_00001.pdf` (on the dialog) - Add the `INV_2024_00001.pdf` attachment (the one on disk) - Send the email The invoice will not be attached to the email,
Original PR description
The Send & Print dialog will not consider attachments that have the same name as removed ones, example: - Create an invoice - Confirm it - From the action menu: `Print` > `Invoice` - Download the file to disk - e.g. `INV_2024_00001.pdf` - Open the `Send & Print` dialog - Select `Email` only - Remove the generated attachment `INV_2024_00001.pdf` (on the dialog) - Add the `INV_2024_00001.pdf` attachment (the one on disk) - Send the email The invoice will not be attached to the email, you can check in the chatter. This occurs because we filter out attachments by checking their names, and the name is the same as the auto-generated one. Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4260237) opw-4260237 Forward-Port-Of: odoo/odoo#186489
**Steps to reproduce:** - Install l10n_mx_reports (not mandatory but easier to reproduce) - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Select "Last Month" as data filter - Select "Previous Month: 9" as comparison filter - Click on dropdown button next to PDF button - Click on a button that is displayed in front of the header of the report (e.g. XLSX) **Issue:** The action is not triggered. Once the butto
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports (not mandatory but easier to reproduce) - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports /…
**Steps to reproduce:** - Install l10n_mx_reports (not mandatory but easier to reproduce) - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Select "Last Month" as data filter - Select "Previous Month: 9" as comparison filter - Click on dropdown button next to PDF button - Click on a button that is displayed in front of the header of the report (e.g. XLSX) **Issue:** The action is not triggered. Once the button has been clicked, the dropdown menu disappears behind the header of the report. **Cause:** The buttons in the dropdown menu have z-index:1000 and the thead of the report has the z-index:999, which displays the buttons in front the header of the report. However, when clicked, the button becomes active and its z-index falls to 2, putting it behind the header. opw-4265087 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187147 Forward-Port-Of: odoo/odoo#186277
Steps to reproduce the issue: ============================= - Go to any chatter - Open email composer - Add seperator - Send - The seperator doesn't appear Origin of the issue: ==================== The issue was first introduced by [1] where we wanted to simplify the border-width to use only the style of 1 but it doesn't work correctly for `hr` element. We keep all border-with styles as grouping them all in one style can lead to very different ui. opw-4300018 [1]: https://github
Original PR description
Steps to reproduce the issue: ============================= - Go to any chatter - Open email composer - Add seperator - Send - The seperator doesn't appear Origin of the issue: ==================== The issue was first introduced by [1] where we wanted to simplify the border-width to use only the style of 1 but it doesn't work correctly for `hr` element. We keep all border-with styles as grouping them all in one style can lead to very different ui. opw-4300018 [1]: https://github.com/odoo/odoo/commit/3763d0e4c5cd97793721dc3404b403348ff2c2e8 Forward-Port-Of: odoo/odoo#186541
We encounter an error when trying to open any POS category from the ``Dashboard``, if the Administrator is assigned the role of ``User`` for ``Point of Sale`` Steps to reproduce: --- - Install the ``point_of_sale`` module(without demo) - Change the right from ``Admin`` -> ``User`` in ``Point of Sale`` in Users - Now go to ``Dashboard`` and try to open any category Traceback: --- ```ParseError while parsing /home/odoo/src/odoo/saas-17.4/addons/product/data/product_demo.xml:5, somewhe
Original PR description
We encounter an error when trying to open any POS category from the ``Dashboard``, if the Administrator is assigned the role of ``User`` for ``Point of Sale``
Steps to reproduce:
---
- Install the ``point_of_sale`` module(without demo)
- Change the right from ``Admin`` -> ``User`` in ``Point of Sale`` in Users
- Now go to ``Dashboard`` and try to open any category
Traceback:
---
```ParseError
while parsing /home/odoo/src/odoo/saas-17.4/addons/product/data/product_demo.xml:5, somewhere inside <record id="base.group_user" model="res.groups">
<field name="implied_ids" eval="[(4, ref('product.group_product_variant'))]"/>
</record>
```
This commit will fix the above error by displaying an ``Access Denied`` pop-up for users with the ``User`` role when attempting to open the POS category.
sentry-5717539295
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#181228When a user visits a product page, the product gets marked as "recently viewed" after 8 seconds. This delay is too long, as a user can realistically view the product and navigate away before the 8 seconds have passed (in which case the product isn't marked as recently viewed). In particular, this is problematic when the website contains a "recently viewed products" carousel, where the user expects to see all products they recently viewed (even if they didn't stay on the product page f
Original PR description
When a user visits a product page, the product gets marked as "recently viewed" after 8 seconds. This delay is too long, as a user can realistically view the product and navigate away before the 8 seconds have passed (in which case the product isn't marked as recently viewed). In particular, this is problematic when the website contains a "recently viewed products" carousel, where the user expects to see all products they recently viewed (even if they didn't stay on the product page for 8 seconds). We decided to reduce the delay to 0.5 seconds, which is long enough to prevent the product from being marked as "recently viewed" if the user visits a product page by mistake and immediately navigates away, but short enough to prevent problematic behaviors such as the one mentioned above. opw-4114364 Forward-Port-Of: odoo/odoo#187025
When reversing a move of type 'in/out refund', we create a move of type 'entry' instead of 'in/out invoice' opw-4247643 Forward-Port-Of: odoo/odoo#184909
Original PR description
When reversing a move of type 'in/out refund', we create a move of type 'entry' instead of 'in/out invoice' opw-4247643 Forward-Port-Of: odoo/odoo#184909
Currently if you try to modify the quantity of a combo product from the cart in the kiosk, the price will not update. Steps to reproduce: ------------------- * Open a kiosk * Add a combo product to the order * Go to review the order * Click on the + button > Observation: The price of the order does not change. Why the fix: ------------ In the backend we can see that the parent quantity was changed accordingly but the child products quantity stayed at 1. We were not accessing the ri
Original PR description
Currently if you try to modify the quantity of a combo product from the cart in the kiosk, the price will not update. Steps to reproduce: ------------------- * Open a kiosk * Add a combo product to the order * Go to review the order * Click on the + button > Observation: The price of the order does not change. Why the fix: ------------ In the backend we can see that the parent quantity was changed accordingly but the child products quantity stayed at 1. We were not accessing the right field when checking the child products. opw-4283481 Forward-Port-Of: odoo/odoo#187257
To reproduce the issue: 1) Create a company A, with a branch B 2) Define a currency rate for A, for currency C 3) Open currency C's form view with only B as active company ==> The rate created in 2) is not shown Forward-Port-Of: odoo/odoo#187239
Original PR description
To reproduce the issue: 1) Create a company A, with a branch B 2) Define a currency rate for A, for currency C 3) Open currency C's form view with only B as active company ==> The rate created in 2) is not shown Forward-Port-Of: odoo/odoo#187239
## Issue: - When a database is set to a language other than English, the 'Expected Date' for product replenishment does not adapt according to the set vendor lead time. This issue does not occur when the database is set to English. ## Steps To Reproduce: - Create a storable product. - Define a vendor for this product and add a delivery lead time. - Navigate to the product template and click on the "Replenish" button. - Observe that in an English language setting, the schedule date is cal
Original PR description
## Issue: - When a database is set to a language other than English, the 'Expected Date' for product replenishment does not adapt according to the set vendor lead time. This issue does not occur when…
## Issue: - When a database is set to a language other than English, the 'Expected Date' for product replenishment does not adapt according to the set vendor lead time. This issue does not occur when the database is set to English. ## Steps To Reproduce: - Create a storable product. - Define a vendor for this product and add a delivery lead time. - Navigate to the product template and click on the "Replenish" button. - Observe that in an English language setting, the schedule date is calculated correctly considering the vendor's delivery lead time. - Change the language of the database to a different language. - Repeat the replenish process. - Observe that the schedule date is not calculated correctly. ## Solution: - Replaced route name check with action check in `_get_date_planned` for better reliability, as action-based conditions reduce errors compared to route name comparisons.. opw-4199660 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183552
We were misconfiguring some accounts in ec localization: - Sale and purchase journals default accounts - Missing default valuation accounts on Adjustement and Production locations opw-4127252 Forward-Port-Of: odoo/odoo#187150 Forward-Port-Of: odoo/odoo#179361
Original PR description
We were misconfiguring some accounts in ec localization: - Sale and purchase journals default accounts - Missing default valuation accounts on Adjustement and Production locations opw-4127252 Forward-Port-Of: odoo/odoo#187150 Forward-Port-Of: odoo/odoo#179361
When switching between threads, `composer.thread` changed but the func to remove the typing indicator was not called to the previous thread. The fix is to call the func to remove the typing indicator when the thread changes. task-4285488 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187168 Forward-Port-Of: odoo/odoo#186808
Original PR description
When switching between threads, `composer.thread` changed but the func to remove the typing indicator was not called to the previous thread. The fix is to call the func to remove the typing indicator when the thread changes. task-4285488 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187168 Forward-Port-Of: odoo/odoo#186808
**Description of the issue/feature this PR addresses**: Argentinean Localization: Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type must report to afip the customer vat when the invoice has an amount higher than $344487 is validated but because the vat is not reported to afip then it is not allowed to validate the invoice. The bug was introduced on this pr: https:
Original PR description
**Description of the issue/feature this PR addresses**: Argentinean Localization: Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification…
**Description of the issue/feature this PR addresses**: Argentinean Localization: Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type must report to afip the customer vat when the invoice has an amount higher than $344487 is validated but because the vat is not reported to afip then it is not allowed to validate the invoice. The bug was introduced on this pr: https://github.com/odoo/enterprise/pull/71562 --> The goal of this pr was to be able to create Factura B for a foreign customer. But prior to this pr the user was allowed to validate an invoice Factura B to a customer "Consumidor Final" without a country set on that customer, with "DNI" identification type, with a vat and "Consumidor final" afip responsibility type when the invoice has an amount higher than $344487 **Video explaining the bug**: https://drive.google.com/file/d/1Qb2oUtT26twjCI-pB6oMGMC9gZ6_EBSz/view **Steps to reproduce**: 1) Log ing with admin user on runbot odoo enterprise 16 or 17 instance, activate developer mode and install l10n_ar_edi module. 2) Take position on company "Responsable Inscripto". 3) Create an electronic invoice "Factura B" for customer "Consumidor Final Anónimo" with an invoice line with quantity 1 and price 500000. Select electronic journal. The Partner doesn`t have country and has "dni" identification type, dni and "Consumidor final" afip responsibility type.   4) Validate the invoice and then you will receive this message:  **Current behavior before PR**: It is not allowed to validate Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type when the invoice has an amount higher than $344487. **Desired behavior after PR is merged**: It is allowed to validate Electronic customer invoice Factura B for a customer "Consumidor Final" without country, with "DNI" identification type, with vat and "Consumidor final" afip responsibility type when the invoice has an amount higher than $344487. Ticket Adhoc side: 82498 Task latam side: 1283 Forward-Port-Of: odoo/enterprise#73200
Context: Every Behavior in Knowledge was a new App based on the config of the main Odoo App. Among shared resources are registries and services. In particular, the `main_components` registry is used to mount components, and, for the purpose of the following example that registry is used by the `popover_service`. Another thing to note is that the template compilation involves a reference to the App, and all ComponentNode have an app property which is the app that was used to compile i
Original PR description
Context: Every Behavior in Knowledge was a new App based on the config of the main Odoo App. Among shared resources are registries and services. In particular, the `main_components` registry is used…
Context: Every Behavior in Knowledge was a new App based on the config of the main Odoo App. Among shared resources are registries and services. In particular, the `main_components` registry is used to mount components, and, for the purpose of the following example that registry is used by the `popover_service`. Another thing to note is that the template compilation involves a reference to the App, and all ComponentNode have an app property which is the app that was used to compile its template. Issue: Now all pieces together in a problematic example case: Creating a new popover from a Behavior App involves the `main_components` registry: - Create a PopoverController (position logic (wrapper)). It is created within the main App through the registry, and its lifecycle is managed by the main App Scheduler. - Fill it with a Custom Component (business logic). It is created within the Embedded Component App, and its lifecycle is managed by the Embedded Component App Scheduler. Both schedulers lifecycle handling are not synchronized, and at some indeterministic point one of the Apps will crash during the manipulation of that popover. Solution: Use the new "subroots" OWL feature instead of using sub-apps, so that all templates are created from the same App, and the scheduler is the same for all components. This also has the advantage of not having to re-compile all templates for every Behavior. task-4300215 Forward-Port-Of: odoo/enterprise#73805 Forward-Port-Of: odoo/enterprise#73224
…aration TaskID: 4283466 Forward-Port-Of: odoo/enterprise#73088
Original PR description
…aration TaskID: 4283466 Forward-Port-Of: odoo/enterprise#73088
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account: * Account Name: [any] * Code: 123456789 * Type: Bank and Cash - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the XML on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx) **Issue:** The
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account:…
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account: * Account Name: [any] * Code: 123456789 * Type: Bank and Cash - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the XML on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx) **Issue:** The validation fails because the XML contains lines with incorrect or missing value for "CodAgrup" attribute. **Cause:** The "CodAgrup" in the "COA SAT (XML)" refers to the code of the account groups. The accepted values are defined in the "Catálogo de Códigos Agrupadores" XSD file. https://github.com/odoo/enterprise/blob/ecce698637dc2ef13dfdb27dfde303a7f1191aaf/l10n_mx_xml_polizas/data/xsd/1.3/CatalogosParaEsqContE.xsd#L4-L1086 The created account [123456789] is put in the root account group with code "1" and a line is added in the "COA SAT (XML)" with this value. However, it is not an accepted value. **Solution:** From the account groups created automatically by MX localization, only the root account groups (i.e. with code "1", "2", "3",...) do not have a valid code for the "COA SAT (XML)". These ones can be ignored. This solution is not perfect as it is still possible to create an account group with an invalid code that is not a root account group. However, handling this use case would require to check that each code is included in the set of valid codes (there is more than a thousand). opw-4209089 Forward-Port-Of: odoo/enterprise#73647
### Steps to reproduce: - Set a main currency and a second one. - Upload a document in the expense module for the second currency - Refresh ### Cause: In the for loop there are more than one possible currency detected so `vals['currency_id']` does not exist but the if statement tries to read this value causing an error. ### Solution: Check if the currency_id is in the vals dictionary. If not, the default currency value will be in the Expense. opw-4307845 Forward-Port-Of: odoo/ente
Original PR description
### Steps to reproduce: - Set a main currency and a second one. - Upload a document in the expense module for the second currency - Refresh ### Cause: In the for loop there are more than one possible currency detected so `vals['currency_id']` does not exist but the if statement tries to read this value causing an error. ### Solution: Check if the currency_id is in the vals dictionary. If not, the default currency value will be in the Expense. opw-4307845 Forward-Port-Of: odoo/enterprise#73660
Before, we relied on just _l10n_br_get_error_from_response() which checks for the presence of an "error" key in the response. Unfortunately that only seems to catch errors directly raised by Avalara. The government can reject the cancellation for a myriad of reasons [1]. We could hardcode all successful status codes (24 codes), but to be more robust in case the codes change we just look if any XML is returned. The lack of XML response should reliably indicate that the cancellation failed. [1
Original PR description
Before, we relied on just _l10n_br_get_error_from_response() which checks for the presence of an "error" key in the response. Unfortunately that only seems to catch errors directly raised by Avalara. The government can reject the cancellation for a myriad of reasons [1]. We could hardcode all successful status codes (24 codes), but to be more robust in case the codes change we just look if any XML is returned. The lack of XML response should reliably indicate that the cancellation failed. [1] 4.4. Lista das Regras de Validação in https://www.nfe.fazenda.gov.br/portal/exibirArquivo.aspx?conteudo=J%20I%20v4eN00E= Forward-Port-Of: odoo/enterprise#73342
We were misconfiguring some accounts in ec localization: - EDI purchase journal default account opw-4127252 Forward-Port-Of: odoo/enterprise#73776 Forward-Port-Of: odoo/enterprise#69561
Original PR description
We were misconfiguring some accounts in ec localization: - EDI purchase journal default account opw-4127252 Forward-Port-Of: odoo/enterprise#73776 Forward-Port-Of: odoo/enterprise#69561
5 changes
Resolved issues and error corrections
This update resolves an issue where nested lines within account reports were not fully unfolding, preventing users from seeing all related financial data. The fix ensures that all child lines are correctly expanded, providing a more complete and accurate view of financial reports. This improves data visibility and reporting accuracy.
This update ensures that images taken during quality checks linked to Manufacturing Orders (MOs) or Work Orders (WOs) are now correctly displayed within the quality check wizard. Previously, picture-type quality checks didn't show the associated image, which is now resolved to improve the visual clarity of quality control processes.
Original PR description
When opening a validated quality check from a MO/WO, if the type of the quality check is 'picture', the QC wizard should show the image taken.
This update corrects a discrepancy in how medical assistance work entries are handled within the payroll system. Previously, they didn't align with standard credit-time entries, leading to potential reporting inconsistencies. This fix ensures medical assistance entries now use the same DMFA code, improving accuracy and compliance.
Original PR description
The medical assistance work entry should be behaving like the credit-time and should have the same DMFA code. Task: 4247631 Forward-Port-Of: odoo/enterprise#71872
This update ensures that only the necessary Electronic Data Interchange (EDI) fields related to Mexican tax regulations are displayed for Odoo companies with a Mexican fiscal country. This improves data accuracy and reduces clutter for users working with Mexican businesses, streamlining reporting and compliance.
Original PR description
We only need to shown MX EDI fields for move/invoices related to a company where fiscal country is Mexico, hide it for other companies. Forward-Port-Of: odoo/enterprise#73623
A technical issue causing a traceback when managing addresses on the Odoo website for Colombian businesses has been resolved. The fix ensures consistent data access, preventing errors related to how address information is handled, improving the user experience for our Colombian customers.
Original PR description
Steps to Reproduce: - Set up a website for a Colombian company. - Go to the shop section. - Purchase any product. Issue: - Traceback occurs when opening the address form for an existing or new address. Cause: - The error occurs because the form data for state_id, city_id, and other field is not consistently accessible, depending on whether values is a object or a dictionary. Fix: - Added checks to ensure fields like state_id and city_id are accessed only if they exist within values. opw-4314031