Tuesday, July 9, 2024
44 changes · saas-17.1
Resolved issues and error corrections
Point of Sale searches now correctly prioritize exact matches for short product references and barcodes. This prevents staff from seeing fuzzy search results when the exact product code exists, making checkout lookup more reliable.
Original PR description
Before this commit, searching for internal references or barcodes with less than 6 characters would result in a fuzzy search, even when an exact match was available. This behavior was based on the assumption that barcodes and internal references are at least 6 characters long. opw-4029891 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating a new customer in Point of Sale now applies default values to the new customer record instead of accidentally changing the existing customer data. This helps avoid incorrect customer information during checkout and in country-specific POS flows for Argentina and Peru.
Original PR description
Before this commit, creating a new partner incorrectly wrote the default values into `this.props.partner`. This commit ensures that default values are correctly set for new partners. Enterprise PR: https://github.com/odoo/enterprise/pull/66310 opw-4042039 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Demo data in the Social Marketing sample content now uses the correct date format. This prevents an error when creating a CRM lead from an Instagram comment, allowing the expected lead wizard to open.
Original PR description
Steps: - Install social_demo, crm - Open social marketing app - Open instagram ost - Create a lead from comment Actual result: - issue due to the demo data with invalid date format - demo date is not ISO8601 compliant Expected result - Lead wizard is opened opw-3975423 opw-4019390 Caused-by: https://github.com/odoo/enterprise/commit/4fb0f854c57c1669eea8a383a55e16dd52894142
Creating a new customer in Point of Sale now applies the intended default details to the new customer record instead of altering an existing customer view. This helps avoid incorrect customer information during checkout in affected localizations.
Original PR description
Before this commit, creating a new partner incorrectly wrote the default values into `this.props.partner`. This commit ensures that default values are correctly set for new partners. Related PR: https://github.com/odoo/odoo/pull/172399 opw-4042039
Miscellaneous changes
Before this commit, when creating a channel from the discuss sidebar, the name of the channel would be transformed to lower case and stripped of accents. This happens because the same cleaned term used for searching gets used to define the name of the new channel. This commit fixes the issue by using the unaltered search term. Before:  After:  After:  Forward-Port-Of: odoo/odoo#172494
[FIX] l10n_tr: Fix migration script's execution phase This is a follow up to https://github.com/odoo/odoo/pull/167258 When we trigger the upgrade button of the package, We get an error that 'create_asset' field is null even that field has a default value The issue is not specified yet, Reaching the upgrade team to get their input changing the phase from 'post-' to 'end-' task-id#3924220 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forwa
Original PR description
[FIX] l10n_tr: Fix migration script's execution phase This is a follow up to https://github.com/odoo/odoo/pull/167258 When we trigger the upgrade button of the package, We get an error that 'create_asset' field is null even that field has a default value The issue is not specified yet, Reaching the upgrade team to get their input changing the phase from 'post-' to 'end-' task-id#3924220 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172478
Before this commit, the error service attempted to adapt the `error.stack` format to match the one used by Chrome. But even then, the error_service_tests (that compare exactly the traceback) didn't pass on Firefox. Since version 125, even Chrome itself doesn't pass that test. This commit adapts the stack formatting code to ensure the actual error name is present and its message, but without trying to match a (too) specific format. Also in this commit, the related tests are adapte
Original PR description
Before this commit, the error service attempted to adapt the `error.stack` format to match the one used by Chrome. But even then, the error_service_tests (that compare exactly the traceback) didn't pass on Firefox. Since version 125, even Chrome itself doesn't pass that test. This commit adapts the stack formatting code to ensure the actual error name is present and its message, but without trying to match a (too) specific format. Also in this commit, the related tests are adapted to be a little less strict (and more resilient), but stil ensuring the actual error name and message are present. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172420 Forward-Port-Of: odoo/odoo#172230
Added tax report, taxes, tax groups, fiscal positions, and translated accounts. The czech l10n package was not properly setup. The tax report was missing, and wrong taxes and tax groups were used. Moreover, COA was added in czech only. task-3127683 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#158828
Original PR description
Added tax report, taxes, tax groups, fiscal positions, and translated accounts. The czech l10n package was not properly setup. The tax report was missing, and wrong taxes and tax groups were used. Moreover, COA was added in czech only. task-3127683 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#158828
Steps to reproduce: - Create a serial tracked storable product. - Create a receipt picking for this product with quantity > 2. - Confirm the picking and assign serial numbers. - Click on "Detailed Operations" smart button. - Change the destination location of one or more move line. - Select some move lines with different destination location. - Click on "Put in Pack" button. Expected behavior: `stock.package.destination` wizard opens with only the selected move lines. Current behav
Original PR description
Steps to reproduce: - Create a serial tracked storable product. - Create a receipt picking for this product with quantity > 2. - Confirm the picking and assign serial numbers. - Click on "Detailed Operations" smart button. - Change the destination location of one or more move line. - Select some move lines with different destination location. - Click on "Put in Pack" button. Expected behavior: `stock.package.destination` wizard opens with only the selected move lines. Current behavior: The wizard opens with all the move lines in the picking. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172218
## Issue: Due to having 'text-bg-secondary' in our Add to Calendar button, if we modify the secondary button style for the website theme, the new style for the secondary button will not be applied properly even though it's a secondary button. ## Steps to reproduce: 1. Install website_event. 2. Modify the secondary button style for the theme (i.e set it to outline) 3. Check the button inside events > register an event. ## Solution: We could get rid of the class 'text-bg-secondary' for
Original PR description
## Issue: Due to having 'text-bg-secondary' in our Add to Calendar button, if we modify the secondary button style for the website theme, the new style for the secondary button will not be applied properly even though it's a secondary button. ## Steps to reproduce: 1. Install website_event. 2. Modify the secondary button style for the theme (i.e set it to outline) 3. Check the button inside events > register an event. ## Solution: We could get rid of the class 'text-bg-secondary' for this button which will make the button to keep same style and still be "responsive" to theme changes. opw-3869252 Forward-Port-Of: odoo/odoo#161864
Create an analytic plan [TEST] with default optional availability Add an applicability line with: - Domain: Expense - Product Category: [CATEG] - Applicability: Mandatory Create an expense with an expense product having categoy [CATEG] Create Report, submit and approve Issue: No message is raised, the action should have been blocked by the mandatory applicability opw-3955683 Forward-Port-Of: odoo/odoo#171653 Forward-Port-Of: odoo/odoo#168312
Original PR description
Create an analytic plan [TEST] with default optional availability Add an applicability line with: - Domain: Expense - Product Category: [CATEG] - Applicability: Mandatory Create an expense with an expense product having categoy [CATEG] Create Report, submit and approve Issue: No message is raised, the action should have been blocked by the mandatory applicability opw-3955683 Forward-Port-Of: odoo/odoo#171653 Forward-Port-Of: odoo/odoo#168312
The restrictions on `button_draft` method on account move were moved to a new method to allow inherit and mute the restrictions in necessary cases for some customizations. A user case is the next: Allow the deletion of cash basis or Exchange Differential entries to facilitate the accounting audit process. As the number of lines in the accounting entries generated by these transactions can grow significantly, this occurs each time a payment that has generated CABA or Exchange Differen
Original PR description
The restrictions on `button_draft` method on account move were moved to a new method to allow inherit and mute the restrictions in necessary cases for some customizations. A user case is the next:…
The restrictions on `button_draft` method on account move were moved to a new method to allow inherit and mute the restrictions in necessary cases for some customizations. A user case is the next: Allow the deletion of cash basis or Exchange Differential entries to facilitate the accounting audit process. As the number of lines in the accounting entries generated by these transactions can grow significantly, this occurs each time a payment that has generated CABA or Exchange Differential entries is canceled or unreconciled, reverse lines are generated for these entries. Setting the posted journal entries to "draft" when canceling by using the `button_cancel` method was introduced in [1], this does not allow deleting the CABA or Exchange Differential entries generated in the unreconciled and reconcile process. [1] 1de5c98 Related: #96134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170067
## Analysis In case it's a simplified invoice, the 'to_invoice' is automatically set to True if a corresponding journal is set. Simplified invoices then generates a PDF which takes a few seconds to generate (using wkhtmltopdf) and slow downs the user experience. ## Fix This commit avoids generating the PDF in case no orders explicitly require an invoice. It mostly works the same as this commit for the Chilean localization: https://github.com/odoo/enterprise/pull/53655 which introduced a ne
Original PR description
## Analysis In case it's a simplified invoice, the 'to_invoice' is automatically set to True if a corresponding journal is set. Simplified invoices then generates a PDF which takes a few seconds to generate (using wkhtmltopdf) and slow downs the user experience. ## Fix This commit avoids generating the PDF in case no orders explicitly require an invoice. It mostly works the same as this commit for the Chilean localization: https://github.com/odoo/enterprise/pull/53655 which introduced a new context parameter (in the related commit: https://github.com/odoo/odoo/pull/148159). ### References opw-3875944 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164783
A recent fix forbade the usage of partners from other companies on a SO (see 7be39d0b2157ec53e84c730a210868e4a4a1f8d9, and the comment on the original PR). On the ecommerce, in some advanced multi-company & multi-website configuration, this led some customers to be unable to create a cart (add products to it), because their partner was restricted to another company. It was previously possible, but led to other issues later on, e.g. during the post-processing of payment transactions linked
Original PR description
A recent fix forbade the usage of partners from other companies on a SO (see 7be39d0b2157ec53e84c730a210868e4a4a1f8d9, and the comment on the original PR). On the ecommerce, in some advanced…
A recent fix forbade the usage of partners from other companies on a SO (see 7be39d0b2157ec53e84c730a210868e4a4a1f8d9, and the comment on the original PR). On the ecommerce, in some advanced multi-company & multi-website configuration, this led some customers to be unable to create a cart (add products to it), because their partner was restricted to another company. It was previously possible, but led to other issues later on, e.g. during the post-processing of payment transactions linked to the cart. Therefore, we consider it's still better to show a warning early on, but we prefer to replace the standard multi-company warning by a dedicated error message recommending the customer to have another account, or to contact the website administrator. To solve the issue for a given customer, either he should have a separate account for the given company, or no company (ID) should be set on its partner record, so that it's shared between companies. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172101
When calling read_group() with an invalid field name, the error message was misleading, indicating the last aggregated field name instead of the field that was invalid (non-existant on the model) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172317
Original PR description
When calling read_group() with an invalid field name, the error message was misleading, indicating the last aggregated field name instead of the field that was invalid (non-existant on the model) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172317
Before this commit, after searching for an article via the search button, selecting it, and completing payment, the search term persisted in the search field when starting a new order. This behavior could lead to confusion or slower workflows for cashiers. opw-4015200 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171796
Original PR description
Before this commit, after searching for an article via the search button, selecting it, and completing payment, the search term persisted in the search field when starting a new order. This behavior could lead to confusion or slower workflows for cashiers. opw-4015200 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171796
Following odoo/odoo@82ae5b0769c2, we should reuse the same author name as in the transcript introduction. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172316 Forward-Port-Of: odoo/odoo#172270
Original PR description
Following odoo/odoo@82ae5b0769c2, we should reuse the same author name as in the transcript introduction. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172316 Forward-Port-Of: odoo/odoo#172270
**Steps to reproduce the bug:** - Create a storable product P1. - Create two purchase agreement with the same product and qty=10 - Create and confirm a PO with only the second PO - Try to export both purchase agreements, selecting the one without a PO first and then the other. For the fields to export, choose: Products to purchase/ordered quantities. **Problem**: Sure, here is the corrected version in English: Both lines will show 0 units. When the `_compute_ordered_qty` is call
Original PR description
**Steps to reproduce the bug:** - Create a storable product P1. - Create two purchase agreement with the same product and qty=10 - Create and confirm a PO with only the second PO - Try to export both…
**Steps to reproduce the bug:** - Create a storable product P1. - Create two purchase agreement with the same product and qty=10 - Create and confirm a PO with only the second PO - Try to export both purchase agreements, selecting the one without a PO first and then the other. For the fields to export, choose: Products to purchase/ordered quantities. **Problem**: Sure, here is the corrected version in English: Both lines will show 0 units. When the `_compute_ordered_qty` is called with the first PO requisition line, no purchase order is linked, and therefore the total quantity remains at 0. However, the product is added as a founded line. So, on the second requisition line, even though the total quantity (10) is correctly calculated because a PO is linked, the condition that checks if the product has already been found will be true, and therefore the quantity will be set to 0. https://github.com/odoo/odoo/blob/e7850da5848993e036ab70b731f37005ccd64604/addons/purchase_requisition/models/purchase_requisition.py#L240-L244 opw-[4005265](https://www.odoo.com/web#id=4005265&view_type=form&model=project.task) Forward-Port-Of: odoo/odoo#171972 Forward-Port-Of: odoo/odoo#171809
In version 16.0, when a change is made to a record in an x2many field, saving it without saving the parent form and then accessing the record again and pressing discard will delete the changes previously made to the record. With these changes, the issue does not occur, and discarding returns the record to the state it was last saved in. Closing #171703 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: ---
Original PR description
In version 16.0, when a change is made to a record in an x2many field, saving it without saving the parent form and then accessing the record again and pressing discard will delete the changes previously made to the record. With these changes, the issue does not occur, and discarding returns the record to the state it was last saved in. Closing #171703 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#172289 Forward-Port-Of: odoo/odoo#172233
Steps to reproduce: - Install planning and switch to calendar view - try resizing the pill that is already resizable (pills that span for multiple days) Issue: pill resizing is not working as expected. Cause: the end date wasn't being calculated correctly for this. Fix: after this commit, the end date is calculated correctly. task-3326281 Forward-Port-Of: odoo/odoo#139893
Original PR description
Steps to reproduce: - Install planning and switch to calendar view - try resizing the pill that is already resizable (pills that span for multiple days) Issue: pill resizing is not working as expected. Cause: the end date wasn't being calculated correctly for this. Fix: after this commit, the end date is calculated correctly. task-3326281 Forward-Port-Of: odoo/odoo#139893
### Current behavior: Auto-trigger reordering rules can be snoozed from the list view. ### Expected behavior: Since the snooze mechanic is here onyl to hide manual reordering rules, a user error should be raised if one tries to snooze an auto-trigger reordering rule. #### + Revert of commit 515a53a opw-3901613 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171475 Forward-Port-Of: odoo/odoo#170911
Original PR description
### Current behavior: Auto-trigger reordering rules can be snoozed from the list view. ### Expected behavior: Since the snooze mechanic is here onyl to hide manual reordering rules, a user error should be raised if one tries to snooze an auto-trigger reordering rule. #### + Revert of commit 515a53a opw-3901613 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171475 Forward-Port-Of: odoo/odoo#170911
Romania requires its companies to send all invoices to a specific web service on their E-Factura platform. Now that we can generate the file (CIUS-RO XML), our next obvious step is to send them to their SPV (the ANAF platform). This commit implements 2 big part: - the full OAUTH/authentication process and its token generation - sending/fetching/downloading data to and from the SPV --- The Authentication To be able to generate the token needs a special USB key from Romania con
Original PR description
Romania requires its companies to send all invoices to a specific web service on their E-Factura platform. Now that we can generate the file (CIUS-RO XML), our next obvious step is to send them to…
Romania requires its companies to send all invoices to a specific web service on their E-Factura platform. Now that we can generate the file (CIUS-RO XML), our next obvious step is to send them to their SPV (the ANAF platform). This commit implements 2 big part: - the full OAUTH/authentication process and its token generation - sending/fetching/downloading data to and from the SPV --- The Authentication To be able to generate the token needs a special USB key from Romania connected with an ANAF account. The full process on what needs to be done is explained in the settings view, in the "Romanian E-Factura" block. Once a token is generated, we'll be able to use it in all of our request to send/fetch/download data to/from ANAF. --- The Full Sending E-Factura Flow (requires access token) - Upload invoice/credit note to SPV -> get "loading ID" - The invoice gets processed by ANAF (State: "sending") - After some time, fetch the invoice using the acquired loading ID. - If processed, there will be 2 kind of answer: "OK" or "NOK" (not ok) - Either way, we will get a "download ID", which we can then use to download the answer. - If "NOK" -> "Error". Read the zip file and display the error message - If "OK" -> "Sent". Save the zip file attachment task-id: 3595436 related enterprise PR: https://github.com/odoo/enterprise/pull/65602 Forward-Port-Of: odoo/odoo#144061
Prior to this commit, the QR code size on some receipts was too small to be scanned effectively. opw-4008280 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171503
Original PR description
Prior to this commit, the QR code size on some receipts was too small to be scanned effectively. opw-4008280 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171503
**Steps to reproduce the bug:** - Go to contact and select azure interior: - Sales & purchase tab: - Enable “Receipt Reminder” 1 day - Create a purchase order: - Select azure interior as vendor - add any storable product - Delivery date: Tomorrow - Confirm the PO - Go to the Scheduled Actions: Purchase reminder - Run it Manually - Come back to the Dashbord > Emails - Select the email for Azure interior: - Try to click on “YES” **Problem:** A tra
Original PR description
**Steps to reproduce the bug:** - Go to contact and select azure interior: - Sales & purchase tab: - Enable “Receipt Reminder” 1 day - Create a purchase order: - Select azure interior as vendor - add…
**Steps to reproduce the bug:**
- Go to contact and select azure interior:
- Sales & purchase tab:
- Enable “Receipt Reminder” 1 day
- Create a purchase order:
- Select azure interior as vendor
- add any storable product
- Delivery date: Tomorrow
- Confirm the PO
- Go to the Scheduled Actions: Purchase reminder
- Run it Manually
- Come back to the Dashbord > Emails
- Select the email for Azure interior:
- Try to click on “YES”
**Problem:**
A traceback is triggered: `AttributeError: type object 'datetime.datetime' has no attribute 'from_string'`
When the “YES” button is clicked, we retrieve the “confirmed_date” from the arguments as a string and then call the `confirm_reminder_mail` function https://github.com/odoo/odoo/blob/181c7d82e30d0848bbac7f7d0188e81aced0af07/addons/purchase/controllers/portal.py#L117
This date will be localized to the PO timezone using the `get_localized_date_planned` function: https://github.com/odoo/odoo/blob/a0be5ea52aeff3520f8f1a92206a5aad38fdaa82/addons/purchase/models/purchase.py#L823
We then get the timezone and use the `astimezone` function to transform this date, but since it is in string format, an error is triggered.
opw-4028362
Forward-Port-Of: odoo/odoo#172267To reproduce the bug: - Go to Accounting app -> Customers -> Invoices - Click on an invoice or create a new one - Click on the Preview button - Chcek due in days. It has number after the decimal point. This was caused to a miss understanding of the toFixed function. The parameter of the function represent the numbers needed after the digit. And by default its value is 0. opw-3957112 Forward-Port-Of: odoo/odoo#169217
Original PR description
To reproduce the bug: - Go to Accounting app -> Customers -> Invoices - Click on an invoice or create a new one - Click on the Preview button - Chcek due in days. It has number after the decimal point. This was caused to a miss understanding of the toFixed function. The parameter of the function represent the numbers needed after the digit. And by default its value is 0. opw-3957112 Forward-Port-Of: odoo/odoo#169217
Steps to reproduce the bug: - Create a storable product “P1” - Create a delivery for P1 - Click on “Detailed operation” smart button - select the move line - click on “put in pack” Problem: Nothing happens because the `put_in_pack` function of the 'stock.move.line' model always returns true after calling the same function of the 'stock.picking' model instead of returning the result. Note that this function cannot handle multiple move lines with different pickings. opw-4029393 For
Original PR description
Steps to reproduce the bug: - Create a storable product “P1” - Create a delivery for P1 - Click on “Detailed operation” smart button - select the move line - click on “put in pack” Problem: Nothing happens because the `put_in_pack` function of the 'stock.move.line' model always returns true after calling the same function of the 'stock.picking' model instead of returning the result. Note that this function cannot handle multiple move lines with different pickings. opw-4029393 Forward-Port-Of: odoo/odoo#172068
Version 17.0 steps to produce: - open 'hr_employees_view_kanban' in debug mode by searching in 'open view' - open hr attendance kanban view - click on kanban record - The method 'action_employee_kiosk_confirm' does not exist on the model 'hr.employee' issue: faced with a traceback cause: 'action_employee_kiosk_confirm' action was removed from hr.employee.public solution: remove 'action_employee_kiosk_confirm' action from 'hr_employees_view_kanban' view. task-4022620 Forwar
Original PR description
Version 17.0 steps to produce: - open 'hr_employees_view_kanban' in debug mode by searching in 'open view' - open hr attendance kanban view - click on kanban record - The method 'action_employee_kiosk_confirm' does not exist on the model 'hr.employee' issue: faced with a traceback cause: 'action_employee_kiosk_confirm' action was removed from hr.employee.public solution: remove 'action_employee_kiosk_confirm' action from 'hr_employees_view_kanban' view. task-4022620 Forward-Port-Of: odoo/odoo#171471
Reproduce the issue: - have an employee with one accrual allocation valid today - the allocation ends at a certain date - on his dashboard with the date picker, select a date after the allocation end - the date picker disappears Expected behaviour: - The date picker should stay on the view task-3984127 Forward-Port-Of: odoo/odoo#169021
Original PR description
Reproduce the issue: - have an employee with one accrual allocation valid today - the allocation ends at a certain date - on his dashboard with the date picker, select a date after the allocation end - the date picker disappears Expected behaviour: - The date picker should stay on the view task-3984127 Forward-Port-Of: odoo/odoo#169021
We were removing the `res_id` in SQL to avoid raising when the audit trail is activated (because we cannot modify an attachment anymore) But it still failed when the value was still in cache. [opw-4040187](https://www.odoo.com/odoo/project/49/tasks/4040187) Forward-Port-Of: odoo/odoo#172355
Original PR description
We were removing the `res_id` in SQL to avoid raising when the audit trail is activated (because we cannot modify an attachment anymore) But it still failed when the value was still in cache. [opw-4040187](https://www.odoo.com/odoo/project/49/tasks/4040187) Forward-Port-Of: odoo/odoo#172355
Steps to reproduce: -Go to analytic plans -> Projects -> Add a new line with a "Purchase Order" Domain and set Applicability to "Mandatory" -> Save -Go to Bills oF Materials -> create a new one w/ any product -> Save Issue: -There will be an error "One or more lines require a 100% analytic distribution." Cause: When saving the BoM, it leads to a constraint check https://github.com/odoo/odoo/blob/0217b88e481dc1d0d244b620ba527dec177edde1/addons/mrp_account/models/mrp_bom.py#L44-L50 I
Original PR description
Steps to reproduce: -Go to analytic plans -> Projects -> Add a new line with a "Purchase Order" Domain and set Applicability to "Mandatory" -> Save -Go to Bills oF Materials -> create a new one w/…
Steps to reproduce: -Go to analytic plans -> Projects -> Add a new line with a "Purchase Order" Domain and set Applicability to "Mandatory" -> Save -Go to Bills oF Materials -> create a new one w/ any product -> Save Issue: -There will be an error "One or more lines require a 100% analytic distribution." Cause: When saving the BoM, it leads to a constraint check https://github.com/odoo/odoo/blob/0217b88e481dc1d0d244b620ba527dec177edde1/addons/mrp_account/models/mrp_bom.py#L44-L50 In this method, we first try to find the relevant plans: https://github.com/odoo/odoo/blob/d6bdb05771fd29a79f2e8087b92a438fec28afaa/addons/analytic/models/analytic_mixin.py#L103-L107 To do so, we take all existing plans, evaluate them with a score, and take the one with the higher score. Here is the issue: when evaluating *Projects*, since we didn't provide any business domain and since the plan has a company, we assign a 0.5 score to the plan instead of skipping it: https://github.com/odoo/odoo/blob/f17b37b14cad8f353443586cc9c4ecaf86e476da/addons/analytic/models/analytic_plan.py#L310-L319 Which does not make sense as the business domain of *Project* is *Purchase Order* and here the user is dealing with a BoM... As a result, back to `_validate_distribution`, we check the distribution for this plan and realize there isn't any, hence the error: https://github.com/odoo/odoo/blob/d6bdb05771fd29a79f2e8087b92a438fec28afaa/addons/analytic/models/analytic_mixin.py#L115-L117 Solution: BOM: We don't restrict anymore the creation of a BOM. Setting an analytic distribution is only a tool to facilitate the definition of the analytic distribution on the MO but the creation should not be constrained Workcenter: we correct the flowing by specifying the business domain restricting the creation of a workcenter if any relevant rule is present Forward-Port-Of: odoo/odoo#168688
### Steps to reproduce the issue: 1. Create a Tax Based On Payment with a Cash Basis Transition Account 2. Create an Expense Paid By Company and add previously created Tax 3. Create the report, submit it, approve it then Post Journal Entries 4. Go to the Journal Entry (until you see the Journal Items) 5. The Journal Item of the Tax is recorded on the Cash Basis Transition Account but no Caba Entry is created ### Explanation: When using the company to pay the expense, the payment is
Original PR description
### Steps to reproduce the issue: 1. Create a Tax Based On Payment with a Cash Basis Transition Account 2. Create an Expense Paid By Company and add previously created Tax 3. Create the report,…
### Steps to reproduce the issue: 1. Create a Tax Based On Payment with a Cash Basis Transition Account 2. Create an Expense Paid By Company and add previously created Tax 3. Create the report, submit it, approve it then Post Journal Entries 4. Go to the Journal Entry (until you see the Journal Items) 5. The Journal Item of the Tax is recorded on the Cash Basis Transition Account but no Caba Entry is created ### Explanation: When using the company to pay the expense, the payment is immediate. When the employee took care of the payment, a Bill and a Caba Entry are created because the company still needs to reimburse the employee. ### Suggested fix: Adding a Caba Entry is not necessary since there is no need to record the transaction in a transitional account, sending the transaction in the final Account would also match the use case when using Taxes Based On Invoice. `account_id` is selected between the `cash_basis_transition_account_id` of the tax and the `account_id` of the repartition line depending on the values of `tax_exigibility` and `caba_no_transition_account`. https://github.com/odoo/odoo/blob/0c0f0b58aa49cff1efafcc1d4c5a9091e99f2ff4/addons/account/models/account_tax.py#L640-L642 The latter is a context key and is only used in this check, meaning it is most likely harmless to add it in the context of the method. opw-3946362 Forward-Port-Of: odoo/odoo#172196 Forward-Port-Of: odoo/odoo#169255
-fix and issue when adding a product to the cart (in debug mode only) an error pops up because freeze and refresh functions are missing from the props and the warning prop is not set as optional. opw-4016928 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171912
Original PR description
-fix and issue when adding a product to the cart (in debug mode only) an error pops up because freeze and refresh functions are missing from the props and the warning prop is not set as optional. opw-4016928 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171912
**Current behavior:** Lines in an invoice may display a product name incorrectly if they mix arabic/latin characters. **Expected behavior:** These types of product names should respect the RTL syntax if being sent to an Arabic lang partner. **Steps to reproduce:** *Ensure the rtlcss node package is installed and in PATH* 1. Create a Saudi company / switch to a demo one, switch to Arabic language 2. Create a product with the name: `دفتر سلكي بهوية الهيئة A4 - شد 50 ورقة
Original PR description
**Current behavior:** Lines in an invoice may display a product name incorrectly if they mix arabic/latin characters. **Expected behavior:** These types of product names should respect the RTL syntax…
**Current behavior:**
Lines in an invoice may display a product name incorrectly if
they mix arabic/latin characters.
**Expected behavior:**
These types of product names should respect the RTL syntax if
being sent to an Arabic lang partner.
**Steps to reproduce:**
*Ensure the rtlcss node package is installed and in PATH*
1. Create a Saudi company / switch to a demo one, switch to
Arabic language
2. Create a product with the name:
`دفتر سلكي بهوية الهيئة A4 - شد 50 ورقة`
3. Create an invoice to a partner with Arabic set as their lang
4. Confirm the invoice -> print it
5. The product name on the PDF has a mal-ordered name
**Cause of the issue:**
The right-to-left rule of the Arabic language is not getting
enforced.
There is a secondary bug where certain whitespace-delimited
substrings get displayed in a broken, overlapping way. From my
no-comprehensive testing, it seems to only happen when there is
a sequence in the string where you have some substring ending in
a numeral (0-9) followed by a single-space, then another
substring that begins with an Arabic alphabet character.
**Fix:**
When printing an invoice with an arabic partner:
1. Use right-aligned text instead of left
2. Pad single-space breaks between substrings in a product name
where the first substring ends with a numeral and the
second begins with an alpha char.
3. Add explicit `dir="rtl"` attribute to the display node
opw-3971541
Forward-Port-Of: odoo/odoo#169267Purpose ======= Fix the dynamic placeholder popup which wasn't closing when clicking on escape or on the "x" button in the field selection view. Instead of closing, the default value selection was displayed. Specification ============= The dynamic placeholder files have been cleaned recently and a mistake was made as the isPathSelected value was being set to true on popup closing no matter if the path was selected or not. Fixing the issue by checking if the path value is correctly set,
Original PR description
Purpose ======= Fix the dynamic placeholder popup which wasn't closing when clicking on escape or on the "x" button in the field selection view. Instead of closing, the default value selection was displayed. Specification ============= The dynamic placeholder files have been cleaned recently and a mistake was made as the isPathSelected value was being set to true on popup closing no matter if the path was selected or not. Fixing the issue by checking if the path value is correctly set, if it is, displaying the default value view, else closing the popover. related PR: odoo/odoo#117951 Task-4001976 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171697
Added XML export options of the czech tax report. Most of the work in here was copied from the previous xml export implemented in this commit: https://github.com/odoo-dev/enterprise/commit/32c9a215a74123a2bf7f984421c729c89318e300 task-3127683 Forward-Port-Of: odoo/enterprise#61200
Original PR description
Added XML export options of the czech tax report. Most of the work in here was copied from the previous xml export implemented in this commit: https://github.com/odoo-dev/enterprise/commit/32c9a215a74123a2bf7f984421c729c89318e300 task-3127683 Forward-Port-Of: odoo/enterprise#61200
Belgium now asks the pro rata deduction for the VAT export. Mandatory if the business is concerned. Added new module to be able to add fields to the wizard. task-3916995 Forward-Port-Of: odoo/enterprise#66270 Forward-Port-Of: odoo/enterprise#65442
Original PR description
Belgium now asks the pro rata deduction for the VAT export. Mandatory if the business is concerned. Added new module to be able to add fields to the wizard. task-3916995 Forward-Port-Of: odoo/enterprise#66270 Forward-Port-Of: odoo/enterprise#65442
## Before this PR In WhatsApp Composer, the Sample Values do not update when changing the WhatsApp Template. Instead, it display the sample values from the initially selected template. ## After this PR The Sample Values will now update according to the selected WhatsApp Template. Task-3996935 Forward-Port-Of: odoo/enterprise#65198
Original PR description
## Before this PR In WhatsApp Composer, the Sample Values do not update when changing the WhatsApp Template. Instead, it display the sample values from the initially selected template. ## After this PR The Sample Values will now update according to the selected WhatsApp Template. Task-3996935 Forward-Port-Of: odoo/enterprise#65198
### steps to reproduce: - Create a storable product tracked by SN with a bom with two operations in the same workcenter: - Operation 1: with at least one component consumed - Operation 2 - Create and confirm an MO using that bom - Go to the shopfloor, validate all the quantities of the operation 1 and mark as done without setting a SN on the final product #### > Invalid Operation: You should provide a lot/serial number for the final product ### Expected behavior: You should be able
Original PR description
### steps to reproduce: - Create a storable product tracked by SN with a bom with two operations in the same workcenter: - Operation 1: with at least one component consumed - Operation 2 - Create and…
### steps to reproduce: - Create a storable product tracked by SN with a bom with two operations in the same workcenter: - Operation 1: with at least one component consumed - Operation 2 - Create and confirm an MO using that bom - Go to the shopfloor, validate all the quantities of the operation 1 and mark as done without setting a SN on the final product #### > Invalid Operation: You should provide a lot/serial number for the final product ### Expected behavior: You should be able to validate the operations of the MO without assigning an SN but you should not be able to mark the MO as done without assigning the SN to the final product. Note: if no component were consumed in an operation, the invalid operation would not be raised. ### Cause of the Issue: The invalid operation is raised because of these lines: https://github.com/odoo/enterprise/blob/1b0435a92492d85f28549a207fcdb7224b457c66/mrp_workorder/models/mrp_workorder.py#L433-L434 However, the existence of "self.move_raw_ids" only indicates that a component has to be consumed in this opration rather than the existence of a move requiring a the SN of the final product to be set. ## opw-3987022 Forward-Port-Of: odoo/enterprise#65075
Before this commit the timesheet_mail_employee_nextdate and timesheet_mail_manager_nextdate Were calculated only when a change was made on timesheet_mail_employee_delay, timesheet_mail_employee_interval or timesheet_mail_manager_delay, timesheet_mail_manager_interval fields, even tho those two have a default value Now the _timesheet_postprocess method will always call _calculate_timesheet_mail_employee_nextdate and _calculate_timesheet_mail_manager_nextdate method when called from the res.com
Original PR description
Before this commit the timesheet_mail_employee_nextdate and timesheet_mail_manager_nextdate Were calculated only when a change was made on timesheet_mail_employee_delay, timesheet_mail_employee_interval or timesheet_mail_manager_delay, timesheet_mail_manager_interval fields, even tho those two have a default value Now the _timesheet_postprocess method will always call _calculate_timesheet_mail_employee_nextdate and _calculate_timesheet_mail_manager_nextdate method when called from the res.company.create method Seems to work even if the delay and interval fields don't have default value Following this PR > https://github.com/odoo/enterprise/pull/48096 15.0 > master Task-3714293 Forward-Port-Of: odoo/enterprise#65564 Forward-Port-Of: odoo/enterprise#55546
This commit moves the generic `_with_locked_records` from `l10n_mx_edi.document` in `l10n_mx_edi` -> `res.company` in `account` This allows multiple EDIs to use the same generic method for locking their record before using them in requests. This prevents 2 (or more) users to send the same invoice at the same time. Affected EDIs: l10n_mx_edi, l10n_ro_edi task-id: 3595436 related community PR: https://github.com/odoo/odoo/pull/144061 Forward-Port-Of: odoo/enterprise#65602
Original PR description
This commit moves the generic `_with_locked_records` from `l10n_mx_edi.document` in `l10n_mx_edi` -> `res.company` in `account` This allows multiple EDIs to use the same generic method for locking their record before using them in requests. This prevents 2 (or more) users to send the same invoice at the same time. Affected EDIs: l10n_mx_edi, l10n_ro_edi task-id: 3595436 related community PR: https://github.com/odoo/odoo/pull/144061 Forward-Port-Of: odoo/enterprise#65602
30% Exemption field shows on all contracts although it should only show on dutch employees contracts. This change restricts the 30% Exemption to only show on dutch contracts. task-3946599 Forward-Port-Of: odoo/enterprise#65790
Original PR description
30% Exemption field shows on all contracts although it should only show on dutch employees contracts. This change restricts the 30% Exemption to only show on dutch contracts. task-3946599 Forward-Port-Of: odoo/enterprise#65790
When a user tries to validate an invoice of the refunded order a traceback will occur. Steps to produce: - Install 'l10n_mx_edi_pos' module. - Switch to a company whose country code is 'MX'(Mexico). - Open 'Point of Sale' and New Session. - Select any products > payment > Select payment method > Invoice > Select customer > Validate. - Click on 'Next Order'. - Click on 'Refund and select your order. - Click on refund > payment > Select payment method > Invoice > Validate. - Error wil
Original PR description
When a user tries to validate an invoice of the refunded order a traceback will occur. Steps to produce: - Install 'l10n_mx_edi_pos' module. - Switch to a company whose country code is 'MX'(Mexico).…
When a user tries to validate an invoice of the refunded order a traceback will occur.
Steps to produce:
- Install 'l10n_mx_edi_pos' module.
- Switch to a company whose country code is 'MX'(Mexico).
- Open 'Point of Sale' and New Session.
- Select any products > payment > Select payment method > Invoice > Select customer > Validate.
- Click on 'Next Order'.
- Click on 'Refund and select your order.
- Click on refund > payment > Select payment method > Invoice > Validate.
- Error will be generated.
Traceback on sentry:
```
TypeError: can only concatenate str (not "bool") to str
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 42, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.1/l10n_mx_edi_pos/models/pos_order.py", line 108, in action_pos_order_invoice
action_values = super().action_pos_order_invoice()
File "addons/point_of_sale/models/pos_order.py", line 856, in action_pos_order_invoice
res = self._generate_pos_order_invoice()
File "addons/point_of_sale/models/pos_order.py", line 873, in _generate_pos_order_invoice
move_vals = order._prepare_invoice_vals()
File "addons/pos_sale/models/pos_order.py", line 32, in _prepare_invoice_vals
invoice_vals = super(PosOrder, self)._prepare_invoice_vals()
File "home/odoo/src/enterprise/saas-17.1/l10n_mx_edi_pos/models/pos_order.py", line 150, in _prepare_invoice_vals
vals['l10n_mx_edi_cfdi_origin'] = '03|' + self.refunded_order_id.account_move.l10n_mx_edi_cfdi_uuid
```
This is because 'l10n_mx_edi_cfdi_uuid' is empty at [1] and a string concatenate with it.
link [1]: https://github.com/odoo/enterprise/blob/1502f8b3e519d41f4a58e2acc846f315f6f5eeda/l10n_mx_edi_pos/models/pos_order.py#L150
This commit solves the above issue while checking the existence of
'l10n_mx_edi_cfdi_uuid' while creating the invoice for refund_order
sentry-4935781389
Forward-Port-Of: odoo/enterprise#62398
Forward-Port-Of: odoo/enterprise#59873Currently, help message for certificates in mexican localization ask for der format files. This can be confusing, therefore this commit aims to change that for smoother user understandings. [Here](https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/mexico.html#cer-and-key-certificates) is the link to the documentation specifying the format are .cer and .key Forward-Port-Of: odoo/enterprise#65691
Original PR description
Currently, help message for certificates in mexican localization ask for der format files. This can be confusing, therefore this commit aims to change that for smoother user understandings. [Here](https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/mexico.html#cer-and-key-certificates) is the link to the documentation specifying the format are .cer and .key Forward-Port-Of: odoo/enterprise#65691
Versions -------- - 16.0+ Steps ----- 1. Create an open slot in a planning; 2. publish & send an email to an employee who could fill it; 3. open the planning link sent via email; 4. open the same URL while logged out. Issue ----- The datetimes of the open slot are displayed in UTC. Cause ----- Commit cf256e94d333 modified the planning template to use the `datetime` widget to format the dates instead of the `format_datetime` function provided by the `ShiftController`. Doing so
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Create an open slot in a planning; 2. publish & send an email to an employee who could fill it; 3. open the planning link sent via email; 4. open the same URL while logged out. Issue ----- The datetimes of the open slot are displayed in UTC. Cause ----- Commit cf256e94d333 modified the planning template to use the `datetime` widget to format the dates instead of the `format_datetime` function provided by the `ShiftController`. Doing so, it lost access to the `employee_tz` value, derived from the email recipient, and hence defaulted to UTC. Solution -------- Format the dates using `format_datetime`. opw-3967787 Forward-Port-Of: odoo/enterprise#66231 Forward-Port-Of: odoo/enterprise#66015