Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const menuChartProps = {
},
get menuProps() {
const menu = this.env.model.getters.getChartOdooMenu(this.props.figureId);
var result = {
const result = {
id: `odoo_menu_${this.props.figureId}`,
fieldString: _t("Menu Items"),
resModel: "ir.ui.menu",
update: this.updateMenu.bind(this),
Expand All @@ -30,7 +31,6 @@ const menuChartProps = {
};
if (menu) {
result.value = menu.name;
result.id = menu.id;
}
return result;
},
Expand Down
10 changes: 8 additions & 2 deletions spreadsheet_oca/static/src/spreadsheet/bundle/odoo_panels.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export class OdooPanel extends Component {
}
get menuProps() {
const menu = this.env.model.getters.getChartOdooMenu(this.props.figureId);
var result = {
const result = {
id: `odoo_menu_${this.props.figureId}`,
fieldString: _t("Menu Items"),
resModel: "ir.ui.menu",
update: this.updateMenu.bind(this),
Expand All @@ -25,7 +26,6 @@ export class OdooPanel extends Component {
};
if (menu) {
result.value = menu.name;
result.id = menu.id;
}
return result;
}
Expand Down Expand Up @@ -76,6 +76,12 @@ OdooPanel.template = "spreadsheet_oca.OdooPanel";
OdooPanel.components = { Many2XAutocomplete };

class OdooStackablePanel extends OdooPanel {
static props = {
figureId: String,
updateChart: Function,
"*": true,
};

onChangeStacked(ev) {
this.props.updateChart(this.props.figureId, {
stacked: ev.target.checked,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ const actionRegistry = registry.category("actions");
const { Component, onMounted, onWillStart, useSubEnv } = owl;

export class ActionSpreadsheetOca extends Component {
static props = {
action: Object,
actionId: { type: Number, optional: true },
className: { type: String, optional: true },
"*": true,
};

setup() {
this.router = useService("router");
this.orm = useService("orm");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import { ControlPanel } from "@web/search/control_panel/control_panel";
const { useState } = owl;

export class SpreadsheetName extends Component {
static props = {
name: String,
isReadonly: { type: Boolean, optional: true },
onChanged: { type: Function, optional: true },
"*": true,
};

setup() {
this.state = useState({
name: this.props.name,
Expand Down