[DTP-Worker] Sprint 4 · Générateur DocType porteur OTO Dossier Vente (complète hand-off workflow vente)

DocType custom cible du Workflow OTO Vente Pipeline. Cross-cohérence
workflow↔DocType : nom/champ d'état/valeurs de statut/is_submittable/permissions
tous dérivés de workflow_vente_spec.json (source unique, anti-dérive). Rôles
résolus via rbac_50_roles.json (#6). CLI build|validate · 12 invariants · 31
tests. Job CI crm-dossier-vente-tests ajouté au gate. Régression 177 tests verts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Code DTP Worker
2026-07-30 06:09:36 +00:00
parent 34f202af40
commit c23dfc24a5
14 changed files with 1668 additions and 1 deletions
@@ -0,0 +1,93 @@
{
"generated_from": "doctype_spec.json",
"workflow_source": "workflow_vente_spec.json",
"rbac_source": "rbac_50_roles.json",
"source_version": "1.0.0",
"workflow_version": "1.0.0",
"doctype_name": "OTO Dossier Vente",
"custom": true,
"is_submittable": true,
"workflow_state_field": "workflow_state",
"pipeline_value_field": "statut_pipeline",
"counts": {
"fields": 30,
"data_fields": 23,
"sections": 7,
"permissions": 7,
"pipeline_states": 9,
"pipeline_values": 9
},
"module_a_confirmer": "OTO Ventes",
"doctypes_lies_a_confirmer": [
"Customer",
"Lead",
"User"
],
"roles_rbac_utilises": [
{
"role_id": "direction-cco",
"erpnext_role_name": "OTO Direction Commerciale",
"permissions": [
"amend",
"cancel",
"read"
]
},
{
"role_id": "ventes-chef-equipe",
"erpnext_role_name": "OTO Ventes Chef Équipe",
"permissions": [
"create",
"read",
"write"
]
},
{
"role_id": "ventes-confotur",
"erpnext_role_name": "OTO Ventes CONFOTUR",
"permissions": [
"read",
"submit",
"write"
]
},
{
"role_id": "ventes-conseiller",
"erpnext_role_name": "OTO Ventes Conseiller",
"permissions": [
"create",
"read",
"write"
]
},
{
"role_id": "ventes-contrats",
"erpnext_role_name": "OTO Ventes Contrats",
"permissions": [
"read",
"submit",
"write"
]
},
{
"role_id": "ventes-directeur",
"erpnext_role_name": "OTO Ventes Directeur",
"permissions": [
"amend",
"cancel",
"read",
"write"
]
},
{
"role_id": "ventes-reservations",
"erpnext_role_name": "OTO Ventes Réservations",
"permissions": [
"read",
"submit",
"write"
]
}
],
"hand_off_vps": "Importer ce DocType (bench migrate / import-fixtures) AVANT le Workflow 'OTO Vente Pipeline' qui le cible (crm/workflow_vente/out/)."
}
@@ -0,0 +1,279 @@
{
"doctype": "DocType",
"name": "OTO Dossier Vente",
"module": "OTO Ventes",
"custom": 1,
"is_submittable": 1,
"naming_rule": "By \"Naming Series\" field",
"autoname": "naming_series:",
"title_field": "prospect",
"search_fields": "prospect,projet,workflow_state",
"track_changes": 1,
"track_seen": 1,
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"naming_series",
"sb_pipeline",
"workflow_state",
"statut_pipeline",
"sb_prospect___client_0",
"prospect",
"client",
"conseiller",
"sb_projet___unit_1",
"projet",
"unite",
"typologie",
"sb_financier_2",
"devise",
"prix_liste",
"montant_reservation",
"montant_contrat",
"sb_jalons__dates_3",
"date_lead",
"date_visite",
"date_devis",
"date_reservation",
"date_contrat",
"sb_confotur_4",
"confotur_reference",
"date_confotur_depot",
"date_confotur_approbation",
"confotur_notes",
"sb_cl_ture_5",
"motif_perte"
],
"fields": [
{
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Série de nommage",
"options": "OTO-DV-.YYYY.-",
"default": "OTO-DV-.YYYY.-",
"read_only": 1
},
{
"fieldname": "sb_pipeline",
"fieldtype": "Section Break",
"label": "Pipeline"
},
{
"fieldname": "workflow_state",
"fieldtype": "Select",
"label": "État du workflow",
"options": "\nLead\nVisite planifiée\nDevis émis\nRéservation confirmée\nContrat signé\nCONFOTUR déposé\nCONFOTUR approuvé\nAbandonné\nPerdu",
"read_only": 1,
"in_list_view": 1,
"in_standard_filter": 1
},
{
"fieldname": "statut_pipeline",
"fieldtype": "Select",
"label": "Statut pipeline (machine)",
"options": "\nlead\nvisite\ndevis\nreservation\ncontrat\nconfotur_depose\nconfotur_approuve\nabandonne\nperdu",
"read_only": 1,
"hidden": 1
},
{
"fieldname": "sb_prospect___client_0",
"fieldtype": "Section Break",
"label": "Prospect & Client"
},
{
"fieldname": "prospect",
"fieldtype": "Link",
"label": "Prospect",
"options": "Lead",
"reqd": 1,
"in_list_view": 1,
"in_standard_filter": 1
},
{
"fieldname": "client",
"fieldtype": "Link",
"label": "Client (après conversion)",
"options": "Customer"
},
{
"fieldname": "conseiller",
"fieldtype": "Link",
"label": "Conseiller ventes",
"options": "User",
"in_standard_filter": 1
},
{
"fieldname": "sb_projet___unit_1",
"fieldtype": "Section Break",
"label": "Projet & Unité"
},
{
"fieldname": "projet",
"fieldtype": "Select",
"label": "Projet",
"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",
"fieldtype": "Data",
"label": "Unité (code)",
"in_list_view": 1
},
{
"fieldname": "typologie",
"fieldtype": "Data",
"label": "Typologie"
},
{
"fieldname": "sb_financier_2",
"fieldtype": "Section Break",
"label": "Financier"
},
{
"fieldname": "devise",
"fieldtype": "Select",
"label": "Devise",
"options": "USD\nDOP",
"default": "USD",
"reqd": 1
},
{
"fieldname": "prix_liste",
"fieldtype": "Currency",
"label": "Prix de liste",
"options": "devise"
},
{
"fieldname": "montant_reservation",
"fieldtype": "Currency",
"label": "Dépôt de réservation",
"options": "devise"
},
{
"fieldname": "montant_contrat",
"fieldtype": "Currency",
"label": "Montant du contrat",
"options": "devise"
},
{
"fieldname": "sb_jalons__dates_3",
"fieldtype": "Section Break",
"label": "Jalons (dates)"
},
{
"fieldname": "date_lead",
"fieldtype": "Date",
"label": "Date lead"
},
{
"fieldname": "date_visite",
"fieldtype": "Date",
"label": "Date visite"
},
{
"fieldname": "date_devis",
"fieldtype": "Date",
"label": "Date devis"
},
{
"fieldname": "date_reservation",
"fieldtype": "Date",
"label": "Date réservation"
},
{
"fieldname": "date_contrat",
"fieldtype": "Date",
"label": "Date contrat"
},
{
"fieldname": "sb_confotur_4",
"fieldtype": "Section Break",
"label": "CONFOTUR"
},
{
"fieldname": "confotur_reference",
"fieldtype": "Data",
"label": "Référence CONFOTUR"
},
{
"fieldname": "date_confotur_depot",
"fieldtype": "Date",
"label": "Date dépôt CONFOTUR"
},
{
"fieldname": "date_confotur_approbation",
"fieldtype": "Date",
"label": "Date approbation CONFOTUR"
},
{
"fieldname": "confotur_notes",
"fieldtype": "Small Text",
"label": "Notes CONFOTUR"
},
{
"fieldname": "sb_cl_ture_5",
"fieldtype": "Section Break",
"label": "Clôture"
},
{
"fieldname": "motif_perte",
"fieldtype": "Small Text",
"label": "Motif de perte / abandon"
}
],
"permissions": [
{
"role": "OTO Direction Commerciale",
"permlevel": 0,
"read": 1,
"cancel": 1,
"amend": 1
},
{
"role": "OTO Ventes CONFOTUR",
"permlevel": 0,
"read": 1,
"write": 1,
"submit": 1
},
{
"role": "OTO Ventes Chef Équipe",
"permlevel": 0,
"read": 1,
"write": 1,
"create": 1
},
{
"role": "OTO Ventes Conseiller",
"permlevel": 0,
"read": 1,
"write": 1,
"create": 1
},
{
"role": "OTO Ventes Contrats",
"permlevel": 0,
"read": 1,
"write": 1,
"submit": 1
},
{
"role": "OTO Ventes Directeur",
"permlevel": 0,
"read": 1,
"write": 1,
"cancel": 1,
"amend": 1
},
{
"role": "OTO Ventes Réservations",
"permlevel": 0,
"read": 1,
"write": 1,
"submit": 1
}
]
}