Tuesday, April 30, 2024
29 changes
Resolved issues and error corrections
The portal's mobile navigation menu was extending beyond the navbar boundaries on mobile devices, which could cause unwanted horizontal scrollbars in certain configurations. This fix removes an unnecessary negative margin that was causing the overflow, improving the mobile user experience and preventing layout issues.
Original PR description
The portal mobile navbar menu was overflowing its parent (the navbar) on the left and right once opened. This is because of a combination of commits [1] and [2]. Indeed, [1] added a negative margin…
The portal mobile navbar menu was overflowing its parent (the navbar) on the left and right once opened. This is because of a combination of commits [1] and [2]. Indeed, [1] added a negative margin on that menu to compensate the parent navbar's padding. However, [2] later forced that parent padding to 0 with a class. This commit removes the negative margin compensation to fix the issue. Note: the design may not seem that broken without this fix. But in custo it could look very bad as it could introduce a horizontal scrollbar: just make the portal layout use a fluid container and have `$navbar-padding-x` be higher than `$grid-gutter-width`. Also, note that the design is not perfect as the inner padding of that menu also relies on the navbar padding value... which is ok in Odoo but only because we change the default of Bootstrap, which is 0. It was chosen to ignore that problem in stable. In master, the navbar padding will be left back to the BS default (0) and another spacing value will thus be used for the portal menu. [1]: https://github.com/odoo/odoo/commit/f8940943592b696b4f27c0013f837a6cdecb0433 [2]: https://github.com/odoo/odoo/commit/df8535fbd40e1e5c09dbe616a3332c76c23525c8 Related to https://github.com/odoo/odoo/pull/163996 | Before | After | | -------- | -------- | |  |  |
This update temporarily suppresses warning messages that appear when using timezone functions in Python 3.12. While a more comprehensive solution is needed in the future to properly handle all timezone references throughout the codebase, this fix prevents unnecessary warnings from appearing to users now. The team plans to implement a complete solution in a future version.
Original PR description
This is a temporary fix to avoid warnings when using uctnow in python 3.12. A proper fix should be to localize all timezone using datetime.now(timezone.utc) instead of datetime.utcnow(). Unfortunately this is not as straightforward as it seems, since those naive timezones are localize in the code conditionally, but not always. It may take time and an in depth review to fix all occurrence. Not sure yet in witch version we should fix it properly. While in netsvc file, removes the encoding suppress warning Forward-Port-Of: odoo/odoo#163872 Forward-Port-Of: odoo/odoo#163794
This update modernizes how Odoo handles Python code analysis to align with Python 3.12+ standards. The changes remove deprecated code patterns that will stop working in Python 3.14, ensuring the system continues to function properly as Python evolves. This is a maintenance fix that keeps Odoo compatible with current and future Python versions.
Original PR description
Since 3.8, some ast object and parameters changed, with backward compatibility. They are now deprecate in 3.12 and will be removed in 3.14. Keeping a compatibility between both solutions is possible but hard to do with python > 3.7, the solution was to mute the warning in odoo 15.0 since it is unlikely to make it compatible with python 3.14, but we can fix it a cleaner way in 16.0 since the minimal python version is higher than 3.8. see #162438 for 15.0 suppress warning fix part of #162438 , adaptations for ubuntu noble Forward-Port-Of: odoo/odoo#163487
This fix resolves a system error that occurred when creating sales orders with products from different company branches. The issue was in how the system validated company access, and this update corrects the validation logic to check companies individually rather than as a group, allowing sales orders with mixed-company products to save successfully.
Original PR description
Issue: A traceback error is raised when a sales order is saved with products with varying company ids. Was trying to lookup a list of ids rather than a singular id which triggered the traceback. Purpose of this PR: To check accessible company branches on a individual company rather than a recordset of companies. Steps to Reproduce on Runbot: 1) Create branch of main company. 2) Create products one with company id of the branch and the other of company id in the main company. 3) Create sale order, order lines with each of the products. 4) On save, a traceback error is raised. Notes: opw-3810770 Forward-Port-Of: odoo/odoo#162547