Saturday, November 2, 2024
2 changes · 18.0
Miscellaneous changes
Commit [1] optimized the `has_group` util to avoid a RPC for information that is already in the session_info. The problem is that it supposed that this information would always be available in there, which was already not the case for the frontend `session_info` when this was done. This commit simply makes the util not cache a value if there was actually no found value, and thus let the util falls back to making a RPC if needed. Note that in 18.0, the user service is actually not a service
Original PR description
Commit [1] optimized the `has_group` util to avoid a RPC for information that is already in the session_info. The problem is that it supposed that this information would always be available in there,…
Commit [1] optimized the `has_group` util to avoid a RPC for information that is already in the session_info. The problem is that it supposed that this information would always be available in there, which was already not the case for the frontend `session_info` when this was done. This commit simply makes the util not cache a value if there was actually no found value, and thus let the util falls back to making a RPC if needed. Note that in 18.0, the user service is actually not a service anymore (since commit [2]) and is the only truth of information about user data (since commit [3]), so this makes this even more important. We could consider adding the same group information in the frontend session_info in the future, but in general we want to avoid loading any useless information for visitors and would not mind the extra RPC for connected ones when it comes to the website. [1]: https://github.com/odoo/odoo/commit/da257e9d572047617cdfaac33fbe47983e8ab30d [2]: https://github.com/odoo/odoo/commit/3fb72654a898eb5c5b1c89279b0638dab8e3881d [3]: https://github.com/odoo/odoo/commit/182b0554882a2eeb5d86c9cb6fdaed6618b2615b Related to task-4290643 Forward-Port-Of: odoo/odoo#185908 Forward-Port-Of: odoo/odoo#185479
**Steps to reproduce:** - Install l10n_mx_edi_stock_extended_31 - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - In Accounting settings, enable "Customer Addresses" - Add a delivery address to a Mexican contact (e.g. INMOBILIARIA CVA) - Create a SO: * Customer: [INMOBILIARIA CVA] * Delivery Address [Delivery address of INMOBILIARIA CVA] * Product: [any product with an UNSPSC category] - Confirm the SO - Go to the created delivery (Its delivery address is the delivery
Original PR description
**Steps to reproduce:** - Install l10n_mx_edi_stock_extended_31 - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - In Accounting settings, enable "Customer Addresses" - Add a delivery…
**Steps to reproduce:** - Install l10n_mx_edi_stock_extended_31 - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - In Accounting settings, enable "Customer Addresses" - Add a delivery address to a Mexican contact (e.g. INMOBILIARIA CVA) - Create a SO: * Customer: [INMOBILIARIA CVA] * Delivery Address [Delivery address of INMOBILIARIA CVA] * Product: [any product with an UNSPSC category] - Confirm the SO - Go to the created delivery (Its delivery address is the delivery address of INMOBILIARIA CVA) - Edit the delivery: * Transport Type: [Federal Transport] * Vehicule Setup: [any] * Gross Vehicule Weight: [any] * Distance to Destination (KM): [any] - Validate the delivery - Generate Delivery Guide - Check the generated delivery guide xml **Issue:** The destination address in the xml is the address of the main contact. It should be its delivery address. opw-4151229 Forward-Port-Of: odoo/enterprise#73181 Forward-Port-Of: odoo/enterprise#72512