Skip to content

Commit

Permalink
[IMP] shopinvader product variant_count
Browse files Browse the repository at this point in the history
We used to have a 'variant_count' field related to 'product_variant_count'.
I don't think this is necessary anymore, we can refer to 'product_variant_count' in the schema.
  • Loading branch information
qgroulard committed Aug 30, 2023
1 parent 51dad60 commit 9a7444e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shopinvader_product/schemas/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ShopinvaderVariant(StrictExtendableBaseModel):
main: bool = False
full_name: str | None = None
short_name: str | None = None
variant_count: int | None = None
variant_count: int = 0
categories: list[ShortShopinvaderCategory] = []
sku: str | None = None
variant_attributes: dict[str:Any] = {}
Expand All @@ -45,7 +45,7 @@ def from_shopinvader_variant(cls, odoo_rec):
main=odoo_rec.main,
full_name=odoo_rec.name or None,
short_name=odoo_rec.short_name or None,
variant_count=odoo_rec.variant_count or None,
variant_count=odoo_rec.product_variant_count,
categories=[
ShortShopinvaderCategory.from_shopinvader_category(shopinvader_category)
for shopinvader_category in odoo_rec.shopinvader_categ_ids
Expand Down

0 comments on commit 9a7444e

Please sign in to comment.