chore: update gitignore patterns and rewrite module documentation for clarity
This commit is contained in:
parent
b2964f66ec
commit
8323efc5af
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,15 +1,18 @@
|
|||||||
# Python
|
# Python
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
|
__pycache__/
|
||||||
|
|
||||||
# OS
|
# OS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
# Editor
|
# IDE / Editors
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
# Odoo
|
# Odoo specific
|
||||||
*.pot
|
*.pot
|
||||||
|
|||||||
55
README.md
55
README.md
@ -1,44 +1,11 @@
|
|||||||
# POS Loyalty Discount Before Tax
|
# POS Loyalty Discount Before Tax
|
||||||
|
|
||||||
This module modifies the loyalty reward discount calculation in POS to apply discounts before tax calculation and ensures that discount values are displayed as tax-exclusive in both the POS receipt and accounting entries.
|
## Overview
|
||||||
|
This custom Odoo 19 module modifies the standard Point of Sale (POS) loyalty reward calculation. By default, Odoo may calculate certain loyalty discounts after taxes. This module ensures that loyalty discounts are applied **before** tax calculations, meaning the tax is calculated based on the discounted subtotal.
|
||||||
## Features
|
|
||||||
|
## Features
|
||||||
1. **Discount Calculation Before Tax**: All loyalty rewards are calculated on the tax-exclusive amount rather than the tax-inclusive amount.
|
- Overrides standard loyalty reward logic in the POS frontend.
|
||||||
|
- Ensures tax amounts accurately reflect the post-discount price.
|
||||||
2. **Tax-Exclusive Display**: Discount values are displayed as tax-exclusive in the POS receipt.
|
|
||||||
|
## Author
|
||||||
|
- **Suherdy Yacob**
|
||||||
|
|
||||||
## Technical Changes
|
|
||||||
|
|
||||||
### JavaScript Changes
|
|
||||||
|
|
||||||
- Modified `static/src/overrides/models/loyalty.js` to calculate discounts on tax-exclusive amounts
|
|
||||||
- Ensured discount line values are tax-exclusive for display purposes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. Copy the module to your Odoo addons directory
|
|
||||||
2. Update the apps list in Odoo
|
|
||||||
3. Install the "POS Loyalty Discount Before Tax" module
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
No additional configuration is required. The module automatically applies the changes to all loyalty programs in POS.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
The module works automatically with all existing loyalty programs. Discounts will be calculated on tax-exclusive amounts and displayed as such in the POS interface and accounting entries.
|
|
||||||
|
|
||||||
## Compatibility
|
|
||||||
|
|
||||||
This module is compatible with Odoo 17 and requires the following modules:
|
|
||||||
- point_of_sale
|
|
||||||
- pos_loyalty
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
LGPL-3
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user