gsinghpal
e71cae6dc9
feat(billing): usage-rating + webhook-dispatch crons
...
- SaleOrder._fc_rate_usage: aggregates usage, computes overage via
charge._compute_billable, upserts sale.order.line for the overage product
- FusionBillingUsage._cron_rate_open_periods: hourly cron iterates active
charges × in-progress subscriptions, calls _fc_rate_usage
- data/ir_cron.xml: two crons — rate usage (hourly), dispatch webhooks (2 min)
- __manifest__.py: registers data/ir_cron.xml in data list
- test_usage.py: test_rate_open_period_creates_overage_line (TDD, FCB_EXIT=0)
Reference: _create_recurring_invoice / _get_invoiceable_lines confirmed in
Enterprise sale_subscription/models/sale_order.py — overage line goes onto
sale.order so native invoicing picks it up via _get_invoiceable_lines.
2026-05-27 03:08:45 -04:00
gsinghpal
b3b3e61f01
feat(billing): outbound webhook engine (HMAC + retry/backoff)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-27 03:04:05 -04:00
gsinghpal
b47af5aea4
feat(billing): subscription creation handler (sale.order is_subscription)
...
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-27 02:59:17 -04:00
gsinghpal
4e8638e3a5
feat(billing): inbound API handlers (customer/usage/catalog)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-27 02:56:04 -04:00
gsinghpal
e7f6e46d09
feat(billing): period usage aggregation by metric function
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-27 02:53:47 -04:00
gsinghpal
4ecc1a3aaa
feat(billing): idempotent usage ingestion
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-27 02:52:05 -04:00
gsinghpal
b3bc6ce342
feat(billing): metered charge math (quota + overage)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-27 02:50:14 -04:00
gsinghpal
e532b30d11
feat(billing): identity resolution external account -> partner
2026-05-27 02:47:27 -04:00
gsinghpal
08e528e5be
feat(billing): service API-key generation + matching
...
Add _match_api_key() class method to fusion.billing.service, with a
TDD test suite (TestServiceApiKey) covering key generation, hash storage,
positive match, and rejection of bad/inactive keys. Also fix
fcb_test_on_trial.sh to use --http-port 8070, as Odoo 19 forces
http_spawn() even under --no-http when --test-enable is set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-27 02:44:30 -04:00