[ADD] web_help

[FIX] web_help: Run pre-commit

[FIX] web_help: Run pre-commit

[FIX] web_help: Run pre-commit

[FIX] web_help: Run pre-commit

[IMP] Easy changeable template and buttons texts, more demo, fixed readme.

[IMP] Easy changeable template and buttons texts, more demo, fixed readme.

[IMP] Easy changeable template and buttons texts, more demo, fixed readme.

[FIX] Grammar
This commit is contained in:
tarteo
2023-02-22 14:50:32 +01:00
parent 72c420f5ed
commit d6068076d7
21 changed files with 529 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/** @odoo-module **/
import {registry} from "@web/core/registry";
export function findTrip(model, viewType) {
const trips = registry.category("trips").getAll();
const matchedTrips = _.filter(trips, function (trip) {
return trip.selector(model, viewType);
});
if (matchedTrips.length >= 1) {
if (matchedTrips.length != 1) {
console.warning("More than one trip found", model, viewType);
}
return matchedTrips[0].Trip;
}
return null;
}