From 2308cf6432d5b8e71dcd7449fa82cfa9107a488d Mon Sep 17 00:00:00 2001 From: Quentin Groulard Date: Wed, 21 Feb 2024 19:21:31 +0100 Subject: [PATCH] [IMP] Shopinvader address: add mobile --- shopinvader_api_address/schemas.py | 4 ++++ shopinvader_schema_address/schemas.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/shopinvader_api_address/schemas.py b/shopinvader_api_address/schemas.py index 2bfe3fbf43..2478ed6727 100644 --- a/shopinvader_api_address/schemas.py +++ b/shopinvader_api_address/schemas.py @@ -16,6 +16,7 @@ class AddressCreate(StrictExtendableBaseModel, extra="ignore"): zip: str | None = None city: str | None = None phone: str | None = None + mobile: str | None = None email: str | None = None state_id: int | None = None country_id: int | None = None @@ -28,6 +29,7 @@ def to_res_partner_vals(self) -> dict: "zip": self.zip, "city": self.city, "phone": self.phone, + "mobile": self.mobile, "email": self.email, "state_id": self.state_id, "country_id": self.country_id, @@ -48,6 +50,7 @@ class AddressUpdate(StrictExtendableBaseModel, extra="ignore"): zip: str | None = None city: str | None = None phone: str | None = None + mobile: str | None = None email: str | None = None state_id: int | None = None country_id: int | None = None @@ -60,6 +63,7 @@ def to_res_partner_vals(self) -> dict: "zip": self.zip, "city": self.city, "phone": self.phone, + "mobile": self.mobile, "email": self.email, "state_id": self.state_id, "country_id": self.country_id, diff --git a/shopinvader_schema_address/schemas.py b/shopinvader_schema_address/schemas.py index 4f9246bbe3..f05f0e8aa5 100644 --- a/shopinvader_schema_address/schemas.py +++ b/shopinvader_schema_address/schemas.py @@ -12,6 +12,7 @@ class Address(StrictExtendableBaseModel): zip: str | None = None city: str | None = None phone: str | None = None + mobile: str | None = None email: str | None = None state_id: int | None = None country_id: int | None = None @@ -26,6 +27,7 @@ def from_res_partner(cls, odoo_rec): zip=odoo_rec.zip or None, city=odoo_rec.city or None, phone=odoo_rec.phone or None, + mobile=odoo_rec.mobile or None, email=odoo_rec.email or None, state_id=odoo_rec.state_id.id or None, country_id=odoo_rec.country_id.id or None,