odoo-shopinvader icon indicating copy to clipboard operation
odoo-shopinvader copied to clipboard

[16.0] shopinvader_search_engine: Migration from 14.0 + Refactoring

Open lmignon opened this issue 1 year ago • 4 comments

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 avatar Jul 28 '23 09:07 lmignon

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

lmignon avatar Aug 03 '23 12:08 lmignon

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 ?
  • [x] 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):

  • [x] 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.

hparfr avatar Sep 07 '23 09:09 hparfr

Hi, I just pushed to https://github.com/shopinvader/odoo-shopinvader/pull/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 https://github.com/shopinvader/odoo-shopinvader/pull/1399.

qgroulard avatar Sep 07 '23 09:09 qgroulard