diff --git a/addons/dine360_kds/static/src/js/pos_kds.js b/addons/dine360_kds/static/src/js/pos_kds.js index 02f2c5e..2253e48 100644 --- a/addons/dine360_kds/static/src/js/pos_kds.js +++ b/addons/dine360_kds/static/src/js/pos_kds.js @@ -75,23 +75,25 @@ patch(PosStore.prototype, { console.log(`[KDS] Setting up channel: ${channel}`); try { - const busService = this.env.services.bus_service; - busService.addChannel(channel); - console.log("[KDS] Channel added successfully"); + const busService = this.bus_service || this.env?.services?.bus_service; + if (busService) { + busService.addChannel(channel); + console.log("[KDS] Channel added successfully"); - busService.addEventListener("notification", (event) => { - console.log("[KDS] *** NOTIFICATION RECEIVED ***", event); - const notifications = event.detail || []; + busService.addEventListener("notification", (event) => { + console.log("[KDS] *** NOTIFICATION RECEIVED ***", event); + const notifications = event.detail || []; - for (const notif of notifications) { - if (notif.type === 'kds_update') { - console.log("[KDS] *** KDS UPDATE ***", notif.payload); - this._handleKdsUpdate(notif.payload); + for (const notif of notifications) { + if (notif.type === 'kds_update') { + console.log("[KDS] *** KDS UPDATE ***", notif.payload); + this._handleKdsUpdate(notif.payload); + } } - } - }); + }); - console.log("[KDS] Listener registered successfully"); + console.log("[KDS] Listener registered successfully"); + } } catch (error) { console.error("[KDS] ERROR:", error); } diff --git a/addons/dine360_online_orders/models/sale_order.py b/addons/dine360_online_orders/models/sale_order.py index 96c9be3..02a088a 100644 --- a/addons/dine360_online_orders/models/sale_order.py +++ b/addons/dine360_online_orders/models/sale_order.py @@ -182,16 +182,38 @@ class SaleOrderOnline(models.Model): ], order='id desc', limit=1) if pos_order: - pos_order.write({ + pos_vals = { 'is_online_order': True, 'online_order_status': 'pending', 'sale_order_id': sale_order.id, 'online_order_date': fields.Datetime.now(), 'order_source': sale_order.order_source or 'online', 'fulfilment_type': sale_order.fulfilment_type or 'pickup', -# 'delivery_time': sale_order.delivery_time, -# 'uber_eta': sale_order.delivery_time, - }) + } + + # Check if this is an Uber delivery order + is_uber = False + if sale_order.fulfilment_type == 'delivery': + is_uber = True + elif sale_order.carrier_id and 'uber' in (sale_order.carrier_id.name or '').lower(): + is_uber = True + elif any('uber' in (l.product_id.name or '').lower() or 'delivery' in (l.product_id.name or '').lower() for l in sale_order.order_line if getattr(l, 'is_delivery', False)): + is_uber = True + + if is_uber: + pos_vals['is_uber_order'] = True + pos_vals['delivery_type'] = 'uber' + shipping = sale_order.partner_shipping_id or sale_order.partner_id + if shipping: + pos_vals['delivery_partner_id'] = shipping.id + pos_vals['delivery_street'] = f"{shipping.street or ''} {shipping.street2 or ''}".strip() + pos_vals['delivery_city'] = shipping.city or '' + pos_vals['delivery_zip'] = shipping.zip or '' + pos_vals['delivery_phone'] = shipping.phone or shipping.mobile or '' + if hasattr(sale_order, 'amount_delivery') and sale_order.amount_delivery > 0: + pos_vals['uber_delivery_fee'] = sale_order.amount_delivery + + pos_order.write(pos_vals) # Link back to sale order sale_order.write({'pos_order_id': pos_order.id}) diff --git a/addons/dine360_order_channels/static/src/js/product_screen_patch.js b/addons/dine360_order_channels/static/src/js/product_screen_patch.js index 3025dd1..e09ba17 100644 --- a/addons/dine360_order_channels/static/src/js/product_screen_patch.js +++ b/addons/dine360_order_channels/static/src/js/product_screen_patch.js @@ -4,17 +4,11 @@ import { patch } from "@web/core/utils/patch"; import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; import { ChannelPanel } from "./channel_panel"; -/** - * Patch ProductScreen to: - * 1. Register ChannelPanel as a component - * 2. Expose showChannelPanel computed property to the template - */ -patch(ProductScreen, { - components: { - ...ProductScreen.components, - ChannelPanel, - }, -}); +// Register ChannelPanel directly on ProductScreen components +ProductScreen.components = { + ...ProductScreen.components, + ChannelPanel, +}; patch(ProductScreen.prototype, { get showChannelPanel() { diff --git a/addons/dine360_order_channels/static/src/xml/receipt_extension.xml b/addons/dine360_order_channels/static/src/xml/receipt_extension.xml index 271170b..aaba395 100644 --- a/addons/dine360_order_channels/static/src/xml/receipt_extension.xml +++ b/addons/dine360_order_channels/static/src/xml/receipt_extension.xml @@ -1,268 +1,38 @@ + - -
- - -
Restaurant Receipt
- -
- Logo -
-
-
-
- Tel: - | -
-
-
+ +
+
+ Order Source: +
- -
"Authentic Indian Food At its Finest!"
- -
-
- Receipt No. - -
-
- Date & Time - -
-
- Cashier - -
-
- - - - - - - - - - - - - - - - - - -
List of ItemsQtyUnit CostAmount
- -
- -
-
- -
-
-
- Total Amount - -
-
- VAT - -
-
- Net Amount - -
- -
- Rounding - -
-
- To Pay - -
-
- - -
- - -
-
- Change - -
-
-
- - - - -
-
- Order Source: - -
-
- Fulfilment: - -
- - -
-
DELIVERY ADDRESS:
-
-
- -
-
Phone:
-
- Note: -
-
- - -
- Ref: -
-
- WhatsApp: -
-
- -
- +
+ Fulfilment: +
-
-

Powered by Dine360

+ +
+
DELIVERY ADDRESS:
+
+
+ +
+
Phone:
+
+ Note: +
+
+ + +
+ Ref: +
+
+ WhatsApp:
diff --git a/addons/dine360_qz_printer/static/src/js/qz_wrapper.js b/addons/dine360_qz_printer/static/src/js/qz_wrapper.js index 504a2b0..00d1b83 100644 --- a/addons/dine360_qz_printer/static/src/js/qz_wrapper.js +++ b/addons/dine360_qz_printer/static/src/js/qz_wrapper.js @@ -1,4 +1,4 @@ -/** @odoo-module */ +/** @odoo-module */ import { patch } from "@web/core/utils/patch"; import { ReceiptScreen } from "@point_of_sale/app/screens/receipt_screen/receipt_screen"; @@ -393,7 +393,10 @@ patch(ReceiptScreen.prototype, { return false; } } - return super.printReceipt(...arguments); + if (typeof super.printReceipt === "function") { + return super.printReceipt(...arguments); + } + return false; }, }); @@ -445,8 +448,8 @@ async function buildEscPosKitchenTicket(order, pos, changes) { patch(PosStore.prototype, { async sendOrderToPrinter(order) { if (this.config.use_qz_printer && this.config.qz_kitchen_printer_name) { - const changes = order.computeChanges(); - if (Object.keys(changes.categories).length > 0) { + const changes = typeof order.computeChanges === "function" ? order.computeChanges() : {}; + if (changes && changes.categories && Object.keys(changes.categories).length > 0) { try { if (!window.qz) { console.error("QZ Tray library not loaded."); @@ -472,11 +475,13 @@ patch(PosStore.prototype, { return true; } catch (err) { console.error("QZ Tray Kitchen Print Error:", err); - // Fallback or show error } } return true; } - return super.sendOrderToPrinter(...arguments); + if (typeof super.sendOrderToPrinter === "function") { + return super.sendOrderToPrinter(...arguments); + } + return true; }, }); diff --git a/addons/dine360_theme_shivasakthi/models/product_template.py b/addons/dine360_theme_shivasakthi/models/product_template.py index f8eaf94..5d6790e 100644 --- a/addons/dine360_theme_shivasakthi/models/product_template.py +++ b/addons/dine360_theme_shivasakthi/models/product_template.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from odoo import models, fields +from odoo import models, fields, api class ProductTemplate(models.Model): _inherit = 'product.template' @@ -9,3 +9,18 @@ class ProductTemplate(models.Model): default=False, help='Check this to show this product in Popular Deals section on Homepage' ) + + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + if 'name' in vals and vals.get('name'): + name = vals.get('name', '') + if not vals.get('website_meta_title'): + vals['website_meta_title'] = f"{name} | Shiva Sakthi Restaurant" + if not vals.get('website_meta_description'): + desc = vals.get('description_sale') or vals.get('description') or '' + if desc: + vals['website_meta_description'] = desc[:150] + else: + vals['website_meta_description'] = f"Enjoy delicious, authentic {name} at Shiva Sakthi Restaurant, Mississauga. Order online now for dine-in, take-out, or catering." + return super(ProductTemplate, self).create(vals_list) diff --git a/addons/dine360_theme_shivasakthi/static/src/img/shivasakthi_logo_new.png b/addons/dine360_theme_shivasakthi/static/src/img/shivasakthi_logo_new.png index a0f7d89..99a0afa 100644 Binary files a/addons/dine360_theme_shivasakthi/static/src/img/shivasakthi_logo_new.png and b/addons/dine360_theme_shivasakthi/static/src/img/shivasakthi_logo_new.png differ diff --git a/addons/dine360_theme_shivasakthi/static/src/scss/theme.scss b/addons/dine360_theme_shivasakthi/static/src/scss/theme.scss index 5f4be68..a378d5a 100644 --- a/addons/dine360_theme_shivasakthi/static/src/scss/theme.scss +++ b/addons/dine360_theme_shivasakthi/static/src/scss/theme.scss @@ -1,4 +1,4 @@ -/* Global Font Family Overrides */ +/* Global Font Family Overrides */ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: 'Bebas Neue', sans-serif !important; } @@ -576,9 +576,9 @@ section h2.display-4 { } &:focus { - border-color: rgba(43, 177, 165, 0.3) !important; + border-color: rgba(255, 184, 0, 0.5) !important; background-color: white !important; - box-shadow: 0 5px 15px rgba(43, 177, 165, 0.1) !important; + box-shadow: 0 5px 15px rgba(255, 184, 0, 0.15) !important; } } @@ -1576,7 +1576,7 @@ footer#bottom { /* Global Red Color Removal & Theme Alignment */ .text-danger { - color: #ffb800 !important; // Replace red text with theme teal + color: #ffb800 !important; // Replace red text with theme gold } .bg-danger, @@ -1597,7 +1597,7 @@ footer#bottom { transition: all 0.2s ease; &:hover { - background-color: rgba(43, 177, 165, 0.1) !important; + background-color: rgba(255, 184, 0, 0.1) !important; color: #ffb800 !important; } @@ -1615,7 +1615,7 @@ footer#bottom { &:hover { color: white !important; - background-color: #259a8f !important; + background-color: #e0a200 !important; } } } @@ -1626,7 +1626,7 @@ footer#bottom { /* Link hover color */ body:not(.editor_enable):not(.o_edit_mode) a:hover, body:not(.editor_enable):not(.o_edit_mode) a:hover * { - color: #529791 !important; + color: #ffb800 !important; } /* Button hover color */ @@ -2398,9 +2398,9 @@ body.o_edit_mode { .enjoy-btn-outline { display: inline-flex; align-items: center; - border: 2px solid #ffb800; - color: #ffb800; - background: transparent; + border: 2px solid #ffb800 !important; + color: #ffb800 !important; + background: transparent !important; padding: 10px 28px; font-family: 'Bebas Neue', sans-serif !important; font-size: 15px; @@ -2410,8 +2410,9 @@ body.o_edit_mode { transition: all 0.3s ease; &:hover { - background: #ffb800; - color: #111111; + background: #ffb800 !important; + color: #111111 !important; + border-color: #ffb800 !important; } } @@ -3187,5 +3188,9 @@ body.o_edit_mode { } /* Enforce section title font size and weight */ -section h2.display-4, section h2.display-5, section h2.testi-main-title, section h2.thali-subtitle, section h2 { font-size: 56px !important; font-weight: 400 !important; } +section h2.display-4, section h2.display-5, section h2.testi-main-title, section h2.thali-subtitle, section h2 { + font-size: clamp(32px, 5vw, 56px) !important; + font-weight: 400 !important; + line-height: 1.25 !important; +} diff --git a/addons/dine360_theme_shivasakthi/views/pages.xml b/addons/dine360_theme_shivasakthi/views/pages.xml index e799f2f..e8f7887 100644 --- a/addons/dine360_theme_shivasakthi/views/pages.xml +++ b/addons/dine360_theme_shivasakthi/views/pages.xml @@ -368,138 +368,182 @@