ligbox-ops-platform/specs/043-desk-client-activation-sync/tasks.md
Ligbox Spec Hub c815a32bbc feat(desk): Spec 043 Fases 2–6 — activar conta FOSS/OpenPanel/Odoo
Orquestra create_client/order FOSS, bridge OpenPanel com metadata,
upsert res.partner Odoo, mail-bundle wizard e webhook order-activated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 15:19:54 +00:00

41 lines
1.6 KiB
Markdown

# Spec 043 — Tasks
## Documentação
- [x] Spec índice `spec.md`
- [x] Contrato `activation-field-mapping.md`
- [x] Contrato API `desk-activate-account-api.md`
- [x] Ligações cruzadas specs 023/024/028/035
- [x] Registo em `SPEC-REGISTRY.md`
- [x] `ROLLBACK.md` com tags Git
## Fase 1 — Desk preview UI
- [x] `GET /billing/accounts/{id}/activation-preview`
- [x] Botão **Activar conta** em `billing-ui.js` (só roles autorizados)
- [x] Modal confirmação com 3 colunas FOSS / OpenPanel / Odoo
- [ ] Deploy VM122 + validação Roger (teste manual)
## Fase 2 — FOSS client + order
- [x] `foss_client.create_client()` conforme mapa §4
- [x] `foss_client.create_order()` + activate hosting
- [x] Custom fields FOSS via `config` (domain, manager_*)
- [x] Persistir `external_customer_id` + `external_subscription_id`
## Fase 3 — OpenPanel
- [x] Bridge directo (`provision_user_safe`) + metadata JSON
- [x] Persistir `openpanel_username` em `company_profile_json`
- [x] Idempotência user exists
## Fase 4 — Odoo empresa
- [x] `odoo_client.upsert_customer_partner()` conforme mapa §6
- [x] Coluna `odoo_partner_id` em `billing_accounts`
- [x] Deep-link Odoo na ficha cliente
## Fase 5 — Wizard mail-bundle
- [x] `POST /billing/accounts/{id}/activate` com `provision_mail`
- [x] Webhook `POST /billing/webhook/foss/order-activated`
- [x] `wizard_client.provision_mail_bundle()` → VM112
## Fase 6 — Testes
- [x] Unit: `test_activation_mapper_043.py` (3)
- [x] Unit: `test_client_activation_043.py` (4) — happy path, idempotência FOSS, reject active
- [ ] E2E Roger: domínio teste wizard → activate → FOSS+OP+Odoo