pos_loyalty_auto_level/__manifest__.py

32 lines
1.8 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'POS Loyalty Auto Level Update',
'version': '1.0',
'category': 'Sales/Point of Sale',
'summary': 'Automatically update customer membership level after POS transactions',
'author': 'Abdul Aziz Amrullah',
'description': """
POS Loyalty Auto Level Update
================================
This module automates the management of customer loyalty membership tiers directly within the Point of Sale system.
Key Features:
1. **Automated Lifetime Spend Tracking**: After every POS sale or refund, the module increments or decrements a new `total_spend` field on the customer's `res.partner` profile.
2. **Tier Evaluation**: Compares the customer's `total_spend` against the `minimum_spend` thresholds defined on `loyalty.program` records (specifically those marked as `multi_level_membership`).
3. **Seamless Upgrades/Downgrades**: Automatically determines the highest qualifying membership level and updates the customer's `membership_level_id` synchronously.
4. **Intelligent Point Consolidation**: If a customer changes tiers, the module seamlessly sweeps loyalty points from any of their older tier cards and consolidates them into the new membership card. This happens synchronously to ensure all points are perfectly transferred without race conditions.
5. **High Performance**: Evaluates membership instantly without recalculating the entire transaction history by leveraging the `total_spend` field.
""",
'depends': ['point_of_sale', 'pos_loyalty'],
'data': [
'views/res_partner_views.xml',
],
'assets': {
'point_of_sale._assets_pos': [
'pos_loyalty_auto_level/static/src/app/**/*',
],
},
'installable': True,
'application': False,
'license': 'LGPL-3',
}