{
  "version": "1.0.0",
  "doctype": {
    "module": "OTO Ventes",
    "naming_series": "OTO-DV-.YYYY.-",
    "title_field": "prospect",
    "search_fields": "prospect,projet,workflow_state",
    "track_changes": 1,
    "track_seen": 1
  },
  "_comment": "Contrat métier du DocType porteur du pipeline vente (roadmap Sprint 4 · CRM natif ERPNext #3). Ne definit QUE la structure (libelles + types de champ) : aucun chiffre n'est peuple (#6). Les champs de pilotage du workflow (`workflow_state` + le champ de valeur machine `statut_pipeline`) NE sont PAS listes ici : le builder les injecte depuis workflow_vente_spec.json (source unique, anti-derive). Les Select `projet`/`devise` sont ancres sur CLAUDE.md (P01..P09 · USD/DOP), pas inventes.",
  "field_groups": [
    {
      "section": "Prospect & Client",
      "fields": [
        { "fieldname": "prospect", "label": "Prospect", "fieldtype": "Link", "options": "Lead", "reqd": 1, "in_list_view": 1, "in_standard_filter": 1 },
        { "fieldname": "client", "label": "Client (après conversion)", "fieldtype": "Link", "options": "Customer" },
        { "fieldname": "conseiller", "label": "Conseiller ventes", "fieldtype": "Link", "options": "User", "in_standard_filter": 1 }
      ]
    },
    {
      "section": "Projet & Unité",
      "fields": [
        { "fieldname": "projet", "label": "Projet", "fieldtype": "Select", "options": "\nP01 Structure\nP02 Coral del Sur\nP03 Nakua\nP04 Xamaná Cantiles\nP05 Las Colinas Najayo Arriba\nP06 Coco Real\nP07 Aqua Terra Las Terrenas\nP08 Fasano Espirilla\nP09 1069 Crisfer", "reqd": 1, "in_list_view": 1, "in_standard_filter": 1 },
        { "fieldname": "unite", "label": "Unité (code)", "fieldtype": "Data", "in_list_view": 1 },
        { "fieldname": "typologie", "label": "Typologie", "fieldtype": "Data" }
      ]
    },
    {
      "section": "Financier",
      "fields": [
        { "fieldname": "devise", "label": "Devise", "fieldtype": "Select", "options": "USD\nDOP", "default": "USD", "reqd": 1 },
        { "fieldname": "prix_liste", "label": "Prix de liste", "fieldtype": "Currency", "options": "devise" },
        { "fieldname": "montant_reservation", "label": "Dépôt de réservation", "fieldtype": "Currency", "options": "devise" },
        { "fieldname": "montant_contrat", "label": "Montant du contrat", "fieldtype": "Currency", "options": "devise" }
      ]
    },
    {
      "section": "Jalons (dates)",
      "fields": [
        { "fieldname": "date_lead", "label": "Date lead", "fieldtype": "Date" },
        { "fieldname": "date_visite", "label": "Date visite", "fieldtype": "Date" },
        { "fieldname": "date_devis", "label": "Date devis", "fieldtype": "Date" },
        { "fieldname": "date_reservation", "label": "Date réservation", "fieldtype": "Date" },
        { "fieldname": "date_contrat", "label": "Date contrat", "fieldtype": "Date" }
      ]
    },
    {
      "section": "CONFOTUR",
      "fields": [
        { "fieldname": "confotur_reference", "label": "Référence CONFOTUR", "fieldtype": "Data" },
        { "fieldname": "date_confotur_depot", "label": "Date dépôt CONFOTUR", "fieldtype": "Date" },
        { "fieldname": "date_confotur_approbation", "label": "Date approbation CONFOTUR", "fieldtype": "Date" },
        { "fieldname": "confotur_notes", "label": "Notes CONFOTUR", "fieldtype": "Small Text" }
      ]
    },
    {
      "section": "Clôture",
      "fields": [
        { "fieldname": "motif_perte", "label": "Motif de perte / abandon", "fieldtype": "Small Text" }
      ]
    }
  ]
}
