Sunday, April 14, 2024
7 changes · master
Code cleanup and technical improvements
This update streamlines the internal code behind Discuss, messaging, activities, attachments, and live chat by moving responsibilities from separate services into the relevant data models. It should make future maintenance easier and reduce complexity, with little to no direct change expected for end users.
Original PR description
Discuss code is more complicated than it should. Part of it comes from split in arbitrary services, which are both confusing and very verbose. This commit removes the `mail.activity` service: related features have been moved to the appropriate model. For example: ```js await this.env.services["mail.activity"].edit(activity); // => await activity.edit(); ``` https://github.com/odoo/enterprise/pull/60419
This change reorganizes internal communication features so actions like editing messages, activities, attachments, and chat windows live directly on the relevant records instead of separate services. It should make the Discuss-related code easier to maintain and reduce complexity across connected apps without changing the intended user experience.
Original PR description
Discuss code is more complicated than it should. Part of it comes from split in arbitrary services, which are both confusing and very verbose. This commit removes the `mail.activity` service: related features have been moved to the appropriate model. For example: ```js await this.env.services["mail.activity"].edit(activity); // => await activity.edit(); ``` https://github.com/odoo/odoo/pull/161286
Miscellaneous changes
Since [1], it's possible to override the language of the user by adding the language to the query string : `lang=en_US`. Since [2], all the key, values pairs that were on the fragment of the url, are now on the query string, and they are manipulated by the router. The information that was previously on the query string, are marked as a lockedKeys to avoid losing them when reloading the page or when a new state is push (as for example the debug key). Unfortunately, lang was forgotten in this li
Original PR description
Since [1], it's possible to override the language of the user by adding the language to the query string : `lang=en_US`. Since [2], all the key, values pairs that were on the fragment of the url, are now on the query string, and they are manipulated by the router. The information that was previously on the query string, are marked as a lockedKeys to avoid losing them when reloading the page or when a new state is push (as for example the debug key). Unfortunately, lang was forgotten in this list, which lead to a lost of the override language when we reload the browser. [1] : https://github.com/odoo/odoo/commit/286cc97dd45a218ce763f9f15bc34f3226e13296 [2] : https://github.com/odoo/odoo/commit/c63d14a0485a553b74a8457aee158384e9ae6d3f Forward-Port-Of: odoo/odoo#161683
Steuernummer was being validated at tax report xml generation. The check was moved to the company form view. Moreover, the field was set visible in the company form view for multivat. It should be a constraint raising when trying to set the steuernummer to the company; there is no point in only checking it at XML generation. task-3809218 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161472 Forward-Port-Of: odoo/od
Original PR description
Steuernummer was being validated at tax report xml generation. The check was moved to the company form view. Moreover, the field was set visible in the company form view for multivat. It should be a constraint raising when trying to set the steuernummer to the company; there is no point in only checking it at XML generation. task-3809218 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161472 Forward-Port-Of: odoo/odoo#159057
An update made to the tremol device has changed the expected content of the price field. It now expects up to 15 characters in this position, with a maximum of 5 decimal places. At present we can send prices with a decimal position greater than 5, doing so will result in an error from the fiscal device. This commit adapts the content that gets serialised in order to ensure that the decimal provided is no longer than 5 decimal places. task-id: none Forward-Port-Of: odoo/odoo#161802 Forw
Original PR description
An update made to the tremol device has changed the expected content of the price field. It now expects up to 15 characters in this position, with a maximum of 5 decimal places. At present we can send prices with a decimal position greater than 5, doing so will result in an error from the fiscal device. This commit adapts the content that gets serialised in order to ensure that the decimal provided is no longer than 5 decimal places. task-id: none Forward-Port-Of: odoo/odoo#161802 Forward-Port-Of: odoo/odoo#161682
Steuernummer was being validated at tax report xml generation. The check was moved to the company form view. It should be a constraint raising when trying to set the steuernummer to the company; there is no point in only checking it at XML generation. task-3809218 Forward-Port-Of: odoo/enterprise#60526 Forward-Port-Of: odoo/enterprise#59348
Original PR description
Steuernummer was being validated at tax report xml generation. The check was moved to the company form view. It should be a constraint raising when trying to set the steuernummer to the company; there is no point in only checking it at XML generation. task-3809218 Forward-Port-Of: odoo/enterprise#60526 Forward-Port-Of: odoo/enterprise#59348
To reproduce the issue: 1) Create an account.move move_1, leave it in draft 2) Create another account.move move_2, using the same accounts as move_1 and at the same date, leave it in draft 3) Make sure move_1 and move_2's sequence numbers are empty (so that their sequence number will be recomputed at posting) 3) Post move_2 4) Post move_1 5) Open the General Ledger, unfold the lines of the accounts touched by move_1 and move_2. ===> Problem: the move_1's move lines appear before move_2's, e
Original PR description
To reproduce the issue: 1) Create an account.move move_1, leave it in draft 2) Create another account.move move_2, using the same accounts as move_1 and at the same date, leave it in draft 3) Make sure move_1 and move_2's sequence numbers are empty (so that their sequence number will be recomputed at posting) 3) Post move_2 4) Post move_1 5) Open the General Ledger, unfold the lines of the accounts touched by move_1 and move_2. ===> Problem: the move_1's move lines appear before move_2's, even though move_2 has a lower sequence. This is due to the fact move lines with identical dates were ordered by id by the GL. Since move_1 was created first, its lines had a lower id. We fix that by adding the move_name to the ordering criteria. Move lines will still be primarily ordered by date, but if they have the same date, we'll now use the move_name before falling back to their id. Forward-Port-Of: odoo/enterprise#60493 Forward-Port-Of: odoo/enterprise#59213