mirror of
https://github.com/bringout/oca-ocb-crm.git
synced 2026-04-24 23:12:00 +02:00
Initial commit: Crm packages
This commit is contained in:
commit
21a345b5b9
654 changed files with 418312 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
/** @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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue