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] shopinvader_search_engine: Migration from 14.0 + Refactoring #1386

Open
lmignon opened this issue Jul 28, 2023 · 3 comments
Open

[16.0] shopinvader_search_engine: Migration from 14.0 + Refactoring #1386

lmignon opened this issue Jul 28, 2023 · 3 comments
Assignees

Comments

@lmignon
Copy link
Collaborator

lmignon commented Jul 28, 2023

Now use the new addons from connector_search_engine

  • shopinvader_schema_product: Addon defining a Extendable pydantic model uses to serialize a products into json. These infomrations are to be put into a search engine index
  • shopinvader_schema_category: Addon defining a Extendable pydantic model uses to serialize a products into json. These infomrations are to be put into a search engine index

The pydantic models should define the attributes exported today through the ir.export xml records.

  • shopinvader_search_engine. create specialized serializers for pydantic models defined for product and category . Register these serializers into the list of available serializer on the index definition. Add xml recors to created the backend and indexes...
@lmignon
Copy link
Collaborator Author

lmignon commented Aug 3, 2023

shopinvader_sale_channel_search_engine depends on

  • shopinvader_search_engine
  • sale_channel_search_engine_product
  • sale_channel_search_engine_Category -> name category must translatable -> ?name_get and name_search to adapt see how it's already done in shopinvader 14?

Missing on current PR's

  • sale_channel_search_engine_product -> sync on write - _se_martk_to_update
  • sale_channel_search_engine_category -> sync on write - _se_martk_to_update

New addons:

  • shopinvader_product (depends on product and base_url) redefine product and category to inherit from base url
    -> shopivnader_schema_product will depends on shopinvader_product.

Open question:

  • Auto bind category if not binded on products
  • Quid sale_channel_product_catalog

@hparfr
Copy link
Contributor

hparfr commented Sep 7, 2023

Hello,

My understanding is the following :

Product:
-1) a product is "available" or not is decided on the sale_channel ( directly or through a catalog (≃ assortment))
-1) a product is published if it's available on the sale_channel
-1) a product can be added (or not) to a cart by the customer is the same as 1) and can be extended by other modules / business rules (like qty in stock...)
-1) a product can be added by the backend (directly in so): always possible

Product template / product product

  • the main product.product (variant) is defined in a dedicated module (probably in oca/product-variant ?)

Informationnal fields:

  • seo title -> shopinvader/odoo-shopinvader/product_seo ?
  • short / long description -> oca/product-attibute/product_sale_description
  • prices for some pricelist -> shopinvader/odoo-shopinvader/product_multi_pricelist ?
  • url of the product -> shopinvader/odoo-shopinvader/shopinvader_product_url (or shopinvader_product_serializer?)

External representation for search engine (like elastic):

  • json representation -> ir.export (connector_search_engine_serializer_ir_export)
    - [ ] json representation -> pydantic (connectore_search_engine_serializer_pydantic) - do you need it ?

External representation for API call response (add_to_cart, checkout...) :

  • json representation in sale_order_line -> pydantic: shopivnader_schema_product ?
  • json representation in delivery / helpdesk / invoices / etc. -> pydantic

Behavior:

  • ensure the customer has right to add the product into his cart : shopinvader_(rest|fast)api ?

Open question: Auto bind category if not binded on products + sale_channel_product_catalog

In sale_channel_product_catalog , a parent (root_category_id) is set on a sale_channel, then its children are binded.
The common use case will be to dedicate a tree of categories for e-commerce.

@qgroulard
Copy link
Contributor

Hi,
I just pushed to #1390.
I think we have now a first version ready for a first round of review @lmignon @sebastienbeau.

@hparfr This PR solves some of the points you mentioned. And you can also find a PR for the url here #1399.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants