From de25f2911a52d0dc206dfa09c3aa81eea8f3270b Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Tue, 12 Mar 2024 16:25:44 +0100 Subject: [PATCH] [IMP] shopinvader_api_unit_request: Add request_partner_id to requested sale line --- shopinvader_api_unit_request/schemas.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shopinvader_api_unit_request/schemas.py b/shopinvader_api_unit_request/schemas.py index 2ce422d6e5..04a02c011b 100644 --- a/shopinvader_api_unit_request/schemas.py +++ b/shopinvader_api_unit_request/schemas.py @@ -17,12 +17,14 @@ class RejectRequest(StrictExtendableBaseModel, extra="ignore"): class RequestedSaleLine(SaleLineWithSale): + partner_id: int request_rejected: bool request_rejection_reason: str | None = None @classmethod def from_sale_order_line(cls, odoo_rec): res = super().from_sale_order_line(odoo_rec) + res.partner_id = odoo_rec.request_partner_id.id res.request_rejected = odoo_rec.request_rejected res.request_rejection_reason = odoo_rec.request_rejection_reason or None return res