Tuesday, March 28, 2023
16 changes · master
New functionality added to Odoo
This draft change replaces the old notes-based todo item storage with project tasks, aligning todo work with the broader task management flow. It also touches payroll-related integration work, but the pull request is marked temporary pending another HR merge.
Original PR description
Temporary commit to be removed when PR from hr has been merged
Enhancements to existing features
Odoo now stops Peruvian electronic invoicing immediately when a required national bank account is missing. This helps businesses fix setup issues before documents are sent, reducing government rejections and delays.
Original PR description
The aim of this commit is to improve the reliability by throwing the error not found directly instead of waiting for the government to tell the customer Odoo didn't make the job correctly. Before this commit: If the national bank account isn't present the edi system continues its jobs and doesn't fill the PayeeFinancialAccount node in the xml. We expect then the customer to find out there is something wrong with it by having the governement. After this commit: Odoo directly throws an error. task-id: None ________ Edit: The message of the following commit: https://github.com/odoo/enterprise/commit/277eed47ba7e3e41a164b313989da5af22aeb8dc is the reason for which I originally made this PR.
Resolved issues and error corrections
This update corrects how the Amazon and eBay sales connectors declare their required marketplace components. It helps keep module installation and maintenance cleaner without changing day-to-day marketplace workflows.
Original PR description
Marketplaces rely on `stock` and `delivery`, and module bridge `stock_delivery` is sufficient, no need to explicitly add `stock`.
Code cleanup and technical improvements
Spreadsheet screens were reorganized so key spreadsheet information is available higher up in the page structure. This prepares the product for a future share button in the control panel while keeping current behavior largely unchanged.
Original PR description
For the sharing task (3045808), a share button will be added to the control panel. That means it will need to have the model. Currently, it's instanciated deep in `<SpreadsheetComponent>` and therefore not available to the action component. This commit moves the model creation up to the action component. It also moves lots of other stuff from `<SpreadsheetComponent>` to the action component which were implemented by passing props callbacks to `<SpreadsheetComponent>`, basically just to be called without anything specific from `<SpreadsheetComponent>`. Moving everything up in the action is just much simpler.
Miscellaneous changes
Activate avatax. Create a contact [1], and validate it with avatax. Create a product A, priced 11.70, add avatax code [P0000000] Create a product B, priced 9.85, add avatax code [FR000000] Create an invoice, add the two products, set avatax fiscal position Compute taxes with avalara, taxes will be 0.73 Confirm invoice Taxes will update to 1.35. This occurs during `_post`: when invoice date is set, invoice sync will recompute taxes for all lines. [1] Client Avatax-test 133 Route 2
Original PR description
Activate avatax. Create a contact [1], and validate it with avatax. Create a product A, priced 11.70, add avatax code [P0000000] Create a product B, priced 9.85, add avatax code [FR000000] Create an invoice, add the two products, set avatax fiscal position Compute taxes with avalara, taxes will be 0.73 Confirm invoice Taxes will update to 1.35. This occurs during `_post`: when invoice date is set, invoice sync will recompute taxes for all lines. [1] Client Avatax-test 133 Route 20 North Oxford MA 01537-1210 United States opw-3174739 Forward-Port-Of: odoo/enterprise#37496
The rental website settings now show the Unavailability days option correctly. This prevents confusion when configuring rental availability and helps administrators verify their settings more easily.
Original PR description
This commit simply corrects how the Unavailability days setting is displayed Related to PR community: https://github.com/odoo/odoo/pull/116653 opw-3246065
Forward-Port-Of: odoo/enterprise#38864
Original PR description
Forward-Port-Of: odoo/enterprise#38864
task-3245969 Forward-Port-Of: odoo/enterprise#38804
Original PR description
task-3245969 Forward-Port-Of: odoo/enterprise#38804
### Background In PR #23171, we provided functionality such that when sending an invoice, if the invoice already exists in SUNAT, we catch the error and retrieve the CDR of the existing invoice. This was useful in situations where Odoo encounters an exception after the invoice is sent to SUNAT, which leads to an inconsistent state. However, that PR only implemented this for the IAP service. In this PR, we extend this functionality to the SUNAT and Digiflow services, so that there als
Original PR description
### Background In PR #23171, we provided functionality such that when sending an invoice, if the invoice already exists in SUNAT, we catch the error and retrieve the CDR of the existing invoice. This…
### Background
In PR #23171, we provided functionality such that when sending an invoice, if the invoice already exists in SUNAT, we catch the error and retrieve the CDR of the existing invoice.
This was useful in situations where Odoo encounters an exception after the invoice is sent to SUNAT, which leads to an inconsistent state.
However, that PR only implemented this for the IAP service.
In this PR, we extend this functionality to the SUNAT and Digiflow services, so that there also, if the invoice already exists, we retrieve the CDR.
### Implementation Notes
- We refactor the logic for retrieving the CDR if the invoice already exists:
- previously, the method that sends the invoice checked the error code, and if the code was 1033 or 4000 (document already exists), we would immediately try to retrieve the CDR.
- now, we have moved this logic to the `_post_invoice_edi` method, which reads the error code that was returned by the function that sends the invoice, and if it is 1033 or 4000, calls the method to try to retrieve the CDR.
- As a result, the method that sends the invoice (`_l10n_pe_edi_get_status_cdr_iap_service`) no longer needs to know the `serie_folio` of the invoice (which was only needed when retrieving the CDR). In master, we will therefore remove that parameter from the method definition.
- After retrieving the CDR, we check that the date and partner of the retrieved CDR match those of the invoice. If they don't match, this means that the retrieved CDR does not actually correspond to the invoice that was sent. In this case, we don't save the CDR with the invoice and we show the error to the user.
Forward-Port-Of: odoo/enterprise#38224
Forward-Port-Of: odoo/enterprise#30476From https://github.com/odoo/odoo/pull/116083, We now filter out `octet` type. Correct the impacts of this change OC branch: https://github.com/odoo-dev/odoo/tree/saas-16.2-16.0-opw-3085934-attachments_mx-yosa-d1dR-fw opw-3085934 Forward-Port-Of: odoo/enterprise#38772
Original PR description
From https://github.com/odoo/odoo/pull/116083, We now filter out `octet` type. Correct the impacts of this change OC branch: https://github.com/odoo-dev/odoo/tree/saas-16.2-16.0-opw-3085934-attachments_mx-yosa-d1dR-fw opw-3085934 Forward-Port-Of: odoo/enterprise#38772
* The limit was never applied. This was resulting in a lot of potential lines. Adding the limit can however force a seq scan because of the order by. * Change the way the limit works by adding the partner in the domain. * Limit by default to 100 since we filter on the partner. * Allow deactivating product prediction with a config param Forward-Port-Of: odoo/enterprise#38812 Forward-Port-Of: odoo/enterprise#37889
Original PR description
* The limit was never applied. This was resulting in a lot of potential lines. Adding the limit can however force a seq scan because of the order by. * Change the way the limit works by adding the partner in the domain. * Limit by default to 100 since we filter on the partner. * Allow deactivating product prediction with a config param Forward-Port-Of: odoo/enterprise#38812 Forward-Port-Of: odoo/enterprise#37889
Reproduction: 1. Install Accounting, Sale, account_intrastat, sale_intrastat 2. In a Belgium company, go to Sale, make a sale order 3. Choose a customer from the US, edit the shipping address to one in the EU but not Belgium 4. Confirm the order, validate the delivery and create the invoice 5. The Intrastat country on the invoice is empty Reason: the condition of the initializing of Intrastat country is wrong, should depend on the delivery address. Fix: Change the condition based on d
Original PR description
Reproduction: 1. Install Accounting, Sale, account_intrastat, sale_intrastat 2. In a Belgium company, go to Sale, make a sale order 3. Choose a customer from the US, edit the shipping address to one…
Reproduction: 1. Install Accounting, Sale, account_intrastat, sale_intrastat 2. In a Belgium company, go to Sale, make a sale order 3. Choose a customer from the US, edit the shipping address to one in the EU but not Belgium 4. Confirm the order, validate the delivery and create the invoice 5. The Intrastat country on the invoice is empty Reason: the condition of the initializing of Intrastat country is wrong, should depend on the delivery address. Fix: Change the condition based on delivery address. This is not an issue in Odoo 16 because we have a recompute all compute field step. Nevertheless, this initialization should fw to master for correctness. However, simply fixing the initialization will conflict with the compute function's logic. Thus we backport the change in 16 to 14 to have a clean and more compact compute logic. The computing logic is re-written for easier understanding. The step to recompute fields in 16: https://github.com/odoo-dev/odoo/blob/32bc28aa665c479e31a40afffca2f03f6f2cc805/odoo/api.py#L713-L717 It’s added here: https://github.com/odoo-dev/odoo/commit/32bc28aa665c479e31a40afffca2f03f6f2cc805 Initial commit of initialization: https://github.com/odoo-dev/enterprise/commit/bdd258ddfca3401ea4a3dad9f73ac43c791002ba Fix of the logic in 16: https://github.com/odoo/enterprise/commit/d96930c706b5e13ec94a4759d2ba0f00b883b9ba opw-3051881 Forward-Port-Of: odoo/enterprise#38703 Forward-Port-Of: odoo/enterprise#36025
Since the SII added new regional offices, this PR prevents errors in the XML "caratula" section Forward-Port-Of: odoo/enterprise#38313
Original PR description
Since the SII added new regional offices, this PR prevents errors in the XML "caratula" section Forward-Port-Of: odoo/enterprise#38313
There are currently a performance issue using the search bar of the partner ledger report. For a report of 1200 partners, with the setting 'Add totals below section' activated, the page will take several seconds (depending on the number of filtered lines) when using the search bar, before displaying the correct lines. The customer who reported the issue has 5000 partners, it's almost unusable in his case. The issue is that there's a function that is quite slow, which looks at every children
Original PR description
There are currently a performance issue using the search bar of the partner ledger report. For a report of 1200 partners, with the setting 'Add totals below section' activated, the page will take…
There are currently a performance issue using the search bar of the partner ledger report. For a report of 1200 partners, with the setting 'Add totals below section' activated, the page will take several seconds (depending on the number of filtered lines) when using the search bar, before displaying the correct lines. The customer who reported the issue has 5000 partners, it's almost unusable in his case. The issue is that there's a function that is quite slow, which looks at every children node that matches the search and make sure their parent node is also matched (so you don't see children nodes without their parent). If all the lines are collapsed, normally there's no children and this function shouldn't consume any time. But, in v16, for the partner ledger at least, there are one children node per line, which is not displayed, which corresponds to the total of the line (if you activated the setting 'Add totals below section'). -> There's an unnecessary time spent looking for parent nodes of children nodes that are not even displayed. My fix is to select only visible children nodes. Furthermore, there are some weird behaviors due to this function that will be fixed. For example, if you type 'total' in the search bar, you will see all the parent nodes. Because they all have a children node named 'Total%', that you see only if you unfold the node. Second example, if you unfold a node then collapse it, the html code for the children is still present, so they will be considered for the search but not visible (you will see their parent if one of the children match). opw-3134212 Forward-Port-Of: odoo/enterprise#38454 Forward-Port-Of: odoo/enterprise#38078
The page breaks would occur on the middle on lines thus cutting words across pages. Forward-Port-Of: odoo/enterprise#38816
Original PR description
The page breaks would occur on the middle on lines thus cutting words across pages. Forward-Port-Of: odoo/enterprise#38816
In this commit, we updated the `Product Country` label `Origin Country` to `Origin` in the invoice PDF report. TaskID - 3147187 Forward-Port-Of: odoo/enterprise#38809 Forward-Port-Of: odoo/enterprise#36253
Original PR description
In this commit, we updated the `Product Country` label `Origin Country` to `Origin` in the invoice PDF report. TaskID - 3147187 Forward-Port-Of: odoo/enterprise#38809 Forward-Port-Of: odoo/enterprise#36253