feat: Montar creates the invoiced order card (front 7a.2b)

The montador sends each stamp to storage, splits the list into items of
at most 20 sources and 4000 copies, packs each one with the Site's engine
and creates the order in Arte recebida: typed customer, pickup, the Site's
table price, payment 'faturado', origin dropflow for Expedição and
atendimento otherwise. Until Dropstar decides, these orders do not go to
Tiny and the customer gets no paid e-mail. Vendedor and Expedição may now
upload through the operator upload routes (can_any).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-09 15:27:04 -03:00
parent 8993eb25db
commit 2c80de0c0a
11 changed files with 312 additions and 15 deletions

View File

@@ -286,6 +286,19 @@ class QuoteRequest(StrictModel):
raise ValueError('The delivery address CEP must be the CEP freight was quoted for')
return self
class MontadorOrder(StrictModel):
"""What the montador sends (front 7a.2b): the typed customer, pickup only
and loose artwork only; the server prices and approves it as a quote."""
request_key: UUID
customer: Customer
items: list[Item] = Field(min_length=1, max_length=30)
@model_validator(mode='after')
def loose_art_only(self):
if any(item.mode != 'avulsa' for item in self.items):
raise ValueError('O montador só monta artes avulsas.')
return self
class Review(StrictModel):
items: list[Item] = Field(min_length=1, max_length=30)