odoo-plus / odootools

Odoo Tools
GNU General Public License v3.0
21 stars 7 forks source link

Added a new utility to generate css/js assets for Odoo #20

Closed llacroix closed 1 year ago

llacroix commented 1 year ago

It's currently more or less a proof of concept to generate assets. It can be used to generate assets manually without having to hope for odoo to do it. In some ways, it can be used to force asset generation as Odoo will not generate assets if an attachment record is found to "fit" the use case. Even if the asset is wrong, odoo will not regenerate it.

With this tool we can generate assets locally and either push the file as an attachment that will be used instead of a wrongly created one. It can be useful to debug why an attachment isn't being generated properly.

Ideally, it would be fun to move the asset generator out of Odoo as much as possible. It would make it possible to remove the asset generation of Odoo which can speed up the loading time of pages as it doesn't have to check if the version is correct or if it can generate it. Generation of assets can be done by deployment scripts. In a real use case, people don't install/uninstall modules that often that assets need to be constantly regenerated.

codecov[bot] commented 1 year ago

Codecov Report

Base: 94.71% // Head: 94.20% // Decreases project coverage by -0.51% :warning:

Coverage data is based on head (2eed23c) compared to base (3a52eb7). Patch coverage: 22.22% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-0.1.6 #20 +/- ## ================================================= - Coverage 94.71% 94.20% -0.51% ================================================= Files 74 74 Lines 5125 5161 +36 ================================================= + Hits 4854 4862 +8 - Misses 271 299 +28 ``` | [Impacted Files](https://codecov.io/gh/llacroix/odoo-tools/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Lo%C3%AFc+Faure-Lacroix) | Coverage Δ | | |---|---|---| | [odoo\_tools/cli/click/manage.py](https://codecov.io/gh/llacroix/odoo-tools/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Lo%C3%AFc+Faure-Lacroix#diff-b2Rvb190b29scy9jbGkvY2xpY2svbWFuYWdlLnB5) | `72.00% <22.22%> (-28.00%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Lo%C3%AFc+Faure-Lacroix). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Lo%C3%AFc+Faure-Lacroix)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.