odoo-plus / odootools

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

Odoo Application API for custom handlers #21

Closed llacroix closed 1 year ago

llacroix commented 1 year ago

OdooApplication API is the start of a Common Core that can be used by any version of Odoo Addons. Instead of working with different version of Odoo. It will develop itself as a set of core capabilities that enables a complete control on what's going to be part of your Odoo application.

For example, you may want to store odoo sessions into a redis server. The current way to achieve this is to add a server_wide_module that will customize the classes to potentially be able to store sessions somewhere else. It's ugly and it's not really portable.

Instead, the OdooApplication can be built using plugins. Each plugins will work like an application builder. For example, you can build a WSGI Application that extends the RedisSessionStore instead of the FSSessionStore. Both class implement a common interface to manage a session store.

As a result, it should make Odoo faster to load as you don't have to load and replace implementations. The implementations is built before Odoo starts.

codecov[bot] commented 1 year ago

Codecov Report

Base: 94.71% // Head: 89.85% // Decreases project coverage by -4.86% :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-0.1.6 #21 +/- ## ================================================= - Coverage 94.71% 89.85% -4.86% ================================================= Files 74 80 +6 Lines 5125 5402 +277 ================================================= Hits 4854 4854 - Misses 271 548 +277 ``` | [Impacted Files](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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/app/\_\_init\_\_.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9hcHAvX19pbml0X18ucHk=) | `0.00% <0.00%> (ø)` | | | [odoo\_tools/app/application.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9hcHAvYXBwbGljYXRpb24ucHk=) | `0.00% <0.00%> (ø)` | | | [odoo\_tools/app/plugins/\_\_init\_\_.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9hcHAvcGx1Z2lucy9fX2luaXRfXy5weQ==) | `0.00% <0.00%> (ø)` | | | [odoo\_tools/app/plugins/base.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9hcHAvcGx1Z2lucy9iYXNlLnB5) | `0.00% <0.00%> (ø)` | | | [odoo\_tools/app/plugins/logging.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9hcHAvcGx1Z2lucy9sb2dnaW5nLnB5) | `0.00% <0.00%> (ø)` | | | [odoo\_tools/app/utils.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9hcHAvdXRpbHMucHk=) | `0.00% <0.00%> (ø)` | | | [odoo\_tools/cli/click/entrypoint.py](https://codecov.io/gh/llacroix/odoo-tools/pull/21?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-b2Rvb190b29scy9jbGkvY2xpY2svZW50cnlwb2ludC5weQ==) | `38.88% <ø> (+2.04%)` | :arrow_up: | 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.

codecov-commenter commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (release-0.1.6@a811bce). Click here to learn what that means. The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@               Coverage Diff                @@
##             release-0.1.6      #21   +/-   ##
================================================
  Coverage                 ?   95.23%           
================================================
  Files                    ?       98           
  Lines                    ?     7319           
  Branches                 ?        0           
================================================
  Hits                     ?     6970           
  Misses                   ?      349           
  Partials                 ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

llacroix commented 1 year ago

hmm