Commit graph

6 commits

Author SHA1 Message Date
2fd8d7fa3b fix: migrate email template to Odoo 17 syntax; fix BDD LLM mock JSON
PRODUCTION BUG: email template used pre-Odoo-14 Mako syntax (${} and
% for/% if), which Odoo 17 does not render — real notification emails
would show literal '${object.blog_post_id.name}' in the subject.
- subject/email_from: ${...} → {{ ... }} (inline_template engine)
- body_html: add type="qweb"; ${x} → <t t-out="x"/>;
  % for → <t t-foreach t-as>; % if → <t t-if>

BDD: when_llm_router_called mocked provider.generate() returning raw
HTML in .text, but LLMRouter._parse_response expects JSON and raised
UserError before ctx['mock_generate'] was set. Now returns valid JSON
with all required fields, and records the mock before generate() runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 02:57:10 -04:00
57c06ce7cc fix: refactor email template to use for-loop iteration over social records 2026-05-30 00:13:00 -04:00
3fcbe7cddb fix: simplify email template to use direct inverse relationship 2026-05-30 00:07:24 -04:00
a283b3f460 fix: refactor email template with proper Mako syntax and test markers 2026-05-29 23:36:14 -04:00
f160f1c476 feat: add blog.post inverse relationship and simplify email template 2026-05-29 23:34:17 -04:00
0fc4febabf Reorganize codebase into Odoo addon structure per ARCHITECTURE.md
Restructure project files to follow the addon layout:
- Move models to addons/itsulu_blog_publisher/models/
- Move services (LLM providers, routers) to addons/itsulu_blog_publisher/services/
- Move wizards to addons/itsulu_blog_publisher/wizards/
- Move views (XML templates) to addons/itsulu_blog_publisher/views/
- Move data (cron, mail templates) to addons/itsulu_blog_publisher/data/
- Move security (ACL) to addons/itsulu_blog_publisher/security/
- Move tests and factories to addons/itsulu_blog_publisher/tests/
- Move BDD features to addons/itsulu_blog_publisher/features/
- Create __init__.py files for all Python packages

This enables proper Odoo module discovery and import structure.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-29 12:11:42 -04:00