diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-11-06 08:40:38 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-11-06 08:40:38 +0700 |
| commit | efa51f6b1c5254996db90a90468241da303a7e21 (patch) | |
| tree | 60e65fa89027f4ffec5162d5e429f55f60ae3b3b | |
| parent | d445d93ab8688cd63a49ac6c128dca8eccb30fde (diff) | |
new table of partner commision
| -rw-r--r-- | indoteknik_custom/models/commision.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 315e47f6..6d61de4c 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -6,6 +6,17 @@ import logging _logger = logging.getLogger(__name__) +class CustomerRebate(models.Model): + _name = 'customer.rebate' + _order = 'id desc' + _inherit = ['mail.thread'] + + partner_id = fields.Many2one('res.partner', string='Customer') + date_from = fields.Date(string='Date From', required=True) + date_to = fields.Date(string='Date To', required=True) + target_quarter = fields.Float(string='Target/Quarter') + + class CustomerCommision(models.Model): _name = 'customer.commision' _order = 'id desc' @@ -26,6 +37,14 @@ class CustomerCommision(models.Model): commision_percent = fields.Float(string='Commision %', tracking=3) commision_amt = fields.Float(string='Commision Amount', tracking=3) total_dpp = fields.Float(string='Total DPP', compute='_compute_total_dpp') + commision_type = fields.Selection([ + ('fee', 'Fee'), + ('cashback', 'Cashback'), + ('rebate', 'Rebate'), + ], string='Commision Type') + + # add status for type of commision, fee, rebate / cashback + # include child or not? @api.constrains('commision_percent') def _onchange_commision_percent(self): |
