Adds pc_tech_support product category (parent: Services, income default:
4230 Technical Support — Per-incident / Hourly Revenue). Existing
categories had no hourly-tech-support slot; SETUP-type hourly billing
products go here.
Also repoints the 17 product lines of invoice 1127 (Electroless Nickel
Technologies, ,985.48, posted 2026-04-29) from the legacy account
412000 to the correct Nexa accounts via direct UPDATE on
account_move_line:
13 hardware lines (Lenovo, RTX, NAS drives, cabinets, UPS, ...)
-> 4320 Hardware Resale Revenue
4 SETUP hours lines (Cloud / Security / NAS / Network setup)
-> 4230 Technical Support — Per-incident / Hourly Revenue
Invoice totals, tax, payment, customer PDF all unchanged.
Reassigns 14 product templates (P620, CUSPC, SETUP, etc.) to use the
new categories so future invoices auto-route correctly:
Hardware SKUs -> pc_resale_hardware
SETUP -> pc_tech_support
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Final batch of code conversions — 12 l10n_ca accounts that we kept active
because they have historical postings. Renaming preserves all FK
references (account_id stays the same), just changes the displayed code.
112005 Scotia Current 9309 -> 1010 (primary operating bank)
112004 BMO -> 1030
112007 RBC -> 1040
112008 Scotia Credit Card 5890 -> 1070
112006 RBC VISA -> 1071
112002 Outstanding Receipts -> 1080 (in-transit receipts)
112003 Outstanding Payments -> 1081 (in-transit payments)
112001 Bank Suspense Account -> 1090
115100 Customers Account -> 1100 (AR control)
118310 HST receivable - 13% -> 1215 (legacy HST receivable, near new 1210 ITC)
211100 Vendors Account -> 2010 (AP control)
213310 HST to pay - 13% -> 2115 (legacy HST collected, near new 2110)
Verification: 140/140 active accounts now use 4-digit codes. All four
end-to-end test invoices still post correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three odd code positions that were chosen to dodge l10n_ca collisions are
now cleaned up:
- Due From Shareholder 119100 -> 115200 (115xxx is where receivables belong)
- Due From Associated Corps 119900 -> 115900
- Cloud Infrastructure 511105 -> 511100 (legacy 'Inside Purchases'
renamed to 511100.OLD)
Applied to prod via scripts/fix_gl_codes.py (now committed).
Module XML updated: <field name='code'> values match new codes; XMLIDs
(acct_119100, acct_119900, acct_511105) preserved so existing
ir.model.data rows on prod still map to the right records.
pre_init_hook augmented with _L10N_CA_FORCE_CLEAR_CODES set so a fresh
install on a new DB also force-clears 511100 (which would otherwise be
blocked by the postings-exist guard).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three fixes that unblock end-to-end invoice tests on staging:
1. Switched company default sale/purchase tax from '5% GST' to '13% HST'
(Ontario is the home province). New products auto-get 13% HST; fiscal
positions substitute OUT to other rates per customer location.
2. Added _migrate_tax_repartition_accounts hook. The post_init archive sweep
correctly archived legacy l10n_ca tax-tracking accounts (118100.OLD,
231000, 232000, 233000, 118400, 118500, etc.) but active taxes still
referenced them via repartition lines, causing invoice posting to fail
with 'account is archived'. Hook repoints repartition to Nexa's
consolidated 118100 (ITC) / 213100 (HST collected) / 213500 (QST
collected) accounts.
3. Odoo 19 fiscal position behavior change: empty tax_ids now means
'remove all taxes' (was 'pass-through' in v17/18). For ON home position
we now add a self-mapping placeholder (13% HST -> 13% HST) so the FP
has a non-empty tax_ids and map_tax falls through to pass-through
semantics on the 13% HST source.
Verified with 4 invoice tests on staging:
ON -> 13% HST total 113.00
US -> 0% GST total 100.00 (zero-rated export)
QC -> 14.975% total 114.98
Westin -> 13% HST total 169.50 (intercompany, RP-Associated tag)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>