Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] shopinvader_v2_app_demo #1364

Open
wants to merge 38 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
82848f5
[ADD] shopinvader_app_demo: init
AnizR Jun 7, 2023
cb9d1de
wip: add demo user and auth
AnizR Jun 7, 2023
ebc41c5
Rename module: shopinvader_app_demo -> shopinvader_v2_app_demo + run …
marielejeune Jun 20, 2023
9ecf84a
[ADD] Address router to app + cart sub-app
marielejeune Jun 21, 2023
67cbb8c
shopinvader_api_sale was renamed shopinvader_api_cart
marielejeune Jun 21, 2023
058724b
shopinvader_api_cart user group was renamed
marielejeune Jun 22, 2023
fc3ab4f
add contributors
marielejeune Jun 22, 2023
3afc2fe
change tag name of shopinvader_api_address_router
AnizR Jun 22, 2023
5260342
add dependencies to shopinvader_sale_cart
marielejeune Jun 23, 2023
00f4d4f
fix cart services OpenAPI url
marielejeune Jun 23, 2023
6568e3e
shopinvader_v2_app_demo: add demo JWT validator
sbidoul Jun 23, 2023
06e9a5f
shopinvader_v2_app_demo: allow anonymous partner for all services
sbidoul Jun 23, 2023
5bd6ece
shopinvader_v2_app_demo: link swagger to demo keycloak
sbidoul Jun 23, 2023
ab7ea23
shopinvader_v2_app_demo: fix cart mount url
sbidoul Jun 26, 2023
e9d7e63
Rmv irrelevant @api.model decorator
marielejeune Jul 26, 2023
1dc3799
[FIX] _get_fastapi_routers() super call
marielejeune Jul 31, 2023
283b377
[IMP] cart subapp: automatically copy all dependencies overrides from…
marielejeune Jul 31, 2023
393a85d
[UPD] Make company_id dependency override available in shopinvader de…
marielejeune Jul 31, 2023
392b630
[UPD] extendable-fastapi sources required
marielejeune Jul 31, 2023
4d97417
[UPD] shopinvader_v2_app_demo: Add export to SE and restapi
lmignon Oct 5, 2023
e3e0e40
[UPD] shopinvader_v2_app_demo: add dependency on shopinvader_restapi …
lmignon Oct 6, 2023
a7f1f23
[IMP] shopinvader_v2_app_demo: Uses s3 to store thumbnail and fix es url
lmignon Oct 6, 2023
3afa8c2
[FIX] shopinvader_v2_app_demo: Fix typo on endpoint
lmignon Oct 6, 2023
7c1f4c9
[IMP] shopinvader_v2_app_demo: Provies oauth2 login into swagger
lmignon Oct 6, 2023
097092f
[IMP] shopinvader_v2_app_demo: Improves oauth2
lmignon Oct 7, 2023
545d3d7
[IMP] shopinvader_v2_app_demo: Import se.storage config
lmignon Oct 10, 2023
42705a2
[IMP] shopinvader_v2_app_demo: Add loyalty router
marielejeune Oct 20, 2023
aafd2cf
[FIX] shopinvader_v2_app_demo: Disable second backend
lmignon Oct 23, 2023
7ba7ed4
[IMP] shopinvader_v2_app_demo: add sale channel
sbidoul Jun 3, 2024
6af8c58
[IMP] shopinvader_v2_app_demo: remove base_rest dependency
sbidoul Jun 4, 2024
b8a2781
[IMP] shopinvader_v2_app_demo: add some routers
sbidoul Jun 4, 2024
4bfe04a
[IMP] shopinvader_v2_app_demo: add product price to indexes
sbidoul Jun 4, 2024
2379846
[IMP] demo v2: add product links
sbidoul Jun 4, 2024
50a34b1
[IMP] demo v2: add settings and customer routers
sbidoul Jun 5, 2024
aeae920
[DO NOT MERGE] test requirements
sbidoul Jun 5, 2024
d8a722f
[IMP] demo v2: add shopinvader_api_delivery_carrier
sbidoul Jun 5, 2024
e1e6101
[FIX] demo v2: fix renamed group
sbidoul Jun 5, 2024
3f5538a
[FIX] demo v2: mount loyality and carrier routers on cart app
sbidoul Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions setup/shopinvader_v2_app_demo/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
70 changes: 70 additions & 0 deletions shopinvader_v2_app_demo/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
====================
Shopinvader App Demo
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:219da5b8ec4850e398538152d633cbebd8052800c242e751d639f6538d1a54c1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github
:target: https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_v2_app_demo
:alt: shopinvader/odoo-shopinvader

|badge1| |badge2| |badge3|

This module allows you to create a demo shopinvader application.

**Table of contents**

.. contents::
:local:

Changelog
=========

16.0.1.0.0 (2023-06-07)
~~~~~~~~~~~~~~~~~~~~~~~

* [ADD] add shopinvader_assortment addon

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader/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 <https://github.com/shopinvader/odoo-shopinvader/issues/new?body=module:%20shopinvader_v2_app_demo%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~

* Zina Rasoamanana [email protected] (https://www.acsone.eu)
* Laurent Mignon <[email protected]>
* Marie Lejeune <[email protected]>

Maintainers
~~~~~~~~~~~

This module is part of the `shopinvader/odoo-shopinvader <https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_v2_app_demo>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions shopinvader_v2_app_demo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
66 changes: 66 additions & 0 deletions shopinvader_v2_app_demo/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Shopinvader App Demo",
"summary": """
Adds a demo application on fastapi endpoint for a
demo shopinvader application that takes every router
""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV",
"website": "https://github.com/shopinvader/odoo-shopinvader",
"depends": [
"connector_elasticsearch",
"fastapi",
"sale_channel_search_engine_category",
"sale_channel_search_engine_product",
"shopinvader_anonymous_partner",
"shopinvader_api_address",
"shopinvader_api_cart",
"shopinvader_api_customer",
"shopinvader_api_delivery_carrier",
"shopinvader_api_payment_cart",
"shopinvader_api_payment_provider_custom",
"shopinvader_api_payment_provider_sips",
"shopinvader_api_payment_provider_stripe",
"shopinvader_api_sale_loyalty",
"shopinvader_api_sale",
"shopinvader_api_settings",
"shopinvader_api_signin_jwt",
"shopinvader_api_wishlist",
"shopinvader_fastapi_auth_jwt",
"shopinvader_product_brand_tag",
"shopinvader_product_brand",
"shopinvader_product_description",
"shopinvader_product_seo",
"shopinvader_product_url",
"shopinvader_product",
"shopinvader_search_engine_image",
"shopinvader_search_engine_product_brand_image",
"shopinvader_search_engine_product_price",
"shopinvader_search_engine_product_stock_state",
"shopinvader_search_engine_update_image",
"shopinvader_search_engine_update_product_brand_image",
"shopinvader_search_engine_update_product_brand",
"shopinvader_search_engine_update_product_media",
"shopinvader_search_engine_update_product_template_multi_link",
"shopinvader_search_engine",
],
"external_dependencies": {"python": ["fastapi"]},
"data": [
"views/fastapi_endpoint.xml",
],
"demo": [
"demo/res_users.xml",
"demo/res_groups.xml",
"demo/auth_jwt_validator.xml",
"demo/fastapi_endpoint.xml",
"demo/se_backend.xml",
"demo/se_index_config.xml",
"demo/se_index.xml",
"demo/se_image_field_thumbnail_size.xml",
"demo/fs_storage.xml",
],
}
18 changes: 18 additions & 0 deletions shopinvader_v2_app_demo/demo/auth_jwt_validator.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 ACSONE SA/NV
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
<odoo>
<record model="auth.jwt.validator" id="shopinvader_demo_jwt_validator">
<field name="name">shopinvader_demo</field>
<field name="signature_type">public_key</field>
<field
name="public_key_jwk_uri"
>https://keycloak.demo16.shopinvader.com/auth/realms/master/protocol/openid-connect/certs</field>
<field name="audience">shopinvader_jwt</field>
<field
name="issuer"
>https://keycloak.demo16.shopinvader.com/auth/realms/master</field>
<field name="partner_id_strategy">email</field>
<field name="cookie_enabled" eval="True" />
</record>
</odoo>
15 changes: 15 additions & 0 deletions shopinvader_v2_app_demo/demo/fastapi_endpoint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 ACSONE SA/NV
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
<odoo>
<record model="fastapi.endpoint" id="shopinvader_demo_endpoint">
<field name="name">Shopinvader Demo Endpoint</field>
<field name="description"><![CDATA[
# A Dummy Shopinvader Demo
]]></field>
<field name="app">shopinvader_demo</field>
<field name="root_path">/shopinvader_demo</field>
<field name="user_id" ref="shopinvader_app_demo_user" />
<field name="auth_jwt_validator_id" ref="shopinvader_demo_jwt_validator" />
</record>
</odoo>
21 changes: 21 additions & 0 deletions shopinvader_v2_app_demo/demo/fs_storage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="fs_storage_shopinvader_demo" model="fs.storage">
<field name="name">Shopinvader Demo File Storage</field>
<field name="protocol">s3</field>
<field name="code">fsshop</field>
<field name="directory_path">images</field>
<field
name="model_xmlids"
>search_engine_image_thumbnail.model_se_thumbnail</field>
<field name="use_filename_obfuscation" eval="True" />
<field name="autovacuum_gc" eval="False" />
<field name="base_url">https://media.demo16.shopinvader.com/images</field>
<field name="force_db_for_default_attachment_rules">{}</field>
<field
name="options"
>{"key": "admin", "secret": "CHANGEME", "client_kwargs":{"endpoint_url": "http://minio:9000"}, "s3_additional_kwargs": {"CacheControl": "max-age=31536000, public"}}</field>
</record>
</odoo>
18 changes: 18 additions & 0 deletions shopinvader_v2_app_demo/demo/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 ACSONE SA/NV
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
<odoo>
<record id="shopinvader_app_demo_group" model="res.groups">
<field name="name">Shopinvader App Demo Group</field>
<field name="users" eval="[(4, ref('shopinvader_app_demo_user'))]" />
<field
name="implied_ids"
eval="[
(4, ref('fastapi.group_fastapi_endpoint_runner')),
(4, ref('shopinvader_api_address.shopinvader_address_user_group')),
(4, ref('shopinvader_api_security_sale.shopinvader_sale_user_group')),
]"
/>

</record>
</odoo>
14 changes: 14 additions & 0 deletions shopinvader_v2_app_demo/demo/res_users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 ACSONE SA/NV
License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). -->
<odoo>
<record
id="shopinvader_app_demo_user"
model="res.users"
context="{'no_reset_password': True, 'no_reset_password': True}"
>
<field name="name">Shopinvader App Demo User</field>
<field name="login">shopinvader_app_demo_user</field>
<field name="groups_id" eval="[(6, 0, [])]" />
</record>
</odoo>
11 changes: 11 additions & 0 deletions shopinvader_v2_app_demo/demo/se_backend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="se_backend_shopinvader_demo" model="se.backend">
<field name="name">Shopinvader Demo Elasticsearch Backend</field>
<field name="tech_name">se_backend_shopinvader_demo</field>
<field name="es_server_host">http://elasticsearch:9200</field>
<field name="backend_type">elasticsearch</field>
</record>
</odoo>
43 changes: 43 additions & 0 deletions shopinvader_v2_app_demo/demo/se_image_field_thumbnail_size.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="thumbnail_size_product" model="se.image.field.thumbnail.size">
<field
name="size_ids"
eval="[(6, 0, [ref('shopinvader_search_engine_image.small'), ref('shopinvader_search_engine_image.medium'), ref('shopinvader_search_engine_image.large')])]"
/>
<field name="model_id" ref="product.model_product_product" />
<field
name="field_id"
ref="fs_product_multi_image.field_product_product__variant_image_ids"
/>
<field name="backend_id" ref="se_backend_shopinvader_demo" />
</record>

<record id="thumbnail_size_category" model="se.image.field.thumbnail.size">
<field
name="size_ids"
eval="[(6, 0, [ref('shopinvader_search_engine_image.small'), ref('shopinvader_search_engine_image.medium'), ref('shopinvader_search_engine_image.large')])]"
/>
<field name="model_id" ref="product.model_product_category" />
<field
name="field_id"
ref="fs_product_multi_image.field_product_category__image_ids"
/>
<field name="backend_id" ref="se_backend_shopinvader_demo" />
</record>

<record id="thumbnail_size_product_brand" model="se.image.field.thumbnail.size">
<field
name="size_ids"
eval="[(6, 0, [ref('shopinvader_search_engine_image.small'), ref('shopinvader_search_engine_image.medium'), ref('shopinvader_search_engine_image.large')])]"
/>
<field name="model_id" ref="product_brand.model_product_brand" />
<field
name="field_id"
ref="fs_product_brand_multi_image.field_product_brand__image_ids"
/>
<field name="backend_id" ref="se_backend_shopinvader_demo" />
</record>
</odoo>
57 changes: 57 additions & 0 deletions shopinvader_v2_app_demo/demo/se_index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="index_product_product_en" model="se.index">
<field name="backend_id" ref="se_backend_shopinvader_demo" />
<field name="name">elastic-product-en</field>
<field name="config_id" ref="index_config_product_product" />
<field name="lang_id" ref="base.lang_en" />
<field name="model_id" ref="product.model_product_product" />
<field name="serializer_type">shopinvader_product_exports</field>
</record>
<record id="index_product_product_fr" model="se.index">
<field name="backend_id" ref="se_backend_shopinvader_demo" />
<field name="name">elastic-product-fr</field>
<field name="config_id" ref="index_config_product_product" />
<field name="lang_id" ref="base.lang_fr" />
<field name="model_id" ref="product.model_product_product" />
<field name="serializer_type">shopinvader_product_exports</field>
</record>

<record id="index_product_category_en" model="se.index">
<field name="backend_id" ref="se_backend_shopinvader_demo" />
<field name="name">elastic-category-en</field>
<field name="config_id" ref="index_config_product_category" />
<field name="lang_id" ref="base.lang_en" />
<field name="model_id" ref="product.model_product_category" />
<field name="serializer_type">shopinvader_category_exports</field>
</record>
<record id="index_product_category_fr" model="se.index">
<field name="backend_id" ref="se_backend_shopinvader_demo" />
<field name="name">elastic-category-fr</field>
<field name="config_id" ref="index_config_product_category" />
<field name="lang_id" ref="base.lang_fr" />
<field name="model_id" ref="product.model_product_category" />
<field name="serializer_type">shopinvader_category_exports</field>
</record>

<record id="index_product_brand_en" model="se.index">
<field name="backend_id" ref="se_backend_shopinvader_demo" />
<field name="name">elastic-brand-en</field>
<field name="config_id" ref="index_config_product_brand" />
<field name="lang_id" ref="base.lang_en" />
<field name="model_id" ref="product_brand.model_product_brand" />
<field name="serializer_type">shopinvader_brand_exports</field>
</record>

<record id="index_product_brand_fr" model="se.index">
<field name="backend_id" ref="se_backend_shopinvader_demo" />
<field name="name">elastic-brand-fr</field>
<field name="config_id" ref="index_config_product_brand" />
<field name="lang_id" ref="base.lang_fr" />
<field name="model_id" ref="product_brand.model_product_brand" />
<field name="serializer_type">shopinvader_brand_exports</field>
</record>

</odoo>
Loading
Loading