forked from alaguraj/odoo-testing-addons
Fix POS blank screen in order channel panel
This commit is contained in:
parent
10509df3fa
commit
215b5804e5
@ -2,7 +2,6 @@
|
||||
|
||||
import { Component, useState } from "@odoo/owl";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { jsonrpc } from "@web/core/network/rpc_service";
|
||||
|
||||
/**
|
||||
@ -17,7 +16,6 @@ export class ChannelPanel extends Component {
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
this.dialog = useService("dialog");
|
||||
|
||||
this.SOURCE_LABELS = {
|
||||
walk_in: 'Walk-In',
|
||||
@ -67,7 +65,7 @@ export class ChannelPanel extends Component {
|
||||
}
|
||||
|
||||
get showPanel() {
|
||||
return this.pos.config.show_channel_panel;
|
||||
return this.pos?.config?.show_channel_panel !== false;
|
||||
}
|
||||
|
||||
// --- Source Selector ---
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
</t>
|
||||
|
||||
<!-- Inject ChannelPanel into the left pane of ProductScreen, above OrderWidget -->
|
||||
<t t-name="point_of_sale.ProductScreen"
|
||||
<t t-name="dine360_order_channels.ProductScreenExtension"
|
||||
t-inherit="point_of_sale.ProductScreen"
|
||||
t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[hasclass('leftpane')]//OrderWidget" position="before">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user