mirror of
https://github.com/bringout/oca-ocb-crm.git
synced 2026-04-23 21:12:06 +02:00
22 lines
598 B
JavaScript
22 lines
598 B
JavaScript
/** @odoo-module **/
|
|
|
|
import { useService } from "@web/core/utils/hooks";
|
|
|
|
const { useComponent } = owl;
|
|
|
|
export async function checkRainbowmanMessage(orm, effect, recordId) {
|
|
const message = await orm.call("crm.lead", "get_rainbowman_message", [[recordId]]);
|
|
if (message) {
|
|
effect.add({
|
|
message,
|
|
type: "rainbow_man",
|
|
});
|
|
}
|
|
}
|
|
|
|
export function useCheckRainbowman() {
|
|
const component = useComponent();
|
|
const orm = useService("orm");
|
|
const effect = useService("effect");
|
|
return checkRainbowmanMessage.bind(component, orm, effect);
|
|
}
|