Skip to content

Commit

Permalink
[IMP] shopinvader_api_unit_request: Add request_partner_id to request…
Browse files Browse the repository at this point in the history
…ed sale line
  • Loading branch information
paradoxxxzero committed Mar 12, 2024
1 parent 0f56e58 commit 1782719
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions shopinvader_api_unit_request/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion shopinvader_unit_management/tests/test_unit_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# @author Florian Mounier <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.exceptions import AccessError

from .common import TestUnitManagementCommon

Expand Down

0 comments on commit 1782719

Please sign in to comment.