# 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 - [x] 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] Contrato `contracts/mail-bundle-api.md` - [x] Código `mail_bundle.py` + `internal_provision.py` (repo) - [x] `POST /billing/accounts/{id}/activate` com `provision_mail` - [x] Webhook `POST /billing/webhook/foss/order-activated` - [x] `wizard_client.provision_mail_bundle()` → VM112 - [x] **Deploy VM112** — 2026-07-01 · `OPS_INTERNAL_TOKEN` + endpoint activo ## FOSS — produto ligbox-mail-business (VM123) - [x] Plano hosting hp_id=2 - [x] Produto FOSS product_id=3 slug `ligbox-mail-business` - [x] Script `deploy/vm123-finance-stack/create-foss-mail-business.sh` ## 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 - [x] E2E Roger: domínio teste wizard → activate → FOSS+OP+Odoo (dratcoin.com #2, 2026-07-01) ## Fase 7 — Webmail gate (company_gate) - [x] Contrato `contracts/webmail-release-gate.md` - [x] Backend VM112 `company_gate.py` + API `/gate/*` - [x] Aviso rodapé login Carbonio (`sync_webmail_user_notice`) - [x] `WebmailReleaseModal.jsx` no wizard onboarding - [ ] UI Painel Admin: banner + card «Activar webmail» em `DomainAdmin.jsx` - [ ] Desactivar «Abrir Webmail» sidebar até `webmail_released_at`