Introduce Dine360 KDS module and add dashboard button to POS navbar, while removing the category synchronization script.

This commit is contained in:
Alaguraj0361 2026-03-06 22:20:45 +05:30
parent 26c9e252cc
commit daa3fbd056
3 changed files with 2 additions and 27 deletions

View File

@ -24,7 +24,7 @@
'dine360_kds/static/src/css/kds_style.css',
'dine360_kds/static/src/js/kds_backend.js',
],
'point_of_sale.assets_prod': [
'point_of_sale._assets_pos': [
'dine360_kds/static/src/css/pos_kds.css',
'dine360_kds/static/src/js/pos_kds.js',
# 'dine360_kds/static/src/xml/pos_kds.xml', # Temporarily disabled

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.Navbar" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('pos-logo')]" position="after">
<xpath expr="//img[hasclass('pos-logo')]" position="after">
<a href="/" class="btn-dashboard ms-2 d-flex align-items-center justify-content-center text-white text-decoration-none"
style="background-color: #d61112; border-radius: 4px; padding: 0 15px; height: 34px; font-weight: bold; border: 1px solid rgba(255,255,255,0.2);">
<i class="fa fa-th-large me-2"></i>

View File

@ -1,25 +0,0 @@
from odoo import api, SUPERUSER_ID
import odoo
registry = odoo.modules.registry.Registry('Chennora')
with registry.cursor() as cr:
env = api.Environment(cr, SUPERUSER_ID, {})
# 1. Get all products that have a POS category but NO public category
products = env['product.template'].search([('pos_categ_ids', '!=', False), ('public_categ_ids', '=', False)])
print(f"Syncing categories for {len(products)} products...")
for p in products:
for pos_cat in p.pos_categ_ids:
# Find or create matching public category
pub_cat = env['product.public.category'].search([('name', '=', pos_cat.name)], limit=1)
if not pub_cat:
pub_cat = env['product.public.category'].create({'name': pos_cat.name})
print(f"Created Public Category: {pos_cat.name}")
# Link to product
p.write({'public_categ_ids': [(4, pub_cat.id)]})
cr.commit()
print("Optimization Complete: Categories are now synced to the Website.")