Friday, August 30, 2024
21 changes · saas-17.2
Miscellaneous changes
As per section 34(2) of CGST Act 2017, credit notes for invoices from the financial year cannot be included in GSTR after November 30th. With this commit, if any credit note is created after November 30th of the financial year, an alert will be displayed above the report with action which redirects to all those credit notes list so the user can easily remove tax from those credit notes. POT file also added for `l10n_in_reports`. **task**-3915664 Forward-Port-Of: odoo/enterprise#66824
Original PR description
As per section 34(2) of CGST Act 2017, credit notes for invoices from the financial year cannot be included in GSTR after November 30th. With this commit, if any credit note is created after November 30th of the financial year, an alert will be displayed above the report with action which redirects to all those credit notes list so the user can easily remove tax from those credit notes. POT file also added for `l10n_in_reports`. **task**-3915664 Forward-Port-Of: odoo/enterprise#66824
Steps: - Install `marketing_automation` and `web_studio` - Open Marketing Automation and studio - Click "Edit Menu" - Click "New Menu" - Set a name - Set Existing Model - Select "Marketing Activity" - Confirm - Try to use this new menu - Traceback This is because a compute is triggered in marketing_activity and we use `literal_eval` on domain fields unsetted. `literal_eval` works only with string https://docs.python.org/3/library/ast.html#a
Original PR description
Steps:
- Install `marketing_automation` and `web_studio`
- Open Marketing Automation and studio
- Click "Edit Menu"
- Click "New Menu"
- Set a name
- Set Existing Model
- Select "Marketing Activity"
- Confirm
- Try to use this new menu
- Traceback
This is because a compute is triggered in marketing_activity and we use `literal_eval` on domain fields unsetted.
`literal_eval` works only with string https://docs.python.org/3/library/ast.html#ast.literal_eval
opw-4115586
Forward-Port-Of: odoo/enterprise#68920**Current behavior:** When adding an unplanned move line to a transfer in barcode, if the line is added to an existing move which is a subcontract transfer, it will not take the subcontract location as its source location value. Rather, it will use whatever value is defined on the picking. **Expected behavior:** Use the more precise location defined on the move rather than the picking. **Steps to reproduce:** 1. Create a product with a subcontract BOM 2. Create a receipt for that pro
Original PR description
**Current behavior:** When adding an unplanned move line to a transfer in barcode, if the line is added to an existing move which is a subcontract transfer, it will not take the subcontract location…
**Current behavior:** When adding an unplanned move line to a transfer in barcode, if the line is added to an existing move which is a subcontract transfer, it will not take the subcontract location as its source location value. Rather, it will use whatever value is defined on the picking. **Expected behavior:** Use the more precise location defined on the move rather than the picking. **Steps to reproduce:** 1. Create a product with a subcontract BOM 2. Create a receipt for that product from the subcontractor 3. Open the transfer in Barcode and manually add another line for the same product -> validate 4. In the receipt form, look at the move lines (detailed operations) and group by location to see the discrepancy **Cause of the issue:** When creating a move line here, it does not initially get a `move_id` value. Later when the move is written to the line, we would not generally want to override whatever value is on the line already because it (normally) is more precise/was purposely changed later than what value is on the move. **Fix:** In the case of lines which are created and then linked to a subcontract move, take the `location_id` of the move rather than whatever value is on the MoveLine. opw-4007423 Forward-Port-Of: odoo/enterprise#68032
[IMP] account_online_synchronization: Show banner when fail connecting to existing account Issue: Sometimes the connection with the bank breaks for some reasons either the user remove the connection from the bank dashboard etc. And when the user press on 'fetch_transaction' in odoo, We will ask him to add the bank again without showing him anything to indicate the reason. Solution: Adding a banner in the widget to report that we are facing an issue connecting to the bank-account and show
Original PR description
[IMP] account_online_synchronization: Show banner when fail connecting to existing account Issue: Sometimes the connection with the bank breaks for some reasons either the user remove the connection from the bank dashboard etc. And when the user press on 'fetch_transaction' in odoo, We will ask him to add the bank again without showing him anything to indicate the reason. Solution: Adding a banner in the widget to report that we are facing an issue connecting to the bank-account and show it whenever the user face a problem connecting to existing account through the '_handle_odoofin_redirect_exception' which handle open the iframe whenever we face an issue connecting to an existing bank account Task-3355270 odoofin PR: https://github.com/odoo/odoofin/pull/263 Forward-Port-Of: odoo/enterprise#60184
ISSUE 1 ======= **Steps to reproduce** 1). Create an event in any appointment type 2). Remove the start date from it -> Traceback occurs **video ref** - https://youtu.be/5NpfiKNdjbc **Technical** in the interval_from_events function when the end time or start time is not defined, it will not be able to unpack the values to their appropriate variables, due to this error occurred. ISSUE 2 ======= **How to reproduce** Step 1) Create an event on resources and set the start time
Original PR description
ISSUE 1 ======= **Steps to reproduce** 1). Create an event in any appointment type 2). Remove the start date from it -> Traceback occurs **video ref** - https://youtu.be/5NpfiKNdjbc **Technical** in the interval_from_events function when the end time or start time is not defined, it will not be able to unpack the values to their appropriate variables, due to this error occurred. ISSUE 2 ======= **How to reproduce** Step 1) Create an event on resources and set the start time = end time Step 2) Click on the edit button -> Traceback video ref - https://youtu.be/csFkJjO6hMQ **Technical** When we set the start = stop then we won't be able to find the interval so we failed to assign the value of the field due to this traceback occurs. **After this PR** Now traceback will not occur. Task-4010880 Forward-Port-Of: odoo/enterprise#67179
Before this PR: There are two problems: first, if you have a line discount like this: <img width="350" alt="Captura de pantalla 2024-03-27 a la(s) 09 48 55" src="https://github.com/odoo/enterprise/assets/382893/7564b133-c6e9-4bab-97f3-d8a0a2634fe5"> The calculation made by Odoo is: 319319 * 21.35 / 100 = 68175 which does not match the amount placed in "DescuentoMonto". In this case, it is 68173 (difference of 2 CLP) which is why it is better to prioritize the discount amount instead of the
Original PR description
Before this PR: There are two problems: first, if you have a line discount like this: <img width="350" alt="Captura de pantalla 2024-03-27 a la(s) 09 48 55"…
Before this PR: There are two problems: first, if you have a line discount like this: <img width="350" alt="Captura de pantalla 2024-03-27 a la(s) 09 48 55" src="https://github.com/odoo/enterprise/assets/382893/7564b133-c6e9-4bab-97f3-d8a0a2634fe5"> The calculation made by Odoo is: 319319 * 21.35 / 100 = 68175 which does not match the amount placed in "DescuentoMonto". In this case, it is 68173 (difference of 2 CLP) which is why it is better to prioritize the discount amount instead of the percentage in the XML, which is already rounding, leading to a problem. The second: if you have a surcharge in the line, like this: <img width="354" alt="Captura de pantalla 2024-03-27 a la(s) 09 52 40" src="https://github.com/odoo/enterprise/assets/382893/5a7ffa96-a2d9-498f-acf3-7003c95aa789"> Odoo ignores it. After the PR: The first issue is fixed by giving priority to the "DescuentoMonto" tag. The second issue is added as an improvement. Since Odoo does not have a column to show the surcharge separated in the line, we are taking advantage of the feature that supports negative discounts in the line to put that surcharge as negative. Forward-Port-Of: odoo/enterprise#65842 Forward-Port-Of: odoo/enterprise#59532
The methods 'get_accounts' and 'get_query' were extracted from the _compute_practical_amount method for inheritance purposes. Consequently, their names were changed to more descriptive ones. Forward-Port-Of: odoo/enterprise#68846 Forward-Port-Of: odoo/enterprise#61975
Original PR description
The methods 'get_accounts' and 'get_query' were extracted from the _compute_practical_amount method for inheritance purposes. Consequently, their names were changed to more descriptive ones. Forward-Port-Of: odoo/enterprise#68846 Forward-Port-Of: odoo/enterprise#61975
Problem: The SEPA configuration fields sepa_orgid_id and sepa_orgid_issr are reset when exporting and importing a partner (company) associated with a company. Steps to Reproduce: 1. Configure a "SEPA Credit Transfer (SCT)" for a company. 2. Export the partner related to the company. 3. Re-import the partner. 4. Check the SEPA configuration of the company; it is reset. Solution: To fix this, we need to prevent the SEPA configuration from being reset when it is already set. opw-3981
Original PR description
Problem: The SEPA configuration fields sepa_orgid_id and sepa_orgid_issr are reset when exporting and importing a partner (company) associated with a company. Steps to Reproduce: 1. Configure a "SEPA Credit Transfer (SCT)" for a company. 2. Export the partner related to the company. 3. Re-import the partner. 4. Check the SEPA configuration of the company; it is reset. Solution: To fix this, we need to prevent the SEPA configuration from being reset when it is already set. opw-3981278 Forward-Port-Of: odoo/enterprise#67424
Problem: When the user enable approval rules for confirming purchase orders, the approval message was not being translated to the user's preferred languages. Purpose: Since multiple users can be notified for the approval, it was discussed that translating the message to be in the language of the first user should help with the limitation. It will solve the bug in the case only one user needs to be notified. Steps to reproduce on Runbot: 1. Install Studio and purchase 2. create a purchase
Original PR description
Problem: When the user enable approval rules for confirming purchase orders, the approval message was not being translated to the user's preferred languages. Purpose: Since multiple users can be notified for the approval, it was discussed that translating the message to be in the language of the first user should help with the limitation. It will solve the bug in the case only one user needs to be notified. Steps to reproduce on Runbot: 1. Install Studio and purchase 2. create a purchase order without confirming it 3. Go into Studio and edit the "confirm order' button on the PO 4. Add 2 approval rules - notify User A with notification order 1 - notify User B whose language is not English with notification order 2 5. Confirm the PO and observe the message is sent in English opw-3932725 Forward-Port-Of: odoo/enterprise#64060
**Current behavior:** Having a batch transfer with 2+ delivery pickings, opening the choose package wizard and filling out the package type will not accurately display the shipping weight for the whole batch. **Expected behavior:** The weight displayed on the wizard form should reflect the weight of the package plus all product that will be put inside it from the batch. **Steps to reproduce:** 1. Enable packs in settings, create a package type with a base weight of 1 unit and some produ
Original PR description
**Current behavior:** Having a batch transfer with 2+ delivery pickings, opening the choose package wizard and filling out the package type will not accurately display the shipping weight for the…
**Current behavior:** Having a batch transfer with 2+ delivery pickings, opening the choose package wizard and filling out the package type will not accurately display the shipping weight for the whole batch. **Expected behavior:** The weight displayed on the wizard form should reflect the weight of the package plus all product that will be put inside it from the batch. **Steps to reproduce:** 1. Enable packs in settings, create a package type with a base weight of 1 unit and some product with a weight of 1 unit 2. Create two delivery transfers with some carrier (e.g, local delivery) each with 1 of the created product 3. Add the two pickings to a new batch, on the batch click the `Put in Pack` button and select the created package type 4. Observe that in the form, only one of the products from the batch transfer has been used to calculate the shipping weight **Cause of the issue:** In `shipping_weight`'s compute function in the `ChooseDeliveryPackage` wizard, we don't account for a batch package (like what is done in `action_put_in_pack()` defined on this wizard). Thus, one of the move lines in the batch is not used in the weight calculation. **Fix:** Look at the context to see if the user is packing a batch and if so, get all the involved move lines from it. opw-4077546 Forward-Port-Of: odoo/odoo#177952 Forward-Port-Of: odoo/odoo#177022
Stock quants are not meant to be duplicated. This commit ensures that it is not possible to copy such records. opw-4035690 (cherry picked from commit 044210f6c7c4e539b8ebd41082c737e8bc91fd4e) --- In PR https://github.com/odoo/odoo/pull/172376 it was decided to not completely forbid quant duplication due to potential third party modules that could potentially use this feature. However, we see an increment of customer with an incorrect quantity in past history, or a discrepancy in v
Original PR description
Stock quants are not meant to be duplicated. This commit ensures that it is not possible to copy such records. opw-4035690 (cherry picked from commit 044210f6c7c4e539b8ebd41082c737e8bc91fd4e) --- In…
Stock quants are not meant to be duplicated. This commit ensures that it is not possible to copy such records. opw-4035690 (cherry picked from commit 044210f6c7c4e539b8ebd41082c737e8bc91fd4e) --- In PR https://github.com/odoo/odoo/pull/172376 it was decided to not completely forbid quant duplication due to potential third party modules that could potentially use this feature. However, we see an increment of customer with an incorrect quantity in past history, or a discrepancy in valuation and accounting because of this error. Unfortunately, it is incredibly easy to duplicate the quants by mistake, for example by miss-clicking when trying to export or update the inventory qty to 0 ...  Hence, even if it breaks some third party modules, it is imperative to prevent further quants duplication. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177796 Forward-Port-Of: odoo/odoo#177584
Changed the note on the attached_on field to properly note that the Inside quote option will include the document on the pdf of the quotation and sale order instead of just the quotation. Previously only said that it would be on the quote and caused confusion for customers when it would also show on the sale order. opw-4106894 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177681
Original PR description
Changed the note on the attached_on field to properly note that the Inside quote option will include the document on the pdf of the quotation and sale order instead of just the quotation. Previously only said that it would be on the quote and caused confusion for customers when it would also show on the sale order. opw-4106894 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177681
Added start/stop/restart aliases to the IoT image to simplify the use of systemctl commands. Forward-Port-Of: odoo/odoo#177874
Original PR description
Added start/stop/restart aliases to the IoT image to simplify the use of systemctl commands. Forward-Port-Of: odoo/odoo#177874
**Description of the issue/feature this PR addresses:** There is a bug with traceback on accounting dashboard when is clicked "Checks to print" on bank journal with more than one outgoing payment with "Checks" Payment Method. **Steps to reproduce:** 1) With a database in v16 onwards, install the account_check_printing module. 2) Go to "Accounting / Configuration / Accounting / Journals" and create a new journal bank with more than one outgoing payment with "Checks" Payment Method. 3
Original PR description
**Description of the issue/feature this PR addresses:** There is a bug with traceback on accounting dashboard when is clicked "Checks to print" on bank journal with more than one outgoing payment…
**Description of the issue/feature this PR addresses:** There is a bug with traceback on accounting dashboard when is clicked "Checks to print" on bank journal with more than one outgoing payment with "Checks" Payment Method. **Steps to reproduce:** 1) With a database in v16 onwards, install the account_check_printing module. 2) Go to "Accounting / Configuration / Accounting / Journals" and create a new journal bank with more than one outgoing payment with "Checks" Payment Method. 3) Go to "Accounting / Vendor / Payments" and create a new payment with journal created on step 1 and "Checks" payment method and confirm. 4) Go to "Accounting" and on "Accounting dashboard" click on "Check to print" on Journal created on step 1 and then a bug with traceback is raised. **Current behavior before PR:** There is a bug with traceback on accounting dashboard when is clicked "Checks to print" on bank journal with more than one outgoing payment with "Checks" Payment Method. **Desired behavior after PR is merged:** There is not a bug with traceback on accounting dashboard when is clicked "Checks to print" on bank journal with more than one outgoing payment with "Checks" Payment Method. **Video/Screenshot link:** https://drive.google.com/file/d/1r6A3uMkFv2nIDZ1HYJLgj6e18pNH1P67/view Ticket Adhoc side: 75606 Task latam: 1217 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168383
To reproduce the bug, follow these steps: 1. Create a new time off type. 2. Create a new accrual plan. 3. Set the "Accrued Gain Time" field to “At the start of the accrual period.” 4. Create a new milestone with a cap. 5. Create a new allocation set its type to accrual then link it to our accrual plan. 6. Set the start date in the past so that the accrued days reach the cap. 7. Create a new leave in the past related to the allocation. 8. Check your balance for a future date in the Time
Original PR description
To reproduce the bug, follow these steps: 1. Create a new time off type. 2. Create a new accrual plan. 3. Set the "Accrued Gain Time" field to “At the start of the accrual period.” 4. Create a new…
To reproduce the bug, follow these steps: 1. Create a new time off type. 2. Create a new accrual plan. 3. Set the "Accrued Gain Time" field to “At the start of the accrual period.” 4. Create a new milestone with a cap. 5. Create a new allocation set its type to accrual then link it to our accrual plan. 6. Set the start date in the past so that the accrued days reach the cap. 7. Create a new leave in the past related to the allocation. 8. Check your balance for a future date in the Time Off app. Normally, with accrual allocation, we should see the allocation increase. The problem here is that in the future, the allocation decreases. This issue arises due to the way the `leaves_taken` field is computed. https://github.com/odoo/odoo/blob/08a4b9d78addeefde24b189f0066540e0dcee4c4/addons/hr_holidays/models/hr_leave_allocation.py#L215-L220 The value is retrieved from a default dictionary, which is processed based on existing records in the database. When we attempt to fetch the value using a new instance that only exists in memory, the key returns the default value of 0. Additionally, if we modify step 7 to set the leave in the future, the accrual value caps out at a level below the intended maximum. In some cases, if the data-fetching function is called with the same parameters consecutively, we receive different outputs. These issues arise because the new record persists as a cache. When we retrieve a new record with the same origin as a previous call, we receive the previously processed data. This also leads to a problem with recursion in the function `_get_future_leaves_on`. This commit addresses and resolves these issues. opw-4040882 Forward-Port-Of: odoo/odoo#174354
Since the rule refactor, additional byproducts are not considered in the post production picking. The problem is when we add a new byproduct, the backend do not add the warehouse_id on the stock move, and without a warehouse id, it was impossible to find a stock rule for it. Now, with the correct warehouse and stock rule, the stock move is added on the transfers. Testing steps: --------------------- - go to configuration > settings > enable Multi-step routes - go to configuration > wareho
Original PR description
Since the rule refactor, additional byproducts are not considered in the post production picking. The problem is when we add a new byproduct, the backend do not add the warehouse_id on the stock…
Since the rule refactor, additional byproducts are not considered in the post production picking. The problem is when we add a new byproduct, the backend do not add the warehouse_id on the stock move, and without a warehouse id, it was impossible to find a stock rule for it. Now, with the correct warehouse and stock rule, the stock move is added on the transfers. Testing steps: --------------------- - go to configuration > settings > enable Multi-step routes - go to configuration > warehouses and enable either 2 or 3 step manufacture - go to configuration > enable byproducts - create a BOM with some components/byproducts - create a MO with the BOM above, confirm it. Now, we can see the 'transfers' button with 2 transfers, one by the components and another one for the final products and the byproducts. - add a new byproduct with some produced quantity. Problem: ------------- No picking for the new byproduct when clicking on the transfer button Expected behaviour: ------------------------------ The byproduct should be in the list task: 3982566 Forward-Port-Of: odoo/odoo#170280
During refactoring of hr_holidays for 17.0 (commit https://github.com/odoo/odoo/commit/8f87e102a95412aa7dd1b0ce07365d9d3bbdba6a) a typo was introduced. Forward-Port-Of: odoo/odoo#177563
Original PR description
During refactoring of hr_holidays for 17.0 (commit https://github.com/odoo/odoo/commit/8f87e102a95412aa7dd1b0ce07365d9d3bbdba6a) a typo was introduced. Forward-Port-Of: odoo/odoo#177563
Previously the code setting the default taxes on product was called only if the database was in demo, which makes zero sense. Without demo data, creating a new company and assigning it its accounting package was not configuring correctly the existing products with the default taxes. ticket 4037904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173803
Original PR description
Previously the code setting the default taxes on product was called only if the database was in demo, which makes zero sense. Without demo data, creating a new company and assigning it its accounting package was not configuring correctly the existing products with the default taxes. ticket 4037904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173803
Do a modification of the picking type reservation method will not remove the reservation date on stock.move. It could create issue on the reservation or the forecast report where the reservation date is used without doing a check on the picking type reservation method. Clean the data when we update the reservation method 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 an
Original PR description
Do a modification of the picking type reservation method will not remove the reservation date on stock.move. It could create issue on the reservation or the forecast report where the reservation date is used without doing a check on the picking type reservation method. Clean the data when we update the reservation method 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#170443 Forward-Port-Of: odoo/odoo#170341
Before this commit, recurrent events created with the 'All Day' option were duplicating the first event of the recurrence in Google side. This was happening because we wrongly synchronized the single event with Google before the synchronization of its recurrence (which already synchronize the events in Google side itself). After this commit, the recurrence is created normally using the 'All Day' option. We achieve that by skipping the useless synchronization we were doing in the single event:
Original PR description
Before this commit, recurrent events created with the 'All Day' option were duplicating the first event of the recurrence in Google side. This was happening because we wrongly synchronized the single event with Google before the synchronization of its recurrence (which already synchronize the events in Google side itself). After this commit, the recurrence is created normally using the 'All Day' option. We achieve that by skipping the useless synchronization we were doing in the single event: only the recurrence must be synchronized in this specific flow. task-3768121 Forward-Port-Of: odoo/odoo#177073 Forward-Port-Of: odoo/odoo#166885
- Have an one2may or a many2many on a setting (with some data in them); - Edit/toggle any setting; - Click on an action button or navigate to another view; - On the "Unsaved changes" dialog, select "Discard". Before this commit, the `discard` function of the relational model, didn't take into account the initial commands, and replace the x2many with an empty list of commands. The issue is that the settings need to be saved (after discarding the changes) when leaving, throws an action's
Original PR description
- Have an one2may or a many2many on a setting (with some data in them); - Edit/toggle any setting; - Click on an action button or navigate to another view; - On the "Unsaved changes" dialog, select…
- Have an one2may or a many2many on a setting (with some data in them); - Edit/toggle any setting; - Click on an action button or navigate to another view; - On the "Unsaved changes" dialog, select "Discard". Before this commit, the `discard` function of the relational model, didn't take into account the initial commands, and replace the x2many with an empty list of commands. The issue is that the settings need to be saved (after discarding the changes) when leaving, throws an action's button. This is done, to create a res_id, that is most of the time mandatory to perform the action (see [1]) So if the `discard` function, empty the x2many, the setting will be modified, and the x2many will be emptied. Now, the `discard` function of the relational model take into account the x2many initial commands, therefore the x2many setting will stay unchanged. [1] : https://github.com/odoo/odoo/commit/9b81ddb993e4d56aba5aae637d160522d3af1d30 opw-4050990 opw-4092267 opw-4100926 Co-authored-by: Aaron Bohy <aab@odoo.com> Forward-Port-Of: odoo/odoo#178039 Forward-Port-Of: odoo/odoo#177883