0% found this document useful (0 votes)
20 views2 pages

Pos Seller Cashier

The document outlines the implementation of a project to manage products sold by weight using Odoo 8, involving two custom modules: Seller and Cashier. The Seller module calculates price based on weight and generates barcode labels, while the Cashier module scans these barcodes for order processing without recalculating prices. It details the technical environment, development phases, and functional constraints necessary for successful implementation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Pos Seller Cashier

The document outlines the implementation of a project to manage products sold by weight using Odoo 8, involving two custom modules: Seller and Cashier. The Seller module calculates price based on weight and generates barcode labels, while the Cashier module scans these barcodes for order processing without recalculating prices. It details the technical environment, development phases, and functional constraints necessary for successful implementation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Project Objective

What it is: Defines the overall purpose and scope: manage products sold by weight via two
modules (Seller and Cashier).
Odoo 8 Implementation:

• Two custom addons: pos_vendeur (Seller) and an extension of the standard


point_of_sale (Cashier).

• Seller module calculates weight×price, prints a barcode label.

• POS module scans that barcode and adds the pre-calculated line to the order (no re-
calculation).

2. Technical Environment

What it is: Lists technologies, dependencies and tools.


Odoo 8 Implementation:

• ERP: Odoo 8 on PostgreSQL.

• Languages: Python (models), XML (views), JavaScript (POS UI).

• Modules loaded in debug mode so views reload without restarting server.

• Use barcode widget in XML and custom JS in static/src/js.

3. Modules to Build

3.1 Seller Module (pos_vendeur)

What it is: A back-office interface to weigh products and generate barcode labels.
Odoo 8 Implementation Steps:

1. Model pos.vendeur.line in Python with fields:

o produit_id (many2one → product.product)

o poids (float), prix_total (float), code_barre (char), date_creation (datetime)

2. XML views (form & tree) to enter weight and trigger barcode creation.

3. Python logic in model’s create() or a button method to compute prix_total,


assemble a unique code_barre (e.g. “PROD-ID-WEIGHT-TIMESTAMP”), and call a
QWeb report to print the label.
3.2 Cashier Extension (POS)

What it is: Extends Odoo’s built-in POS to scan and process Seller barcodes.
Odoo 8 Implementation Steps:

1. Model Inheritance: in Python, inherit pos.order, add cashier_name field, override


create_from_ui to include it.

2. JavaScript (static/src/js/pos_cashier.js):

o On POS load, RPC-fetch active cashiers (pos.cashier).

o Render a <select> dropdown in the POS UI for cashier selection.

o Intercept scanned barcode, parse out product/weight/price, and add order


line with those exact values.

3. QWeb Templates (static/src/xml/pos_cashier.xml): define the dropdown area and


ensure cashier name appears on receipts.

4. Development Phases

1. Analysis & Data Modeling: define Python models and XML views, sketch the
workflow: weigh → label → scan → sale.

2. Build Seller Module: implement model, barcode logic, QWeb label report.

3. Integrate with POS: inherit pos.order, add JS dropdown & scan handler.

4. Testing: verify label generation, barcode scanning, offline LocalStorage behavior,


and confirm POS does not recalculate price.

5. Delivery: package each addon (.zip or .tar.gz), provide installation/configuration


instructions, user guide.

5. Functional Constraints

• Immutable price in POS: use the seller’s computed price without modification.

• Unique barcode: include timestamp or UUID to avoid duplicates.

• Offline capability: POS must queue scanned items in browser LocalStorage and
sync when online.

You might also like