| __pycache__ | ||
| models | ||
| static/src | ||
| views | ||
| __init__.py | ||
| __manifest__.py | ||
| README.md | ||
POS Order Line Discount
This module converts order-level discounts (like global discount and loyalty program reward discount) to order line discounts in the Point of Sale.
Features
- Convert order-level discounts to line-level discounts
- Support for loyalty program rewards
- Configurable discount distribution methods
- Maintain proper tax calculations
Configuration
- Go to Point of Sale > Configuration > Point of Sale
- Select your POS configuration
- In the Pricing section, you'll find:
- Line Discount Type: Choose between percentage or fixed amount distribution
- Apply Line Discount on Rewards: Enable to convert loyalty rewards to line discounts
How it works
The module works by intercepting the reward application process and distributing the discount amount across all order lines instead of creating a separate reward line. This ensures that:
- All discounts are visible at the line level
- Tax calculations are properly maintained
- Reporting shows discounts at the line level
Technical Details
The module patches the following components:
- PosOrder model: Processes rewards as line discounts during order creation
- PosConfig model: Adds configuration options for discount distribution
- Order model (JS): Overrides reward application to distribute discounts to lines
- Orderline model (JS): Enhances line discount handling
Compatibility
This module is compatible with Odoo 17 and requires:
- point_of_sale
- pos_loyalty
Installation
- Place the module in your Odoo addons directory
- Update the apps list
- Install the "POS Order Line Discount" module
- Configure your POS settings as needed