fix(services): V19 removed 'rpc' service \u2014 import standalone rpc() function
V19 removed the 'rpc' service from the registry. All 4 fusion services
(bank_reconciliation, reports, assets, followup) declared dependencies:
['rpc', ...] and accessed services.rpc in their constructor. At runtime
this caused:
Error: Some services could not be started: fusion_bank_reconciliation,
fusion_reports, fusion_assets, fusion_followup. Missing dependencies: rpc
\u2014 which prevented the entire OWL backend from booting (blank screen).
Fix per V19 docs:
- Add 'import { rpc } from "@web/core/network/rpc";'
- Set 'this.rpc = rpc;' in constructor (instead of services.rpc)
- Remove 'rpc' from dependencies list
This is the workspace CLAUDE.md guidance Phase 4's subagent flagged
but didn't act on for backward consistency. V19 actually removed the
service entirely, so the consistency choice was wrong \u2014 fixing now.
All call sites still use this.rpc(...) so no per-method changes needed.
Bundle rebuilt clean; backend boots correctly.
Made-with: Cursor
This commit is contained in:
@@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
import { registry } from "@web/core/registry";
|
import { registry } from "@web/core/registry";
|
||||||
import { reactive } from "@odoo/owl";
|
import { reactive } from "@odoo/owl";
|
||||||
|
import { rpc } from "@web/core/network/rpc";
|
||||||
|
|
||||||
const ENDPOINT_BASE = "/fusion/assets";
|
const ENDPOINT_BASE = "/fusion/assets";
|
||||||
|
|
||||||
export class AssetsService {
|
export class AssetsService {
|
||||||
constructor(env, services) {
|
constructor(env, services) {
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.rpc = services.rpc;
|
// V19: rpc is a standalone import, not a service.
|
||||||
|
this.rpc = rpc;
|
||||||
this.notification = services.notification;
|
this.notification = services.notification;
|
||||||
|
|
||||||
this.state = reactive({
|
this.state = reactive({
|
||||||
@@ -142,7 +144,7 @@ export class AssetsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const assetsService = {
|
export const assetsService = {
|
||||||
dependencies: ["rpc", "notification"],
|
dependencies: ["notification"],
|
||||||
start(env, services) { return new AssetsService(env, services); },
|
start(env, services) { return new AssetsService(env, services); },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,13 +14,15 @@ import { registry } from "@web/core/registry";
|
|||||||
import { reactive, useState, EventBus } from "@odoo/owl";
|
import { reactive, useState, EventBus } from "@odoo/owl";
|
||||||
import { useService } from "@web/core/utils/hooks";
|
import { useService } from "@web/core/utils/hooks";
|
||||||
import { browser } from "@web/core/browser/browser";
|
import { browser } from "@web/core/browser/browser";
|
||||||
|
import { rpc } from "@web/core/network/rpc";
|
||||||
|
|
||||||
const ENDPOINT_BASE = "/fusion/bank_rec";
|
const ENDPOINT_BASE = "/fusion/bank_rec";
|
||||||
|
|
||||||
export class BankReconciliationService {
|
export class BankReconciliationService {
|
||||||
constructor(env, services) {
|
constructor(env, services) {
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.rpc = services.rpc;
|
// V19: rpc is no longer a service — imported as a standalone function above.
|
||||||
|
this.rpc = rpc;
|
||||||
this.notification = services.notification;
|
this.notification = services.notification;
|
||||||
this.orm = services.orm;
|
this.orm = services.orm;
|
||||||
|
|
||||||
@@ -400,7 +402,7 @@ export class BankReconciliationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const bankReconciliationService = {
|
export const bankReconciliationService = {
|
||||||
dependencies: ["rpc", "notification", "orm"],
|
dependencies: ["notification", "orm"],
|
||||||
start(env, services) {
|
start(env, services) {
|
||||||
return new BankReconciliationService(env, services);
|
return new BankReconciliationService(env, services);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
import { registry } from "@web/core/registry";
|
import { registry } from "@web/core/registry";
|
||||||
import { reactive } from "@odoo/owl";
|
import { reactive } from "@odoo/owl";
|
||||||
|
import { rpc } from "@web/core/network/rpc";
|
||||||
|
|
||||||
const ENDPOINT_BASE = "/fusion/followup";
|
const ENDPOINT_BASE = "/fusion/followup";
|
||||||
|
|
||||||
export class FollowupService {
|
export class FollowupService {
|
||||||
constructor(env, services) {
|
constructor(env, services) {
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.rpc = services.rpc;
|
// V19: rpc is a standalone import, not a service.
|
||||||
|
this.rpc = rpc;
|
||||||
this.notification = services.notification;
|
this.notification = services.notification;
|
||||||
|
|
||||||
this.state = reactive({
|
this.state = reactive({
|
||||||
@@ -138,7 +140,7 @@ export class FollowupService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const followupService = {
|
export const followupService = {
|
||||||
dependencies: ["rpc", "notification"],
|
dependencies: ["notification"],
|
||||||
start(env, services) { return new FollowupService(env, services); },
|
start(env, services) { return new FollowupService(env, services); },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
import { registry } from "@web/core/registry";
|
import { registry } from "@web/core/registry";
|
||||||
import { reactive } from "@odoo/owl";
|
import { reactive } from "@odoo/owl";
|
||||||
|
import { rpc } from "@web/core/network/rpc";
|
||||||
|
|
||||||
const ENDPOINT_BASE = "/fusion/reports";
|
const ENDPOINT_BASE = "/fusion/reports";
|
||||||
|
|
||||||
export class ReportsService {
|
export class ReportsService {
|
||||||
constructor(env, services) {
|
constructor(env, services) {
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.rpc = services.rpc;
|
// V19: rpc is a standalone import, not a service.
|
||||||
|
this.rpc = rpc;
|
||||||
this.notification = services.notification;
|
this.notification = services.notification;
|
||||||
|
|
||||||
this.state = reactive({
|
this.state = reactive({
|
||||||
@@ -140,7 +142,7 @@ export class ReportsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const reportsService = {
|
export const reportsService = {
|
||||||
dependencies: ["rpc", "notification"],
|
dependencies: ["notification"],
|
||||||
start(env, services) { return new ReportsService(env, services); },
|
start(env, services) { return new ReportsService(env, services); },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user