Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] shopinvader_api_cart: improve convert_to_sale_write #1534

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shopinvader_api_cart/routers/cart.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,5 @@ def _update(self, partner, data, uuid):
cart = self.env["sale.order"]._find_open_cart(partner.id, uuid)
if not cart:
cart = self.env["sale.order"]._create_empty_cart(partner.id)
cart.write(data.convert_to_sale_write())
cart.write(data.convert_to_sale_write(cart))
return cart
2 changes: 1 addition & 1 deletion shopinvader_api_cart/schemas/cart.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CartUpdateInput(StrictExtendableBaseModel, extra="ignore"):
invoicing: InvoicingUpdateInfo | None = None
note: str | None = None

def convert_to_sale_write(self):
def convert_to_sale_write(self, cart):
vals = {}
data = self.model_dump(exclude_unset=True)
if "client_order_ref" in data:
Expand Down
Loading