Saturday, March 15, 2025
6 changes · 18.0
Miscellaneous changes
Initial PR: https://github.com/odoo/odoo/pull/194141 It seems the fix above was not enough as it was assumed that connection (or backend in pg terms) were NOT being reused when initiated through `sql_db.connect`. For proper cleanup we need to reach [this part of the code](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c#L1260-L1298) which can be done in 3 ways: - calling UNLISTEN * and committing - closing the connection - aborting the transaction
Original PR description
Initial PR: https://github.com/odoo/odoo/pull/194141 It seems the fix above was not enough as it was assumed that connection (or backend in pg terms) were NOT being reused when initiated through `sql_db.connect`. For proper cleanup we need to reach [this part of the code](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c#L1260-L1298) which can be done in 3 ways: - calling UNLISTEN * and committing - closing the connection - aborting the transaction (before committing the listen) `UNLISTEN *` is a good candidate for this, but closing the connection seems to be the safer option. Forward-Port-Of: odoo/odoo#201814 Forward-Port-Of: odoo/odoo#201401
In commit b81314b we replaced a join on a case with a join on a boolean expression- however this did not materially increase performance (same order of magnitutde). Instead we should have simply used a valued case expression, which permits an entirely different (and much more optimal) query plan- specifically during sequential scans of the warehouse_cte common table expression. *See PR for further details* Forward-Port-Of: odoo/odoo#201318
Original PR description
In commit b81314b we replaced a join on a case with a join on a boolean expression- however this did not materially increase performance (same order of magnitutde). Instead we should have simply used a valued case expression, which permits an entirely different (and much more optimal) query plan- specifically during sequential scans of the warehouse_cte common table expression. *See PR for further details* Forward-Port-Of: odoo/odoo#201318
The export is completely wrong when it comes to multiple taxes affecting each others. It would recompute the withholding taxes one by one based on the price subtotal instead of taking into account all other taxes as you would expect. task-4641930 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#201696 Forward-Port-Of: odoo/odoo#201489
Original PR description
The export is completely wrong when it comes to multiple taxes affecting each others. It would recompute the withholding taxes one by one based on the price subtotal instead of taking into account all other taxes as you would expect. task-4641930 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#201696 Forward-Port-Of: odoo/odoo#201489
For existing customers, when coretax is installed, the new luxury tax group and its tax will not be loaded into Odoo. During XML generation, it will look for the tax group by XML ID which will not be found and hence resulting to traceback error. To mitigate this issue, we will introduce a post_init_hook to manually create the tax group and not raise exception when env.ref() doesn't find the tax group opw-4635356 --- I confirm I have signed the CLA and read the PR guidelines at www.odo
Original PR description
For existing customers, when coretax is installed, the new luxury tax group and its tax will not be loaded into Odoo. During XML generation, it will look for the tax group by XML ID which will not be found and hence resulting to traceback error. To mitigate this issue, we will introduce a post_init_hook to manually create the tax group and not raise exception when env.ref() doesn't find the tax group opw-4635356 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#201643 Forward-Port-Of: odoo/odoo#201523
This commit gives the users access to the XML of an invoice whose submission to JoFotara failed. This allows for better debugging of failed invoices. It also prevents the users from deleting PDFs of successfully submitted invoices. task-4571479 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199210
Original PR description
This commit gives the users access to the XML of an invoice whose submission to JoFotara failed. This allows for better debugging of failed invoices. It also prevents the users from deleting PDFs of successfully submitted invoices. task-4571479 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199210
Forward-Port-Of: odoo/enterprise#81496
Original PR description
Forward-Port-Of: odoo/enterprise#81496