Skip to content

Commit 797a9ad

Browse files
committed
shopinvader_sale_schema: rebase and adapt schema due to rename
1 parent 22eeb72 commit 797a9ad

File tree

12 files changed

+23
-23
lines changed

12 files changed

+23
-23
lines changed

shopinvader_api_cart/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Shopinvader API Cart
33
====================
44

5-
..
5+
..
66
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:792f0721582c562cc8cfe12901de4f14675b05872328b4a45740e6d36d03c3ba
10+
!! source digest: sha256:fb9cf2727f9362d01ff445db7b0f4fec146b5ae940dc86bcd86f93f32d67f3db
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png

shopinvader_api_cart/schemas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
CartTransaction,
33
CartSyncInput,
44
CartUpdateInput,
5-
ShippingUpdateInfo,
5+
DeliveryUpdateInfo,
66
InvoicingUpdateInfo,
77
)
88
from .sale import Sale

shopinvader_api_cart/schemas/cart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CartSyncInput(StrictExtendableBaseModel):
1616
transactions: List[CartTransaction]
1717

1818

19-
class ShippingUpdateInfo(StrictExtendableBaseModel):
19+
class DeliveryUpdateInfo(StrictExtendableBaseModel):
2020
address_id: int
2121

2222

@@ -26,7 +26,7 @@ class InvoicingUpdateInfo(StrictExtendableBaseModel):
2626

2727
class CartUpdateInput(StrictExtendableBaseModel):
2828
client_order_ref: str | None = None
29-
delivery: ShippingUpdateInfo | None = None
29+
delivery: DeliveryUpdateInfo | None = None
3030
invoicing: InvoicingUpdateInfo | None = None
3131
note: str | None = None
3232

shopinvader_api_cart/static/description/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ <h1 class="title">Shopinvader API Cart</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:792f0721582c562cc8cfe12901de4f14675b05872328b4a45740e6d36d03c3ba
370+
!! source digest: sha256:fb9cf2727f9362d01ff445db7b0f4fec146b5ae940dc86bcd86f93f32d67f3db
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_api_cart"><img alt="shopinvader/odoo-shopinvader" src="https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github" /></a></p>
373373
<p>This addon adds a web API on top of the sale.order model to ease the creation of

shopinvader_api_cart/tests/test_shopinvader_api_cart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def test_update(self) -> None:
427427
partner = self.default_fastapi_authenticated_partner
428428
address = self.env["res.partner"].create(
429429
{
430-
"name": "Shipping",
430+
"name": "Delivery",
431431
"parent_id": partner.id,
432432
"type": "delivery",
433433
}

shopinvader_schema_sale/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Shopinvader Schema Sale
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:b7a7593ab3d956ea3e0a59974fce3318d7fd7e9edd070764e31f1e45bd469489
10+
!! source digest: sha256:c8b7462f165d2fa1cabd4ae45966b2757853a772179d780733500f730d8de274
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
@@ -23,7 +23,7 @@ Shopinvader Schema Sale
2323
|badge1| |badge2| |badge3|
2424

2525
This addon adds pydantic schemas that represents Addresses.
26-
It introduces BillingAddress and ShippingAddress as sub classes of Address.
26+
It introduces InvoicingAddress and DeliveryAddress as sub classes of Address.
2727
It has been designed and thought to be used in shopinvader services.
2828

2929
.. IMPORTANT::
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This addon adds pydantic schemas that represents Addresses.
2-
It introduces BillingAddress and ShippingAddress as sub classes of Address.
2+
It introduces InvoicingAddress and DeliveryAddress as sub classes of Address.
33
It has been designed and thought to be used in shopinvader services.

shopinvader_schema_sale/schemas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .shipping import ShippingInfo
1+
from .delivery import DeliveryInfo
22
from .invoicing import InvoicingInfo
33
from .sale_order_line import SaleOrderLine
44
from .amount import SaleAmount

shopinvader_schema_sale/schemas/shipping.py renamed to shopinvader_schema_sale/schemas/delivery.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55

66
from odoo.addons.extendable_fastapi import StrictExtendableBaseModel
7-
from odoo.addons.shopinvader_schema_address.schemas import ShippingAddress
7+
from odoo.addons.shopinvader_schema_address.schemas import DeliveryAddress
88

99

10-
class ShippingInfo(StrictExtendableBaseModel):
11-
address: ShippingAddress | None = None
10+
class DeliveryInfo(StrictExtendableBaseModel):
11+
address: DeliveryAddress | None = None
1212

1313
@classmethod
1414
def from_sale_order(cls, odoo_rec):
1515
return cls.model_construct(
16-
address=(ShippingAddress.from_res_partner(odoo_rec.partner_shipping_id))
16+
address=(DeliveryAddress.from_res_partner(odoo_rec.partner_shipping_id))
1717
)

shopinvader_schema_sale/schemas/invoicing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55

66
from odoo.addons.extendable_fastapi import StrictExtendableBaseModel
7-
from odoo.addons.shopinvader_schema_address.schemas import BillingAddress
7+
from odoo.addons.shopinvader_schema_address.schemas import InvoicingAddress
88

99

1010
class InvoicingInfo(StrictExtendableBaseModel):
11-
address: BillingAddress | None = None
11+
address: InvoicingAddress | None = None
1212

1313
@classmethod
1414
def from_sale_order(cls, odoo_rec):
1515
return cls.model_construct(
16-
address=(BillingAddress.from_res_partner(odoo_rec.partner_invoice_id))
16+
address=(InvoicingAddress.from_res_partner(odoo_rec.partner_invoice_id))
1717
)

0 commit comments

Comments
 (0)