-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.addons.search_engine_serializer_pydantic.tools.serializer import ( | ||
PydanticModelSerializer, | ||
) | ||
from odoo.addons.shopinvader_product.schemas.category import ShopinvaderCategory | ||
|
||
|
||
class ProductCategoryShopinvaderSerializer: | ||
class ProductCategoryShopinvaderSerializer(PydanticModelSerializer): | ||
def get_model_class(self): | ||
return ShopinvaderCategory | ||
|
||
def serialize(self, record): | ||
return ShopinvaderCategory.from_shopinvader_category(record) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.addons.search_engine_serializer_pydantic.tools.serializer import ( | ||
PydanticModelSerializer, | ||
) | ||
from odoo.addons.shopinvader_product.schemas.product import ShopinvaderVariant | ||
|
||
|
||
class ProductProductShopinvaderSerializer: | ||
class ProductProductShopinvaderSerializer(PydanticModelSerializer): | ||
def get_model_class(self): | ||
return ShopinvaderVariant | ||
|
||
def serialize(self, record): | ||
return ShopinvaderVariant.from_shopinvader_variant(record) |