Initial commit: Vertical Industry packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit d5567a0017
766 changed files with 733028 additions and 0 deletions

View file

@ -0,0 +1,46 @@
/** @odoo-module */
import { patch } from '@web/core/utils/patch';
import { registry } from '@web/core/registry';
import { kanbanView } from '@web/views/kanban/kanban_view';
import { KanbanRecord } from '@web/views/kanban/kanban_record';
import { KanbanRenderer } from '@web/views/kanban/kanban_renderer';
import { LunchDashboard } from '../components/lunch_dashboard';
import { LunchRendererMixin } from '../mixins/lunch_renderer_mixin';
import { LunchSearchModel } from './search_model';
export class LunchKanbanRecord extends KanbanRecord {
onGlobalClick(ev) {
this.env.bus.trigger('lunch_open_order', {productId: this.props.record.resId});
}
}
export class LunchKanbanRenderer extends KanbanRenderer {
getGroupsOrRecords() {
const {locationId} = this.env.searchModel.lunchState;
if (!locationId) {
return [];
} else {
return super.getGroupsOrRecords(...arguments);
}
}
}
patch(LunchKanbanRenderer.prototype, 'lunch_kanban_renderer_mixin', LunchRendererMixin);
LunchKanbanRenderer.template = 'lunch.KanbanRenderer';
LunchKanbanRenderer.components = {
...LunchKanbanRenderer.components,
LunchDashboard,
KanbanRecord: LunchKanbanRecord,
}
registry.category('views').add('lunch_kanban', {
...kanbanView,
Renderer: LunchKanbanRenderer,
SearchModel: LunchSearchModel,
});