Skip to main content

Cart FastAPI designed to work with the shopinvader-js-cart library see (https://github.com/shopinvader/shopinvader-js-cart)

Project description

Odoo Community Association

Shopinvader API Cart

Beta License: AGPL-3 shopinvader/odoo-shopinvader

This addon adds a web API on top of the sale.order model to ease the creation of sale orders from Web frontend. The API is designed to work with the shopinvader-js-cart library see (https://github.com/shopinvader/shopinvader-js-cart)

Table of contents

Usage

All the routes under the cart_router must be prefixed with /cart. This is not done in this addon to let the developper mount this router as a sub-app, allowing a specific authentification mechanism.

If mounting the router in the same app as other routers (because it doesn’t need a specific authentification mechanism), just add a prefix:

def _get_app(self):
   app = super()._get_app()
   app.include_router(router=cart_router, prefix='/cart')
   return app

If you want a nested app, just do as follows:

def _get_app(self):
    app = super()._get_app()
    app.dependencies_overrides.update(
        self._get_app_dependencies_overrides()
    )
    cart_app = FastAPI()
    cart_app.include_router(cart_router)
    # First copy dependencies overrides from the main app
    cart_app.dependencies_overrides.update(
        self._get_app_dependencies_overrides()
    )
    # Then add / modify specific dependencies overrides
    cart_app.dependencies_overrides.update(
         self._get_cart_app_dependencies_overrides()
    )
    app.mount("/cart", cart_app)
    return app

Changelog

16.0.1.0.2 (2023-10-13)

Misc

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV

Contributors

Maintainers

This module is part of the shopinvader/odoo-shopinvader project on GitHub.

You are welcome to contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo_addon_shopinvader_api_cart-18.0.1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_shopinvader_api_cart-18.0.1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29d0c23aa1111a82da3d7972b380536301bfebe2b221edc385dcf1a164736542
MD5 b8cd164b7005525d13ddafe8d91d9b34
BLAKE2b-256 0ed1bf14ac2e49496d87a89075e3ac6e6afb64503dd6ef029c4cd8e6d93ea0fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page