Daily updates from Odoo
Friday, November 22, 2024
36 changes · master
Enhancements to existing features
Bulk changes to helpdesk tickets and field service tasks now reuse sales order line lookups instead of repeating the same search for each record. This reduces processing time and database load when many records share the same customer or team, making large updates noticeably faster.
Original PR description
Steps to reproduce: ------------------- 1. Install Project, Timesheets, Helpdesk and Sales apps 2. Create many tickets (e.g. 5k) associated with the same helpdesk team 3. Change the project linked to…
Steps to reproduce:
-------------------
1. Install Project, Timesheets, Helpdesk and Sales apps
2. Create many tickets (e.g. 5k) associated with the same helpdesk team
3. Change the project linked to the helpdesk team
4. It should update the SOL of all tickets linked to that team
Other way to reproduce:
1. Install Project, Timesheets, Helpdesk and Sales apps
2. Create many tickets
3. Go to the list view of tickets
4. Update the customer in all those tickets
Fix:
-------------------
The idea is to batch the RPC (search) made by the method "_get_last_sol_of_customer()". Avoiding to do an RPC for each ticket, we can now re-use the computed SOLs as we store them in a dictionary. It particularly improve performance if we compute the sale_line_id of many tickets having similar commercial partners.
Benchmark:
-------------------
- Usecase: Create 5k tickets associated with an helpdesk team, change the project linked to the helpdesk team, it should update the SOL of all those tickets.
- Parameters: In local, run with "--limit-memory-soft=8589934592", "--limit-memory-hard=8589934592".
- Results:
Without optimization: 34 seconds, 30 665 queries
With optimization: 22 seconds, 15 397 queries
related-https://github.com/odoo/odoo/pull/185132
task-4255293Referral rewards are easier to browse and manage: reward cards now show the award image, the reward list includes the Gift Responsible, and the buying message is clearer. These updates help HR teams and employees better understand reward options and ownership at a glance.
Original PR description
1. Show the image of the award in kanban view. 2. Add `Gift Responsible` to reward list view. 3. Update the reward buying message. task-4296804
Users can now duplicate approval requests directly from the form and list view menu. This makes it faster to create similar requests and reduces repetitive manual entry.
Original PR description
This PR improves the approval request form and list view by adding a `Duplicate` option to the menu. task-3685226
Lithuanian payroll rules now calculate taxable and sick-pay amounts directly inside the relevant salary rules instead of relying on a hidden payslip method. This makes payroll calculations easier to review, maintain, and validate without changing the intended business outcome.
Original PR description
Problem ---------- The method "payslip._get_l10n_lt_taxable_amount" is used in salary rules that makes the computation non-transparent. Objective ---------- Put this method in the python code field of salary rules directly Solution ---------- Done, with the sick argument removed. task-4134314
Helpdesk tickets submitted through the website no longer show the automatic “external submission” text as if it were a message from a private user. The information is still kept as an internal note and in the ticket description, reducing confusion for support teams.
Original PR description
[IMP] website_helpdesk: remove 'external submission' from messages Before this commit: - When submitting a ticket through the web form, 'external submission' is displayed as a message from 'private user' and as a note. But, the private user haven't really send any message. After this commit: - Keep the information only as a note and in the description. task-4216270
Web Studio's automated tests were updated to use a newer testing approach, replacing older test utilities. This is an internal quality improvement that helps maintain reliability without changing day-to-day user features.
Original PR description
This commit aims to convert QUnit tests to hoot that rely on legacy mail tests utils and legacy bus tests utils. Part of task-3818666
Users can now create and edit Brazil Avatax operation types in Odoo, matching custom setup options available in the Avatax portal. This helps businesses keep their Odoo tax configuration aligned with customer-specific Avatax settings.
Original PR description
We include the default ones Avatax has in their portal. But customers can create custom operation types on the Avatax side and so need to do similar on our side as well. task-4288101
Studio now includes an Actions tab where users can quickly view and create automated server actions for a model. Newly created actions are automatically added to the model's contextual menu, making common workflow automation easier to set up and use.
Original PR description
This commit adds a studio Tab to quickly access and create ir.actions.server objects. Upon creation, created actions are automatically added to the model's contextual menu. task-4268990
Resolved issues and error corrections
Recruitment report pivot tables now open the correct list of applicants when a user clicks a specific cell. This helps hiring teams review the relevant candidates faster and avoids confusion from seeing unrelated applicants.
Original PR description
The drill down, ie. clicking on a cell, in the recruitment report pivot views was not working as intended. When a cell was clicked it would show all applicants, rather than the relevant applicants to this cell. This PR fixes that, by making sure relevant data is fetched. Task-4247486
Long project names no longer overflow on timesheet Kanban cards. This keeps the timesheet view tidy and easier to read, reducing layout issues for users managing projects.
Original PR description
Before: The project name was overflowing in the Kanban card, causing layout issues. After: The project name now displays correctly within the Kanban card. Fix: Adjusted CSS classes to the Kanban card to properly handle long project names. Task:4198771
Features or functions removed from Odoo
This change removes unused code from the ISO 20022 accounting payment flow. Partners without bank accounts are already handled elsewhere by being skipped with a warning, so this cleanup reduces maintenance without changing the user experience.
Original PR description
This exception was never triggered anymore, the partners without bank accounts are now skipped, and a warning is displayed in the register payment wizard: https://github.com/odoo/odoo/blob/18.0/addons/account/wizard/account_payment_register_views.xml#L48
Miscellaneous changes
… other country's invoices Forward-Port-Of: odoo/enterprise#74053 Forward-Port-Of: odoo/enterprise#74020
Original PR description
… other country's invoices Forward-Port-Of: odoo/enterprise#74053 Forward-Port-Of: odoo/enterprise#74020
Manual fw-port of translations since they're not on transifex for saas versions. To do this properly, the following was also done: - re-export pot files - fill in translations for new terms added in this version - remove leftover translation files from localizations they didn't make sense for - fixed typo in `l10n_be_social_balance_sheet` Note that within saas-17.4: `l10n_ch_hr_payroll_elm` was merged into `l10n_ch_hr_payroll`. Therefore the translations needed to be manually ported over
Original PR description
Manual fw-port of translations since they're not on transifex for saas versions. To do this properly, the following was also done: - re-export pot files - fill in translations for new terms added in this version - remove leftover translation files from localizations they didn't make sense for - fixed typo in `l10n_be_social_balance_sheet` Note that within saas-17.4: `l10n_ch_hr_payroll_elm` was merged into `l10n_ch_hr_payroll`. Therefore the translations needed to be manually ported over from the previous version's module into the new merged po file. Because translations for IT and DE don't appear to be completed for 17.0's localzations on transifex, these translations were not ported over as it's a very painful manual job cross checking the po files of the former version. Forward-Port-Of: odoo/enterprise#74129 Forward-Port-Of: odoo/enterprise#74111
…or the general ledger In a previous pull request: https://github.com/odoo/enterprise/pull/46498, the columns date was switched to invoice date. We want to revert back to the state before this commit. So using the accounting_date instead of the invoice_date on the general ledger. task-4270453 Forward-Port-Of: odoo/enterprise#73862 Forward-Port-Of: odoo/enterprise#72673
Original PR description
…or the general ledger In a previous pull request: https://github.com/odoo/enterprise/pull/46498, the columns date was switched to invoice date. We want to revert back to the state before this commit. So using the accounting_date instead of the invoice_date on the general ledger. task-4270453 Forward-Port-Of: odoo/enterprise#73862 Forward-Port-Of: odoo/enterprise#72673
Before This Commit: - The `open_gst_return_period_form_view` method manually set context values for `active_id` and `active_model` instead of relying on the active context. - In `action_get_irn_data`, the logic directly accessed the configurations without using `sudo`, resulting in access errors in certain cases. After This Commit: - The `open_gst_return_period_form_view` method now uses the active context instead of manually setting context values. - The `action_get_irn_data` method h
Original PR description
Before This Commit: - The `open_gst_return_period_form_view` method manually set context values for `active_id` and `active_model` instead of relying on the active context. - In `action_get_irn_data`, the logic directly accessed the configurations without using `sudo`, resulting in access errors in certain cases. After This Commit: - The `open_gst_return_period_form_view` method now uses the active context instead of manually setting context values. - The `action_get_irn_data` method has been updated to use `sudo` when checking `l10n_edi_production_env`, ensuring proper access rights and preventing permission issues. Forward-Port-Of: odoo/enterprise#74146
Since https://github.com/odoo/enterprise/commit/84cc09959d82dbceb4fe673b85464ef3d8630606 the cancellation no longer works with the PAC SW opw-4349251 Forward-Port-Of: odoo/enterprise#74343
Original PR description
Since https://github.com/odoo/enterprise/commit/84cc09959d82dbceb4fe673b85464ef3d8630606 the cancellation no longer works with the PAC SW opw-4349251 Forward-Port-Of: odoo/enterprise#74343
### After this PR You can add new column to the account partner ledger Example: ``` def _get_additional_column_aml_query_values(self): res = super()._get_additional_column_aml_query_values() res +="account_move_line.date as date," return res ``` Forward-Port-Of: odoo/enterprise#74322 Forward-Port-Of: odoo/enterprise#74075
Original PR description
### After this PR
You can add new column to the account partner ledger
Example:
```
def _get_additional_column_aml_query_values(self):
res = super()._get_additional_column_aml_query_values()
res +="account_move_line.date as date,"
return res
```
Forward-Port-Of: odoo/enterprise#74322
Forward-Port-Of: odoo/enterprise#74075Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app > New > Enable 'Billable' in the project's settings - New Task > Set any Customer - Sales Order Item > Search More > New > Add product then save - Click 'Sales Order' button Coupled with https://github.com/odoo/odoo/pull/183586 You'll see in the chatter that the confirmation email is se
Original PR description
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app…
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app > New > Enable 'Billable' in the project's settings - New Task > Set any Customer - Sales Order Item > Search More > New > Add product then save - Click 'Sales Order' button Coupled with https://github.com/odoo/odoo/pull/183586 You'll see in the chatter that the confirmation email is sent before the product is added to the sales order, resulting in a $0 quotation document being sent to the customer. This happens because we confirm the SO at the same time as we create it (After pressing the New button). Instead we would rather confirm the SO on save, after the order line creation. The SO confirmation is necessary because we don't want people to work on tasks/projects that are still in quotation since they could hypothetically still be cancelled. opw-4190402 Forward-Port-Of: odoo/enterprise#74289 Forward-Port-Of: odoo/enterprise#73492
Forward-Port-Of: odoo/enterprise#74152
Original PR description
Forward-Port-Of: odoo/enterprise#74152
Since odoo/enterprise@4f162e7e1ea, the `voip.mode` ICP has been replaced by `voip.provider`'s mode. This commit update the neutralization script accordingly. Forward-Port-Of: odoo/enterprise#74035
Original PR description
Since odoo/enterprise@4f162e7e1ea, the `voip.mode` ICP has been replaced by `voip.provider`'s mode. This commit update the neutralization script accordingly. Forward-Port-Of: odoo/enterprise#74035
Purpose ======= Fix the view scrollbar which isn't restored when the file preview is closed. Specifications ============== When a file is previewed, the view scrollbar is hidden so that scrolling actions don't impact the view behind the file preview. However when the preview is closed, the scrollbar isn't restored. => Calling the documentList onDeleteCallback method to correctly restore the view and the scrollbar when closing the preview. Task-4296803 Forward-Port-Of: odoo/enterpr
Original PR description
Purpose ======= Fix the view scrollbar which isn't restored when the file preview is closed. Specifications ============== When a file is previewed, the view scrollbar is hidden so that scrolling actions don't impact the view behind the file preview. However when the preview is closed, the scrollbar isn't restored. => Calling the documentList onDeleteCallback method to correctly restore the view and the scrollbar when closing the preview. Task-4296803 Forward-Port-Of: odoo/enterprise#73452
During the es_XX.po cleaning, the po file for l10n_co_reports was incorrectly not converted to es_419.po and only deleted. We now restore it + correctly rename it to es_419.po As part of this cleaning, the pot file has been re-exported and the po re-synced with it. Missing translations were also added it. A sentence that was obviously incorrect in the original Spanish was also translated to a correct sentence. opw-4336377 PR that deleted the original es_CO.po file: https://github.com/od
Original PR description
During the es_XX.po cleaning, the po file for l10n_co_reports was incorrectly not converted to es_419.po and only deleted. We now restore it + correctly rename it to es_419.po As part of this cleaning, the pot file has been re-exported and the po re-synced with it. Missing translations were also added it. A sentence that was obviously incorrect in the original Spanish was also translated to a correct sentence. opw-4336377 PR that deleted the original es_CO.po file: https://github.com/odoo/enterprise/pull/66317 Forward-Port-Of: odoo/enterprise#74333 Forward-Port-Of: odoo/enterprise#74248
We need to be able to invoice free items. How it works in Peru is that the item is "sold" with the original price. Still, we should be able to mark the transaction as a free transaction (this is done with the field l10n_pe_edi_legend that is in the Peru EDI tab). This tag should change the XML to the correct format for a free transaction. An enhancement is introduced to exclude the 'l10n_pe.tax_group_dummy' tax group from tax details processing. This improvement is aimed at facilitating free
Original PR description
We need to be able to invoice free items. How it works in Peru is that the item is "sold" with the original price. Still, we should be able to mark the transaction as a free transaction (this is done…
We need to be able to invoice free items. How it works in Peru is that the item is "sold" with the original price. Still, we should be able to mark the transaction as a free transaction (this is done with the field l10n_pe_edi_legend that is in the Peru EDI tab). This tag should change the XML to the correct format for a free transaction. An enhancement is introduced to exclude the 'l10n_pe.tax_group_dummy' tax group from tax details processing. This improvement is aimed at facilitating free billing in Peru by ensuring dummy tax groups are not included in tax calculations. task latam: https://latam-localizations.odoo.com/web#id=974&menu_id=88&cids=1&action=188&model=project.task&view_type=form Legal Reference: https://cpe.sunat.gob.pe/sites/default/files/inline-files/guia%2Bxml%2Bfactura%2Bversion%202-1%2B1%2B0%20%282%29_0.pdf (page 97) https://booksdigital.jimdofree.com/2014/10/15/tratamiento-contable-de-la-entrega-de-obsequios-vales-y-celebraciones-a-favor-de-los-trabajadores/ Related: https://github.com/odoo/odoo/pull/174131 Forward-Port-Of: odoo/enterprise#74130 Forward-Port-Of: odoo/enterprise#56767
This Refactor aims to make the work entry export more readable and easier to maintain by defining explicit classes for each work entry data structure with explicit way to use them defined by their respective classes task-4244397 Forward-Port-Of: odoo/enterprise#73649
Original PR description
This Refactor aims to make the work entry export more readable and easier to maintain by defining explicit classes for each work entry data structure with explicit way to use them defined by their respective classes task-4244397 Forward-Port-Of: odoo/enterprise#73649
**Steps to reproduce the bug:** - Create a tracked product by SN: “P1.” - Create a storable product: "P2." - Create a receipt for one unit of P1 and P2. - Mark it as "To Do." - Set the done quantity of P1 to 0. - Attempt to perform the quality check. **Problem:** You must perform a quality check for P1 even though it has yet to be received. Since the move_line is set to 0 rather than deleted in the original picking, it will be linked to the backorder when it is created. Therefore,
Original PR description
**Steps to reproduce the bug:** - Create a tracked product by SN: “P1.” - Create a storable product: "P2." - Create a receipt for one unit of P1 and P2. - Mark it as "To Do." - Set the done quantity of P1 to 0. - Attempt to perform the quality check. **Problem:** You must perform a quality check for P1 even though it has yet to be received. Since the move_line is set to 0 rather than deleted in the original picking, it will be linked to the backorder when it is created. Therefore, to avoid unexpected behavior we can ignore linking its quality check to the backorder. https://github.com/odoo/odoo/blob/00057f8efd3c728e13a981290a725878e058d2c6/addons/stock/models/stock_picking.py#L832 opw-4187521 Forward-Port-Of: odoo/enterprise#74172 Forward-Port-Of: odoo/enterprise#73407
When extracting data from a ticket expressed in a currency that's inactive in the company, the code crashed with a KeyError, because the 'currency_id' was not in the vals dictionary. This crashed some tests in hr_expense_extract when they were run in a db with only USD as active company. Forward-Port-Of: odoo/enterprise#74207 Forward-Port-Of: odoo/enterprise#72941
Original PR description
When extracting data from a ticket expressed in a currency that's inactive in the company, the code crashed with a KeyError, because the 'currency_id' was not in the vals dictionary. This crashed some tests in hr_expense_extract when they were run in a db with only USD as active company. Forward-Port-Of: odoo/enterprise#74207 Forward-Port-Of: odoo/enterprise#72941
This commit drastically reduces the spreadsheet thumbnails size. Go to CRM lead and insert the pivot in a spreadsheet: The size of the thumbnail: | Description | Size | |-----------------------|--------| | Before | 107Kb | | After quality=0.5 | 7.8Kb | | After quality=0 | 2.9Kb | Image quality is indeed reduced, but the thumbnails are always displayed so small that it doesn't really make any difference to the naked eye. Note: I'm not back
Original PR description
This commit drastically reduces the spreadsheet thumbnails size. Go to CRM lead and insert the pivot in a spreadsheet: The size of the thumbnail: | Description | Size | |-----------------------|--------| | Before | 107Kb | | After quality=0.5 | 7.8Kb | | After quality=0 | 2.9Kb | Image quality is indeed reduced, but the thumbnails are always displayed so small that it doesn't really make any difference to the naked eye. Note: I'm not backporting this fix to 16.0 because the code changed and webp was not supported at the time (even though we could use jpeg) Task: 4337496 Forward-Port-Of: odoo/enterprise#74295 Forward-Port-Of: odoo/enterprise#73881
The followup status of the partner is added to the partner form view with an additional link to see the list of overdue invoices for the partner. task-4320967 Forward-Port-Of: odoo/enterprise#74246
Original PR description
The followup status of the partner is added to the partner form view with an additional link to see the list of overdue invoices for the partner. task-4320967 Forward-Port-Of: odoo/enterprise#74246
Introduced in https://github.com/odoo/enterprise/pull/73469 I made a mistake when checking module dependencies, `work_entry_source` attendance is not available in `hr_payroll`, the attendance module is separate. This move is needed to fix errors in runbot. opw-4266880 Forward-Port-Of: odoo/enterprise#74251
Original PR description
Introduced in https://github.com/odoo/enterprise/pull/73469 I made a mistake when checking module dependencies, `work_entry_source` attendance is not available in `hr_payroll`, the attendance module is separate. This move is needed to fix errors in runbot. opw-4266880 Forward-Port-Of: odoo/enterprise#74251
Task id 4244702 Forward-Port-Of: odoo/enterprise#74287
Original PR description
Task id 4244702 Forward-Port-Of: odoo/enterprise#74287
Before this commit, attempting to print a bill early would result in an error because the account_move did not exist. opw-4336405 Forward-Port-Of: odoo/enterprise#73913
Original PR description
Before this commit, attempting to print a bill early would result in an error because the account_move did not exist. opw-4336405 Forward-Port-Of: odoo/enterprise#73913
**Issue:** Documents tags are impossible to remove. **Expected:** Documents tags removal allowed. **Steps to reproduce:** - Activate and navigate to the documents app; - Click on Configuration > Structure > Tags; - Attempting to delete a tag causes an error message. **Cause:** `external_ids` is a JSON object that can't be used in `search_count`, that method waiting for a list in that situation. **Fix:** Retrieve `external_ids` keys as a list. opw-4293294 Forward-Port-Of: o
Original PR description
**Issue:** Documents tags are impossible to remove. **Expected:** Documents tags removal allowed. **Steps to reproduce:** - Activate and navigate to the documents app; - Click on Configuration > Structure > Tags; - Attempting to delete a tag causes an error message. **Cause:** `external_ids` is a JSON object that can't be used in `search_count`, that method waiting for a list in that situation. **Fix:** Retrieve `external_ids` keys as a list. opw-4293294 Forward-Port-Of: odoo/enterprise#73476
Steps: add a rental product in cart in ecommerce go to cart and update the rental dates on datepicker Issue: The new dates are not applied to cart lines Cause: rental dates on cart line come from order_line name order_line name is not updated on change of rental dates Fix: Updated _cart_update_renting_period to update order_line name for rental lines opw-4137981 opw-4124061 opw-4191403 Forward-Port-Of: odoo/enterprise#74077 Forward-Port-Of: odoo/enter
Original PR description
Steps:
add a rental product in cart in ecommerce
go to cart and update the rental dates on datepicker
Issue:
The new dates are not applied to cart lines
Cause:
rental dates on cart line come from order_line name
order_line name is not updated on change of rental dates
Fix:
Updated _cart_update_renting_period to update order_line name for rental lines
opw-4137981
opw-4124061
opw-4191403
Forward-Port-Of: odoo/enterprise#74077
Forward-Port-Of: odoo/enterprise#70397**Steps to reproduce:** - Install Accounting and Point of Sale - Open a "Point of Sale" session - Create a POS order and pay it by bank - Create another POS order and pay it by Customer Account - Close POS session - Go to Accounting - Open Bank journal - Create a statement line and reconcile it with the POS payment - Go to "Accounting / Reporting / Audit Reports / General Ledger" - Check the amount of the POS orders in the following journals: * [101300] Account Receivable (PoS) *
Original PR description
**Steps to reproduce:** - Install Accounting and Point of Sale - Open a "Point of Sale" session - Create a POS order and pay it by bank - Create another POS order and pay it by Customer Account -…
**Steps to reproduce:** - Install Accounting and Point of Sale - Open a "Point of Sale" session - Create a POS order and pay it by bank - Create another POS order and pay it by Customer Account - Close POS session - Go to Accounting - Open Bank journal - Create a statement line and reconcile it with the POS payment - Go to "Accounting / Reporting / Audit Reports / General Ledger" - Check the amount of the POS orders in the following journals: * [101300] Account Receivable (PoS) * [121000] Account Receivable * [400000] Product Sales - Check "Cash Basis Method" in the options - Check again the amount of the POS orders in the same journals **Issue 1:** The amount for "[121000] Account Receivable" is present but it shouldn't because no payment has been done for it yet. **Extra steps:** - Create another statement line and reconcile it with the POS customer account payment - Check again the amount of the POS orders in the same journals **Issue 2:** The amount of the POS orders is double the original amount. **Issue 3:** If a partial payment is made for one line, the report has incorrect values. **Cause:** To retrieve the cash basis lines, a complex SQL query is executed. Let's take the following entries: - Invoice: | account | debit | credit | | ----------- | -------- | -------- | | Account Receivable 1 | 100 | 0 | | Account Receivable 2 | 200 | 0 | | Product Sales | 0 | 300 | - Payments: | account | debit | credit | | ---------------- | ------------ | ----------- | | Bank | 50 | 0 | | Account Receivable 1 | 0 | 50 | | account | debit | credit | | ------------ | ---------------- | ----------- | | Bank | 200 | 0 | | Account Receivable 2 | 0 | 200| A SELECT is executed to compute and get the percentage of the paid amount of each receivable/payable account by move, generating a temporary "table" as followed: | move_id | matched_percentage| | ------------------|---------------------------------| | 1 | 0.5 (50% paid for Account Receivable 1)| | 1 | 1.0 (100% paid for Account Receivable 2)| This table is then joined to account_move_line table on move_id where matched_percentage is applied to the amounts. Issues 1 and 2 are due to the fact that it was assumed that each account move would only contain 1 receivable/payable account, which is not the case here. As account_id is not present in the temporary table, it is not possible to identify to which account a line of that table refers to. As there is only a JOIN ON move_id when joining with account_move_line table, each aml from a move is taken into account even when it shouldn't. In this example, they are taken into account twice because the 2 entries have the same move_id. Issue 3 is coming from the fact that the WHOLE amount of "Product Sales" is computed with matched_percentage each time. For example, these 2 lines are computed from the tempory table for "Product Sales": * Product Sales = 300 * 0.5 = 150 (for Account Receivable 1) * Product Sales = 300 * 1.0 = 300 (for Account Receivable 2) The amount for "Product Sales" sums to 450, which is not correct. It should be 250. **Solution for issues 1 and 2:** Get account_id and join account_move_line table on it. An exception should be done for "Product Sales" when joining account_move_line table because it is not a receivable/payable account and the temporay table only contains receivable/payable accounts. **Solution for issue 3:** Compute a ratio for "Product Sales" for each receivable account. Its amount is 100 for "Account Receivable 1" and 200 for "Account Receivable 2" So its ratio should be: * 100 / 300 = 0.33 (for Account Receivable 1) * 100 / 300 = 0.66 (for Account Receivable 2) By applying this ratio, the correct amounts are computed for "Product Sales": * Product Sales = 300 * 0.5 * 0.33 = 50 (for Account Receivable 1) * Product Sales = 300 * 1.0 * 0.66 = 200 (for Account Receivable 2) opw-4224136 Forward-Port-Of: odoo/enterprise#74237 Forward-Port-Of: odoo/enterprise#73593
Following 81dce8461c7, when only some of the invoice lines have subscription start/end date, the commission generation crash when computing the maximum end date or minimal start start: ``` TypeError: '>' not supported between instances of 'bool' and 'datetime.date' ``` This commit ensure we only try to max/min non-falsy values. Forward-Port-Of: odoo/enterprise#74112
Original PR description
Following 81dce8461c7, when only some of the invoice lines have subscription start/end date, the commission generation crash when computing the maximum end date or minimal start start: ``` TypeError: '>' not supported between instances of 'bool' and 'datetime.date' ``` This commit ensure we only try to max/min non-falsy values. Forward-Port-Of: odoo/enterprise#74112
The issue: When uploading and signing a document, then uninstalling the Sign module, the following error message appears: `Missing Record Record does not exist or has been deleted. (Record: documents.document(42,), User: 2)` How to reproduce the issue: - Install Sign and Documents modules - Upload a PDF document and click on sign - Go to Apps and uninstall Sign When signing a document from `documents.document`, its `res_model` is set to `sign.template`, and a `mail.activity` is cre
Original PR description
The issue: When uploading and signing a document, then uninstalling the Sign module, the following error message appears: `Missing Record Record does not exist or has been deleted. (Record: documents.document(42,), User: 2)` How to reproduce the issue: - Install Sign and Documents modules - Upload a PDF document and click on sign - Go to Apps and uninstall Sign When signing a document from `documents.document`, its `res_model` is set to `sign.template`, and a `mail.activity` is created for validation. On uninstalling Sign, all records with `res_model = 'sign.template'` are removed, but not in `mail.activity`. This happens because deletion occurs via cascade (`sign.template` -> `attachment.id` -> `documents.document`), meaning that`unlink` from `documents.document`is not called. opw-4283568 Forward-Port-Of: odoo/enterprise#73115