[DTP-Worker] Sprint 5 · Générateur DocType CONFOTUR Application (ONAPI/Legal · roadmap L55)

DocType custom porteur des dossiers d'incitation touristique CONFOTUR (Ley
158-01, RD), référencé par RBAC (3 rôles) et le workflow vente mais jamais
généré. Permissions = permissions_cibles RBAC mot pour mot ; is_submittable
déduit de l'action submit ; estado/dossier_vente dérivés du workflow ; aucun
taux/loi/montant fabriqué (#6). 14 invariants, 44 tests, hand-off dans out/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Code DTP Worker
2026-07-30 08:09:41 +00:00
parent c0d2e21ef3
commit 35a20247f8
15 changed files with 1810 additions and 1 deletions
@@ -0,0 +1,82 @@
{
"generated_from": "confotur_spec.json",
"rbac_source": "rbac_50_roles.json",
"workflow_source": "crm/workflow_vente/workflow_vente_spec.json",
"source_version": "1.0.0",
"rbac_version": "1.0.0",
"workflow_version": "1.0.0",
"doctype_name": "CONFOTUR Application",
"custom": true,
"is_submittable": true,
"counts": {
"fields": 18,
"data_fields": 14,
"sections": 4,
"permissions": 3,
"roles": 3,
"depot_events": 2
},
"module_a_confirmer": "OTOV7 CONFOTUR",
"doctypes_lies_a_confirmer": [
"Customer",
"OTO Dossier Vente",
"Project"
],
"roles_rbac_utilises": [
{
"role_id": "legal-directeur",
"erpnext_role_name": "OTO Legal Directeur",
"portail": "direction",
"permissions": [
"read",
"report",
"submit",
"write"
],
"custom": true
},
{
"role_id": "legal-onapi",
"erpnext_role_name": "OTO Legal ONAPI",
"portail": "direction",
"permissions": [
"create",
"read",
"write"
],
"custom": true
},
{
"role_id": "ventes-confotur",
"erpnext_role_name": "OTO Ventes CONFOTUR",
"portail": "ventes",
"permissions": [
"create",
"print",
"read",
"write"
],
"custom": true
}
],
"depot_events": [
{
"action": "Approuver CONFOTUR",
"next_state": "CONFOTUR approuvé",
"update_value": "confotur_approuve",
"role_id": "ventes-confotur",
"erpnext_role_name": "OTO Ventes CONFOTUR",
"portail": "ventes"
},
{
"action": "Déposer CONFOTUR",
"next_state": "CONFOTUR déposé",
"update_value": "confotur_depose",
"role_id": "ventes-confotur",
"erpnext_role_name": "OTO Ventes CONFOTUR",
"portail": "ventes"
}
],
"note_anti_invention": "Aucun taux d'incitation, article de loi, montant ni reference d'autorite CONFOTUR n'est encode (#6). Ces valeurs restent vides jusqu'a confirmation de l'agent ONAPI/Legal depuis data_room P05/P07.",
"hand_off_vps": "Creer le module Frappe 'OTOV7 CONFOTUR' puis importer ce DocType (bench migrate / import-fixtures) AVANT de cabler les evenements de depot du Workflow 'OTO Vente Pipeline' (crm/workflow_vente/out/)."
}
@@ -0,0 +1,172 @@
{
"doctype": "DocType",
"name": "CONFOTUR Application",
"module": "OTOV7 CONFOTUR",
"custom": 1,
"is_submittable": 1,
"naming_rule": "By \"Naming Series\" field",
"autoname": "naming_series:",
"title_field": "projet",
"search_fields": "projet,dossier_vente,referencia_autoridad",
"track_changes": 1,
"track_seen": 1,
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"naming_series",
"sb_identification_0",
"projet",
"dossier_vente",
"cliente",
"entite_porteuse",
"sb_incitation_confotur__ley_158_01_1",
"referencia_autoridad",
"fecha_deposito",
"fecha_aprobacion",
"sb_pieces_du_dossier__suivi_interne_2",
"piece_titularidad",
"piece_faisabilite",
"piece_identidad_cliente",
"piece_descriptivo_proyecto",
"sb_statut___suivi_3",
"estado",
"notas"
],
"fields": [
{
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Serie de nommage",
"options": "CONF-.YYYY.-",
"default": "CONF-.YYYY.-",
"read_only": 1
},
{
"fieldname": "sb_identification_0",
"fieldtype": "Section Break",
"label": "Identification"
},
{
"fieldname": "projet",
"fieldtype": "Link",
"label": "Projet",
"options": "Project",
"reqd": 1,
"in_list_view": 1,
"in_standard_filter": 1
},
{
"fieldname": "dossier_vente",
"fieldtype": "Link",
"label": "Dossier de vente",
"options": "OTO Dossier Vente",
"in_standard_filter": 1
},
{
"fieldname": "cliente",
"fieldtype": "Link",
"label": "Client",
"options": "Customer"
},
{
"fieldname": "entite_porteuse",
"fieldtype": "Select",
"label": "Entite porteuse",
"options": "WAF\nWA SRL\nAC Arias Cuevas\nConsortium ECR DR\nHelios RD\nPloutos\n9060 QC",
"reqd": 1,
"in_standard_filter": 1
},
{
"fieldname": "sb_incitation_confotur__ley_158_01_1",
"fieldtype": "Section Break",
"label": "Incitation CONFOTUR (Ley 158-01)"
},
{
"fieldname": "referencia_autoridad",
"fieldtype": "Data",
"label": "Reference dossier (autorite CONFOTUR)",
"read_only": 1,
"in_list_view": 1
},
{
"fieldname": "fecha_deposito",
"fieldtype": "Date",
"label": "Date de depot",
"read_only": 1
},
{
"fieldname": "fecha_aprobacion",
"fieldtype": "Date",
"label": "Date d'approbation",
"read_only": 1
},
{
"fieldname": "sb_pieces_du_dossier__suivi_interne_2",
"fieldtype": "Section Break",
"label": "Pieces du dossier (suivi interne)"
},
{
"fieldname": "piece_titularidad",
"fieldtype": "Check",
"label": "Titre de propriete / titularite"
},
{
"fieldname": "piece_faisabilite",
"fieldtype": "Check",
"label": "Faisabilite 4 volets jointe"
},
{
"fieldname": "piece_identidad_cliente",
"fieldtype": "Check",
"label": "Pieces d'identite client"
},
{
"fieldname": "piece_descriptivo_proyecto",
"fieldtype": "Check",
"label": "Descriptif du projet touristique"
},
{
"fieldname": "sb_statut___suivi_3",
"fieldtype": "Section Break",
"label": "Statut & suivi"
},
{
"fieldname": "estado",
"fieldtype": "Select",
"label": "Statut du depot",
"options": "\nconfotur_depose\nconfotur_approuve",
"in_list_view": 1,
"in_standard_filter": 1
},
{
"fieldname": "notas",
"fieldtype": "Small Text",
"label": "Notes"
}
],
"permissions": [
{
"role": "OTO Legal Directeur",
"permlevel": 0,
"read": 1,
"write": 1,
"submit": 1,
"report": 1
},
{
"role": "OTO Legal ONAPI",
"permlevel": 0,
"read": 1,
"write": 1,
"create": 1
},
{
"role": "OTO Ventes CONFOTUR",
"permlevel": 0,
"read": 1,
"write": 1,
"create": 1,
"print": 1
}
]
}