from pydantic import BaseModel from typing import Optional, List class SaleOrderLine(BaseModel): id: int product_id: int product_name: str quantity: float price_unit: float price_subtotal: float class SaleOrderResponse(BaseModel): id: int name: str state: str state_display: str partner_id: int partner_name: str date_order: Optional[str] = None amount_total: float amount_untaxed: float amount_tax: float currency: str order_lines: List[SaleOrderLine] = [] class SaleOrderSearchResult(BaseModel): id: int name: str state: str date_order: Optional[str] = None amount_total: float class QuotationCreate(BaseModel): partner_id: int lines: List[dict] note: Optional[str] = None