Skip to content

Commit

Permalink
[IMP] Shopinvader address: add mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
qgroulard committed Feb 21, 2024
1 parent 5e49856 commit 2308cf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shopinvader_api_address/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions shopinvader_schema_address/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 2308cf6

Please sign in to comment.