P0: Fix sale.order creation (was completely broken)
- Corrected M2M junction table name from sale_order_line_account_tax_rel
to account_tax_sale_order_line_rel (ORM sorts alphabetically)
- Added fallback in BeforeCreate if sequence generation fails
P1: Add display_name as magic field on ALL models
- Added to addMagicFields() in pkg/orm/model.go (like Python BaseModel)
- Computed on-the-fly in Read() from recName field, no DB column
- Removed explicit display_name from res.partner (now auto-inherited)
P2: Add DefaultGet hooks for sale.order and purchase.order
- Sets company_id, currency_id, date_order/date_planned from environment
- Follows same pattern as account.move's DefaultGet
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- res.users.action_get() RPC: returns preferences action (form dialog)
- /web/session/account endpoint: returns Odoo.com account URL
- /web/session/logout: clears session, redirects to login (was already done)
- support_url set to odoo.com/help (enables Help menu item)
- notification_type + display_switch_company_menu in session_info
- Image handler: path-style URL parsing for avatars
All user dropdown items now work:
Help → opens odoo.com/help
Shortcuts → opens command palette (client-side)
My Preferences → opens user form dialog
My Odoo.com Account → opens accounts.odoo.com
Log out → clears session, redirects to login
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Image handler now returns SVG placeholders for company logo and user
avatars instead of broken 1x1 PNG (fixes yellow border in navbar)
- Supports both query-param (?model=&field=) and path-style URLs
(/web/image/res.partner/2/avatar_128)
- Added Settings app menu with Users & Technical sub-menus
- Added actions for Settings (company form), Users list, Sequences
- Added /web/session/logout handler that clears session + cookie
- Added logout to middleware whitelist
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Copy build/odoo_web.css to frontend/web/static/ so it's served correctly
- Handle /odoo/<addon>/static/ paths in static file handler (strip odoo/ prefix)
- Route /odoo/ paths with /static/ to static handler instead of webclient
All CSS now loads correctly: Bootstrap, FontAwesome, Odoo UI icons, modules.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The injectXmlSpacePreserve function was inserting the attribute AFTER
the self-closing slash in tags like <t t-name="foo"/>, producing
invalid XML: <t t-name="foo"/ xml:space="preserve">
Now correctly inserts before the slash:
<t t-name="foo" xml:space="preserve"/>
This fixes the "attributes construct error at column 33" that appeared
as a red banner in the Odoo webclient list view.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Transpiler fixes:
- export function declarations now use hoisted function syntax instead
of var assignments, fixing modules that reference functions before
their declaration (e.g., rpc.setCache before export function rpc)
- Re-export paths (export { X } from "./relative") now resolve to
full module names in require() calls
DB seed fixes:
- Remove SQL comments from multi-value INSERT (pgx doesn't support --)
- Split multi-statement setval into individual Exec calls
Middleware:
- Add /web/database/* to public endpoint whitelist
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Improved auto-generated list/form/search views with priority fields,
two-column form layout, statusbar widget, notebook for O2M fields
- Enhanced fields_get with currency_field, compute, related metadata
- Fixed session handling: handleSessionInfo/handleSessionCheck use real
session from cookie instead of hardcoded values
- Added read_progress_bar and activity_format RPC stubs
- Improved bootstrap translations with lang_parameters
- Added "contacts" to session modules list
Server starts successfully: 14 modules, 93 models, 378 XML templates,
503 JS modules transpiled — all from local frontend/ directory.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>