feat: add communication history push, invoice auto-trigger, health checks, rate limiting

- Override account.move action_post to auto-push invoice PDF to WC on posting
- Add _cron_health_check to ping all instances and flag unreachable ones
- Add health check cron record (every 10 minutes) to data/cron.xml
- Add IP-based rate limiting (100 req/min) to webhook controller
- Fill in API endpoints: order/documents, order/status, order/messages
  with real data from woo.order, stock.picking, and mail.message
- Implement return/create API endpoint with product mapping and line creation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-03-31 21:02:15 -04:00
parent cc35c28760
commit ad50c579c3
4 changed files with 205 additions and 28 deletions

View File

@@ -44,6 +44,17 @@
<field name="active">True</field>
</record>
<record id="cron_woo_health_check" model="ir.cron">
<field name="name">WooCommerce: Health Check</field>
<field name="model_id" ref="model_woo_instance"/>
<field name="state">code</field>
<field name="code">model._cron_health_check()</field>
<field name="interval_number">10</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="active">True</field>
</record>
<record id="cron_woo_cleanup_logs" model="ir.cron">
<field name="name">WooCommerce: Cleanup Old Sync Logs</field>
<field name="model_id" ref="model_woo_sync_log"/>