Skip to content

Sales Extensions

Custom sales order enhancements for window blinds business operations.

Module Overview

Module Technical Name Version Description
Product Dimensions bi_product_dimension 15.0.1.0.0 Core blinds pricing based on Width x Height
Sale Order Photos jdx_sale_order_photos 15.0.1.0.0 S3 photo gallery on sale orders
Copy Sale/Purchase Lines bi_copy_sale_purchase_line 15.0.1.0.0 Duplicate order lines quickly
Customer Payment Method customer_payment_method 15.0.1.0.0 Payment selection and auto-invoicing

Product Dimensions (Core Module)

See Product Dimensions for complete documentation.

The bi_product_dimension module is the core business logic for window blinds:

  • Dimension-based pricing (m2 calculation)
  • Premium add-on cost calculation
  • Configurable order sequence prefixes
  • 1 SO = 1 PO enforcement
  • PO line split for individual tracking

Customer Payment Method

Field Value
Technical Name customer_payment_method
Version 15.0.1.0.0
Category Sales
Dependencies sale, account

Overview

Enables customers to select their preferred payment method on the portal when accepting quotations, and automatically creates a 50% deposit invoice on order confirmation.

Payment Options

Option Description
Cash Pay with cash
Check Pay by check
Wire Transfer Bank wire transfer
Zelle Zelle payment
Credit Card Credit card payment
Online Payment Online payment gateway

Portal Flow

flowchart TD
    A[Customer Opens Portal] --> B[Reviews Quotation]
    B --> C[Clicks Accept & Sign]
    C --> D[Payment Method Modal]
    D --> E[Selects Payment Method]
    E --> F[Signs Quotation]
    F --> G[Order Confirmed]
    G --> H[50% Deposit Invoice Created]

Auto-Invoice Logic

When a customer signs and accepts a quotation on the portal:

  1. Validates signature is present (signed_by, signed_on, signature)
  2. Automatically creates 50% deposit invoice
  3. Invoice kept in draft for manual adjustment if needed
# Triggered on action_confirm()
if signed_by and signed_on and signature:
    create 50% deposit invoice

Sale Order Fields

Field Type Description
customer_payment_methods Selection Selected payment method
down_payment_total_amount Computed Total deposit amount paid
remaining_total_amount Computed Remaining balance due

Configuration

No additional configuration required. Module activates on install.

Copy Sale/Purchase Lines

Field Value
Technical Name bi_copy_sale_purchase_line
Version 15.0.1.0.0
Category Sales
Dependencies sale, purchase

Overview

Adds a copy button to each sale order line for quick duplication. Essential for window blinds where customers often order the same product with different dimensions for each window.

Features

  • Copy Button on each sale order line
  • Duplicates line with same product and settings
  • Resets dimension fields for new entry:
  • item_location_id → empty
  • width → 0
  • height → 0

Usage

  1. Open Sale Order in edit mode
  2. Click Copy icon on line to duplicate
  3. Enter new location and dimensions
  4. Repeat for additional windows
flowchart LR
    A[Line: Living Room 1000x1500] --> B[Click Copy]
    B --> C[New Line: Empty 0x0]
    C --> D[Enter: Bedroom 800x1200]

JDX Sale Order Photos

Field Value
Technical Name jdx_sale_order_photos
Version 15.0.1.0.0
Category Sales
Dependencies sale
Python Dependencies boto3

Overview

Displays photos uploaded via Flask PWA that are stored in AWS S3 and linked to sale orders via ir.attachment.

Features

  • Photo Count Smart Button - Shows number of attached photos
  • Photo Gallery View - Display S3 images with pre-signed URLs
  • S3 Mixin - Reusable pre-signed URL generation
  • Shared Credentials - Uses same AWS config as jdx_service_signature

Usage

  1. Open Sale Order
  2. Click Photos smart button (shows count)
  3. View photo gallery with thumbnails
  4. Click image to view full size

S3 Pre-signed URLs

Photos are stored in S3 and displayed using temporary pre-signed URLs:

# URL expires after 1 hour (3600 seconds)
presigned_url = s3_client.generate_presigned_url(
    'get_object',
    Params={'Bucket': bucket, 'Key': key},
    ExpiresIn=3600
)

Configuration

Uses same S3 credentials as Service Signature module:

System Parameter Description
jdx_service_signature.s3_access_key AWS Access Key ID
jdx_service_signature.s3_secret_key AWS Secret Access Key
jdx_service_signature.s3_bucket S3 bucket name
jdx_service_signature.s3_region AWS region

Photo Upload Flow

flowchart LR
    A[Flask PWA] --> B[Upload to S3]
    B --> C[Create ir.attachment]
    C --> D[Link to Sale Order]
    D --> E[View in Odoo]
  1. Technician captures photo in Field PWA
  2. PWA uploads to S3 bucket
  3. Creates ir.attachment with S3 path
  4. Attachment linked to sale order
  5. Odoo displays via pre-signed URL

Complete Sales Workflow

Prerequisite: MTO Route

Products must have Replenish on Order (MTO) + Buy routes enabled for automatic PO creation. See MTO Configuration.

AUSTINJDX SALES FLOW

1. QUOTATION
   ├── Add product lines with Width/Height (mm)
   ├── Select options: Mount, Control, Valance, etc.
   ├── System calculates: m2, net_price, additional costs
   └── Send quotation to customer (portal)

2. CUSTOMER PORTAL
   ├── Review quotation
   ├── Select payment method (popup modal)
   └── Sign & Accept

3. ORDER CONFIRMATION
   ├── Validate signature
   ├── Calculate additional costs (premium options)
   ├── Auto-create 50% deposit invoice
   └── Generate purchase orders (MTO route required!)

4. PURCHASE ORDER
   ├── Confirm PO to vendor
   ├── Receive products (validate receipt)
   └── Products now in stock

5. DELIVERY
   ├── Prepare shipment
   ├── Validate delivery
   └── Auto-create FSM Order (Install type)

6. FIELD SERVICE
   ├── Schedule installation
   ├── Customer signature on completion
   ├── Load warranty template
   └── Send completion report

7. FINAL INVOICE
   └── Invoice remaining 50% balance

Installation

# Install all sales extensions
docker compose exec odoo odoo \
  -i bi_product_dimension,customer_payment_method,bi_copy_sale_purchase_line,jdx_sale_order_photos \
  --stop-after-init -d DATABASE_NAME

# Install boto3 if not present (for photos)
docker compose exec odoo pip install boto3

Module Structure

jdx_sale_order_photos

jdx_sale_order_photos/
├── __manifest__.py
├── __init__.py
├── models/
│   ├── __init__.py
│   └── sale_order.py         # Smart button and gallery
├── views/
│   └── sale_order_views.xml  # Form view extension
└── security/
    └── ir.model.access.csv

customer_payment_method

customer_payment_method/
├── __manifest__.py
├── __init__.py
├── models/
│   ├── __init__.py
│   └── sale_order.py         # Payment fields, auto-invoice
├── views/
│   └── sale_order_views.xml  # Portal modal, form fields
└── controllers/
    └── portal.py             # Portal sign/accept override

Troubleshooting

Photos Not Displaying

  1. Verify S3 credentials are configured
  2. Check boto3 is installed
  3. Verify bucket permissions allow GetObject
  4. Check Odoo logs for S3 errors

Smart Button Shows 0

  1. Verify attachments exist for sale order
  2. Check ir.attachment.res_model = 'sale.order'
  3. Check ir.attachment.res_id matches sale order ID

50% Invoice Not Created

  1. Verify customer signed via portal (signature, signed_by, signed_on)
  2. Check order was confirmed after signing
  3. Review Odoo logs for invoice creation errors

Copy Button Not Working

  1. Verify module is installed and upgraded
  2. Check user has edit permission on sale orders
  3. Order must be in draft/quotation state