Skip to content

[ADD] marketplace product sync framework (Trendyol + Hepsiburada)#285

Open
yibudak wants to merge 1 commit into
16.0from
marketplace-product-sync
Open

[ADD] marketplace product sync framework (Trendyol + Hepsiburada)#285
yibudak wants to merge 1 commit into
16.0from
marketplace-product-sync

Conversation

@yibudak
Copy link
Copy Markdown
Member

@yibudak yibudak commented Apr 27, 2026

Summary

  • Adds a generic product-sync foundation in marketplace_integration_base (4 abstract mixins: product binding, category, brand, batch request) plus shared product.template fields for desi / warranty / lot / video URL, an image_url Char on base_multi_image.image for multi-image payloads, and a backend extension covering auto_export_products, auto_sync_stock_price, last_product_sync, etc.
  • Refactors trendyol_integration onto the new mixins and expands the v1 payload to include up to 8 images, lotNumber, deliveryOption{deliveryDuration, fastDeliveryType}, shipmentAddressId, returningAddressId, plus a category-level cargoCompanyId override; adds v2 endpoints (create_products_v2, update_approved_products, update_unapproved_products).
  • Builds the full Hepsiburada catalog + listing flow from scratch: mpop and listing service URLs, ~17 new client methods, hepsiburada.{category, brand, product.binding, batch.request} models, product-export + category-sync wizards, queue channels (root.hepsiburada.product / .stock), crons for stock-price sync and batch polling, ACLs, views, menus.
  • Adds is_published_trendyol / is_published_hepsiburada Booleans on product.template, product.product, product.category (mirrors the existing is_published pattern from altinkaya_ecommerce).
  • Drops all non-Turkish .po files and completes Turkish translations (1460 entries, including 146 already-Turkish legacy Altinkaya field labels passed through verbatim).

Test plan

  • Restart Odoo with -u marketplace_integration_base,trendyol_integration,hepsiburada_integration and confirm the upgrade completes without error.
  • Configure a Trendyol backend with the new fields (default_cargo_company_external_id, default_shipment_address_id, default_returning_address_id, default_delivery_duration, default_fast_delivery_type) and verify Test Connection passes.
  • Configure a Hepsiburada backend with the new listing defaults and verify Test Connection passes.
  • Run Sync Categories + Sync Brands on Trendyol; run the new HB category-sync wizard and verify categories + leaf attributes appear.
  • Mark a leaf category and a sample product+variants with is_published_trendyol / is_published_hepsiburada; set image_url on a few base_multi_image.image records.
  • Use the export wizards to create bindings; click Export to Trendyol / Submit to HB Catalog and confirm the queue jobs hit the marketplace APIs and create batch_request rows.
  • Confirm Trendyol payload contains up to 8 images, lotNumber, deliveryOption; confirm HB payload contains Image1..Image5, Marka, GarantiSuresi.
  • Trigger the stock/price sync crons and verify only delta records are sent (last_sent_quantity / last_sent_price machinery).
  • Toggle a product's is_published_trendyol = False and confirm it falls out of the export domain.
  • Verify pre-commit run -a passes on repos/odoo-addons/.

🤖 Generated with Claude Code

Pull common product-sync logic into marketplace_integration_base via four
abstract mixins (product binding, category, brand, batch request) so future
marketplaces plug in cleanly. Add product.template fields for desi /
warranty / lot / video URL, an image_url Char on base_multi_image.image to
drive multi-image payloads, and is_published_<marketplace> Booleans on
template / product / category mirroring altinkaya_ecommerce's is_published.

trendyol_integration: refactor binding/category/brand/batch onto the new
mixins, expand the create payload to include up to 8 images, lotNumber,
deliveryOption, shipmentAddressId/returningAddressId, and a category-level
cargoCompanyId override; add v2 API endpoints (create / content-bulk-update
/ content-update); add backend defaults for shipment/returning addresses
and delivery duration.

hepsiburada_integration: build the full catalog + listing flow from
scratch -- mpop and listing service URLs, ~17 new client methods covering
products/import (multipart), product-status polling, all listing uploads,
activate/deactivate; new hepsiburada.category (with attribute + value
sub-models), hepsiburada.brand, hepsiburada.product.binding,
hepsiburada.batch.request; product export and category sync wizards;
queue channels root.hepsiburada.product / .stock; crons for stock-price
sync and batch polling; ACLs and views for all new models plus menus.

Translations: drop all non-Turkish .po files and complete tr.po for the
three modules (1460 entries filled, including 146 already-Turkish legacy
Altinkaya field labels passed through verbatim).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant