fix: website editor iframe fix, remove temp files, fix dine360_restaurant menu, fix dine360_restaurant suite deps

This commit is contained in:
Alaguraj0361 2026-03-04 13:27:56 +05:30
parent 146495a2e6
commit 85a32e50f5
15 changed files with 14 additions and 562 deletions

12
.gitignore vendored
View File

@ -58,3 +58,15 @@ addons/*.png
.env
.venv
docker-compose.override.yml
# Log / debug dump files
*.txt
*.log
*_logs.txt
shop_output.html
upgrade_log.txt
# One-off scripts (keep .ps1 compose scripts but ignore others)
cleanup_*.py
fix_*.py
blog_posts_*.json

View File

@ -1,77 +0,0 @@
# Git Commit Summary - Chennora Theme Update
## ✅ Files Added to Git:
### New Images (3 files):
1. `odoo-testing-addons/addons/dine360_theme_chennora/static/src/img/gobi-65.png` (88 KB)
2. `odoo-testing-addons/addons/dine360_theme_chennora/static/src/img/unlimited-thali.png` (127 KB)
3. `odoo-testing-addons/addons/dine360_theme_chennora/static/src/img/fish-curry.png` (100 KB)
### Updated Files:
1. `odoo-testing-addons/addons/dine360_theme_chennora/views/pages.xml` - New 3-card offer section
2. `odoo-testing-addons/addons/dine360_theme_chennora/__manifest__.py` - Added main.css
3. `odoo-testing-addons/addons/dine360_theme_chennora/views/layout.xml` - Added Bootstrap Icons
4. `IMPLEMENTATION_SUMMARY.md` - Documentation
5. `HOW_TO_UPDATE_THEME.md` - Update guide
6. `docker-compose.yml` - Changed to client2
## 📝 Commit Message:
```
Update Chennora theme with new offer cards and assets
```
## 🔄 Git Status:
**Committed locally** - All changes are saved in your local Git repository
**Not pushed to remote** - Authentication failed when trying to push
## 🚀 To Push to Remote Repository:
You need to authenticate with Git. Run one of these:
### Option 1: Push with credentials
```bash
cd d:\ODOO_Final
git push origin main
```
(You'll be prompted for username/password or token)
### Option 2: Configure Git credentials
```bash
git config credential.helper store
git push origin main
```
### Option 3: Use SSH instead of HTTPS
```bash
git remote set-url origin git@github.com:alaguraj/odoo-testing-addons.git
git push origin main
```
## 📦 What's in the Commit:
### Changes Made:
- **3 new food images** for offer cards
- **Updated homepage design** with dark cards
- **Bootstrap Icons** added to layout
- **Main CSS** (335KB) added to theme
- **Documentation files** for implementation
### Card Design:
- Dark background (#04121D)
- Text on left (70%), image on right (30%)
- Yellow "ORDER NOW" buttons (#FECD4F)
- Teal and yellow accent colors
## 🔍 Verify the Commit:
```bash
git log --oneline -1
git show HEAD --stat
```
## 📌 Next Steps:
1. **Authenticate and push** to remote repository
2. **Upgrade the theme** in Odoo (Apps → Chennora → Upgrade)
3. **Refresh homepage** to see the new cards
Your changes are safely committed locally! 🎉

View File

@ -1,68 +0,0 @@
# How to Update the Chennora Theme
## The 3 cards are not showing because the theme module needs to be upgraded in Odoo.
### Quick Fix - Upgrade via Web Interface:
1. **Open your browser** and go to: `http://localhost:10002`
2. **Login to Odoo** with your credentials
3. **Go to Apps** (click the grid icon in top menu)
4. **Remove the "Apps" filter**:
- You'll see a search bar that says "Apps"
- Click the ❌ (X) next to "Apps" to remove the filter
5. **Search for "chennora"**:
- Type "chennora" in the search box
- You should see "Dine360 Theme Chennora"
6. **Click "Upgrade"**:
- Click the "Upgrade" button on the module card
- Wait for the upgrade to complete
7. **Go to Website**:
- Click "Website" in the top menu
- Or go to: `http://localhost:10002`
8. **Refresh the page** (Ctrl + F5 or Cmd + Shift + R)
### What Changed:
✅ **3 New Food Images Added:**
- `gobi-65.png` - Crispy Gobi 65
- `unlimited-thali.png` - Unlimited Thali
- `fish-curry.png` - Fiery Fish Curry
✅ **New Card Design:**
- Dark background (#04121D)
- Text on left, image on right
- Yellow "ORDER NOW" buttons
- Matches your reference design
### If Images Still Don't Show:
The images are located at:
```
/dine360_theme_chennora/static/src/img/gobi-65.png
/dine360_theme_chennora/static/src/img/unlimited-thali.png
/dine360_theme_chennora/static/src/img/fish-curry.png
```
You can verify they load by visiting:
- `http://localhost:10002/dine360_theme_chennora/static/src/img/gobi-65.png`
- `http://localhost:10002/dine360_theme_chennora/static/src/img/unlimited-thali.png`
- `http://localhost:10002/dine360_theme_chennora/static/src/img/fish-curry.png`
### Alternative: Restart Everything
If the upgrade doesn't work, try:
```bash
cd d:\ODOO_Final
docker-compose down
docker-compose up
```
Then upgrade the module again through the web interface.

View File

@ -1,142 +0,0 @@
# Chennora Theme Implementation Summary
## Completed Steps
### 1. Asset Migration
**Copied main.css** from Vite project to Odoo theme
- Source: `d:\chennora-final\chennora\src\assets\main.css`
- Destination: `d:\ODOO_Final\odoo-testing-addons\addons\dine360_theme_chennora\static\src\css\main.css`
**Copied all assets** (images, icons, etc.)
- Source: `d:\chennora-final\chennora\public\assets`
- Destination: `d:\ODOO_Final\odoo-testing-addons\addons\dine360_theme_chennora\static\src\assets\`
- Total: 1039 files copied
✅ **Updated __manifest__.py**
- Added main.css to assets_frontend
- Added Bootstrap Icons CDN link to layout.xml
### 2. Homepage Structure Analysis
The Chennora Vite website homepage consists of these sections (in order):
1. **Banner** - Hero carousel with 3 slides
2. **Offer Cards** - 3 promotional cards (Gobi 65, Unlimited Thali, Fish Curry)
3. **About Section** - Image + text about the restaurant
4. **Today's Special** - CTA section with background image
5. **Categories** - Feature category slider (18+ food categories)
6. **Popular Menu** - Interactive menu with center image
7. **Client Testimonials** - Google reviews carousel
8. **FAQ** - Accordion with 3 questions
9. **Blog** - Latest 3 blog posts
10. **Gallery** - Image slider (8 images)
### 3. Current Odoo Implementation Status
✅ **Already Implemented in pages.xml:**
- Banner carousel (3 slides) ✓
- Offer cards section ✓
- About section ✓
- Today's Special/Why Choose section ✓
- Categories grid ✓
- Popular Deals section ✓
- Testimonials carousel ✓
- FAQ accordion ✓
- Blog section ✓
- Gallery masonry ✓
## What's Missing
### Critical Items:
1. **CSS Asset Loading**
- Main.css is added but needs verification that all styles load correctly
- Asset paths need to be updated from `/assets/` to `/dine360_theme_chennora/static/src/assets/`
2. **JavaScript Dependencies**
- React Slick carousel (used in Vite) → Need Odoo equivalent or vanilla JS
- Bootstrap Icons (added via CDN)
- Custom animations and interactions
3. **Dynamic Content**
- Blog posts (currently hardcoded, need to pull from Odoo blog module)
- Google Reviews API integration
- Menu items (need to connect to product catalog)
4. **Asset Path Updates in XML**
- Update all image references in pages.xml to use correct Odoo paths
- Currently using `/web/image/` for some, need consistency
## Next Steps
### Phase 1: Asset Path Correction
```bash
# Update all asset references in pages.xml from:
/assets/img/...
# to:
/dine360_theme_chennora/static/src/assets/img/...
```
### Phase 2: Test and Verify
1. Restart Odoo server
2. Update the theme module
3. Check homepage rendering
4. Verify all images load
5. Check CSS styling
### Phase 3: Dynamic Content Integration
1. Connect blog section to Odoo blog posts
2. Integrate product catalog for menu items
3. Set up Google Reviews API (if needed)
### Phase 4: JavaScript Enhancements
1. Add carousel functionality (if not using Odoo's built-in)
2. Add smooth scroll animations
3. Add interactive elements
## File Locations
### Odoo Theme Files:
- **Main Theme**: `d:\ODOO_Final\odoo-testing-addons\addons\dine360_theme_chennora\`
- **Layout**: `views/layout.xml`
- **Pages**: `views/pages.xml`
- **CSS**: `static/src/css/main.css`
- **Assets**: `static/src/assets/`
- **Images**: `static/src/img/` (banner images)
### Vite Reference Files:
- **Source**: `d:\chennora-final\chennora\`
- **Components**: `src/Components/Home/`
- **Assets**: `public/assets/`
- **Main CSS**: `src/assets/main.css`
## Commands to Resume
```bash
# Navigate to Odoo directory
cd d:\ODOO_Final
# Restart Odoo (if needed)
docker-compose restart
# Update module
# Go to Apps → dine360_theme_chennora → Upgrade
```
## Key Differences: Vite vs Odoo
| Feature | Vite (React) | Odoo (QWeb) |
|---------|--------------|-------------|
| Carousel | React Slick | Bootstrap Carousel |
| Routing | React Router | Odoo Controllers |
| State | useState/useEffect | Server-side rendering |
| Assets | `/assets/` | `/module_name/static/` |
| Styling | CSS Modules | Global CSS |
## Notes
- The homepage structure in pages.xml closely matches the Vite version
- Main.css contains all the styling (335KB, 16,263 lines)
- Bootstrap Icons added via CDN for icon support
- All promotional images and content are already in place
- Need to verify asset paths work correctly in Odoo context

View File

@ -1,106 +0,0 @@
# Odoo Primary Color Change - #fecd4f
## Summary
Successfully changed the entire Odoo site's primary color to **#fecd4f** (Golden Yellow).
## Changes Made
### 1. Created Theme Variables File
**File:** `d:\Odoo\addons\dine360_dashboard\static\src\css\theme_variables.css`
- Defined CSS custom properties (variables) for the primary color and all variations
- Applied primary color to all common Odoo UI elements:
- Buttons (primary, save, create)
- Links and hover states
- Active/selected states
- Badges and tags
- Progress bars
- Checkboxes and radio buttons
- Focus states
- Navigation bar
- Menu items
- Kanban views
- Pagination
- Tabs
- Dropdowns
- Search bars
### 2. Updated Home Menu CSS
**File:** `d:\Odoo\addons\dine360_dashboard\static\src\css\home_menu.css`
- App card hover effects now use primary color (#fecd4f)
- App name hover color changed to primary color
- User avatar background uses gradient with primary color
- Badge notifications use primary color
- AI icon gradient updated to include primary color
### 3. Updated Manifest
**File:** `d:\Odoo\addons\dine360_dashboard\__manifest__.py`
- Added `theme_variables.css` to assets list (loads first)
### 4. Existing Login Page
**File:** `d:\Odoo\addons\dine360_dashboard\static\src\css\login_style.css`
- Already uses #fecd4f in the gradient background
- Login button uses gradient from secondary to primary color
## Color Palette
### Primary Colors
- **Primary:** `#fecd4f` (Golden Yellow)
- **Primary Dark:** `#e5b846`
- **Primary Light:** `#ffd970`
- **Primary Lighter:** `#ffe599`
### Secondary Colors
- **Secondary:** `#2bb1a5` (Teal/Turquoise)
- **Secondary Dark:** `#259a8f`
- **Secondary Light:** `#4dc4b8`
### Gradients
- **Primary Gradient:** `linear-gradient(135deg, #fecd4f 0%, #ffd970 100%)`
- **Primary to Secondary:** `linear-gradient(135deg, #fecd4f 0%, #2bb1a5 100%)`
- **Secondary to Primary:** `linear-gradient(to right, #2bb1a5, #fecd4f)`
## Next Steps
### To Apply Changes:
1. **Restart Odoo Service:**
```bash
docker-compose restart odoo
```
2. **Update the Module:**
```bash
docker-compose exec odoo odoo -u dine360_dashboard -d FOODIES-DELIGHT --stop-after-init
```
3. **Clear Browser Cache:**
- Press `Ctrl + Shift + Delete` (Windows)
- Clear cached images and files
- Or use hard refresh: `Ctrl + F5`
### Verification:
After restarting, check these elements for the primary color:
- ✅ Login page background and buttons
- ✅ Home dashboard app cards (hover effect)
- ✅ Primary buttons throughout Odoo
- ✅ Links and active menu items
- ✅ Form save/create buttons
- ✅ Navigation bar
- ✅ Selected items in lists/kanban views
- ✅ Badges and tags
- ✅ Focus states on input fields
## Customization
To change the primary color in the future, simply edit:
`d:\Odoo\addons\dine360_dashboard\static\src\css\theme_variables.css`
Update the `--primary-color` variable at the top of the file:
```css
:root {
--primary-color: #YOUR_COLOR_HERE;
/* ... */
}
```
Then restart Odoo and clear browser cache.

View File

@ -1,61 +0,0 @@
# Dine360 Uber Integration Guide
This guide explains how to configure and use the Uber Integration module in your Odoo system.
## 1. Configuration (Set up API)
Before you can use the integration, you must link your Odoo instance with your Uber Developer account.
### Steps:
1. **Open Settings**: On your Odoo dashboard, click the **Uber Integration** icon.
2. **Create New Config**: Click **New** to create a configuration.
3. **Enter Credentials**:
* **Name**: Give it a descriptive name (e.g., "Main Store Uber").
* **Environment**: Set to **Sandbox** for testing or **Production** for live orders.
* **Client ID & Client Secret**: Get these from your [Uber Developer Dashboard](https://developer.uber.com/).
* **Customer ID**: Required only for **Uber Direct** (last-mile delivery).
4. **Test Connection**: Click the **Test Connection** button to verify that Odoo can talk to Uber.
---
## 2. Detailed Workflow
The module handles two main flows: **Uber Eats (Incoming Orders)** and **Uber Direct (Outgoing Delivery)**.
### A. Uber Eats Workflow (Incoming)
1. **Syncing**: Odoo periodically checks for new orders on the Uber Eats platform.
2. **POS Creation**: When a new order is found, Odoo automatically creates a **POS Order** with the `is_uber_order` flag.
3. **KDS Notification**: If the `dine360_kds` module is active, the order is immediately sent to the kitchen display for preparation.
4. **Automatic Confirmation**: Once processed, Odoo sends a confirmation back to Uber so the customer knows their food is being prepared.
### B. Uber Direct Workflow (Outgoing Delivery)
This is used when a customer orders directly through your POS, but you want to use an Uber driver for delivery.
1. **Create Order**: Create a normal POS order for a customer.
2. **Payment**: Confirm the payment and validate the order.
3. **Request Delivery**:
* Open the validated Order form.
* Click the **"Request Uber Delivery"** button.
* Odoo sends the order details (pickup address, dropoff address, items) to Uber.
4. **Tracking**: Odoo receives an **Uber Delivery ID**.
5. **Live Updates**: As the Uber driver moves, Odoo receives webhooks and automatically updates the `Uber Status` field on the order:
* `Pending`: Order sent to Uber, looking for driver.
* `Pickup`: Driver arrived at restaurant.
* `In Transit`: Driver is on the way to the customer.
* `Delivered`: Order completed!
---
## 3. Webhook Setup (Crucial for Live Tracking)
To get real-time status updates (like "Driver arrived"), you must configure the Webhook URL in your Uber Developer Portal:
* **Webhook URL**: `https://your-odoo-domain.com/uber/webhook/delivery`
* **Method**: `POST`
---
## 4. Technical Architecture
* **Module Name**: `dine360_uber`
* **Security**: Restricted to `Point of Sale / Manager` group.
* **Persistence**: All Uber statuses are stored directly on the `pos.order` record for easy reporting.

View File

@ -32,11 +32,8 @@ class ImageHome(Website):
is_editor = kwargs.get('enable_editor') or request.params.get('enable_editor')
if is_iframe or is_editor:
# Render the actual website homepage directly.
# Do NOT call super().index() here — for logged-in admin users
# the standard Website.index() may redirect to /web (backend),
# which breaks the website editor iframe.
return request.render('website.homepage')
# Let the standard Website controller render the homepage
return super(ImageHome, self).index(**kwargs)
# Not logged in → show the public website homepage
if not request.session.uid:

View File

@ -1,20 +0,0 @@
[
{
"title": "Looking For Indian Food Near Castlemore?",
"slug": "indian-food-castlemore",
"category": "Restaurant Spotlight",
"excerpt": "Searching for Indian food near Castlemore? Discover why Chennora is the best.",
"image": "/dine360_theme_chennora/static/src/img/blog-1.png",
"date": "2026-02-29",
"content": "Searching for Indian food near Castlemore? Whether you're a local resident or just passing through the area, finding a restaurant that perfectly balances traditional flavors with a welcoming atmosphere can be a challenge. That's where Chennora Brampton comes in. At Chennora, we don't believe in cutting corners. Our chefs use traditional recipes and the finest spices imported directly from India to ensure every bite takes you back to the streets of Chennai."
},
{
"title": "Modern Indian Kitchen Bar",
"slug": "modern-indian-kitchen-bar",
"category": "Restaurant Spotlight",
"excerpt": "Explore the vibrant Kitchen Bar experience at Chennora Brampton.",
"image": "/dine360_theme_chennora/static/src/img/blog-2.png",
"date": "2026-02-28",
"content": "<h4>Authentic Flavors</h4><p>The culinary landscape of Brampton is changing, and Chennora is at the forefront of this revolution. We've combined the soulful flavors of a traditional Indian kitchen with the vibrant energy of a modern bar to create a unique Kitchen Bar concept.</p>"
}
]

View File

@ -1,13 +0,0 @@
from odoo import api, SUPERUSER_ID
env = api.Environment(cr, SUPERUSER_ID, {})
# Find bad orders with WEB/ prefix
bad_orders = env['pos.order'].search([('pos_reference', 'like', 'WEB/%')])
print('Found bad orders:', bad_orders.mapped('pos_reference'))
if bad_orders:
bad_orders.unlink()
print('Deleted', len(bad_orders), 'bad orders')
else:
print('No bad orders found')

View File

@ -1,70 +0,0 @@
import re
from odoo import api, SUPERUSER_ID
env = api.Environment(cr, SUPERUSER_ID, {})
# The pattern Odoo core uses: re.search('([0-9-]){14,}', order.pos_reference).group(0)
# It needs at least 14 consecutive digits or hyphens, e.g. "00001-001-0001"
PATTERN = re.compile(r'([0-9-]){14,}')
print("=" * 60)
print("Scanning ALL pos.orders for bad pos_reference values...")
print("=" * 60)
# Find all orders that are in an open session (these are the ones loaded on POS open)
open_sessions = env['pos.session'].search([('state', '=', 'opened')])
print(f"Open sessions found: {open_sessions.mapped('name')}")
bad_orders = []
all_orders = env['pos.order'].search([('session_id', 'in', open_sessions.ids)])
print(f"Total orders in open sessions: {len(all_orders)}")
for order in all_orders:
ref = order.pos_reference or ''
if not PATTERN.search(ref):
bad_orders.append(order)
print(f" BAD ORDER id={order.id}, pos_reference='{ref}', name='{order.name}'")
print(f"\nTotal bad orders found: {len(bad_orders)}")
if bad_orders:
print("\nOptions:")
print(" 1. DELETE bad orders")
print(" 2. FIX pos_reference to a valid format")
print("\nApplying FIX: setting pos_reference to valid format...")
for order in bad_orders:
old_ref = order.pos_reference
# Generate a valid reference using the order ID padded to match the format
new_ref = f"Order {order.id:05d}-001-0001"
order.write({'pos_reference': new_ref})
print(f" Fixed order id={order.id}: '{old_ref}' -> '{new_ref}'")
print(f"\nFixed {len(bad_orders)} orders.")
print("Please restart the POS session and try again.")
else:
print("\nNo bad orders in open sessions. Checking ALL orders...")
# Also check orders not in any session (orphan orders)
all_pos_orders = env['pos.order'].search([])
print(f"Total pos.orders in database: {len(all_pos_orders)}")
really_bad = []
for order in all_pos_orders:
ref = order.pos_reference or ''
if not PATTERN.search(ref):
really_bad.append(order)
print(f" BAD ORDER id={order.id}, pos_reference='{ref}', session={order.session_id.name}, state={order.state}")
print(f"\nTotal bad orders in entire DB: {len(really_bad)}")
if really_bad:
for order in really_bad:
old_ref = order.pos_reference
new_ref = f"Order {order.id:05d}-001-0001"
order.write({'pos_reference': new_ref})
print(f" Fixed id={order.id}: '{old_ref}' -> '{new_ref}'")
print(f"\nFixed {len(really_bad)} orders. Try opening POS again.")
else:
print("\nAll pos_references look valid!")
print("The error might be from a DIFFERENT cause.")
print("Check: is the pricelist_id or sequence_id returning None?")

Binary file not shown.

Binary file not shown.