diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-09-11 13:18:02 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-09-11 13:18:02 +0700 |
| commit | 1694e042acb29b476815d29f54f2ec95d37883be (patch) | |
| tree | d502c76d333cc4c0602e01a98eeb7fb7f0461c01 /indoteknik_custom/models/voucher_line.py | |
| parent | 02c2304b242245250177fec6ab3c911d9acba781 (diff) | |
| parent | 9a630354c1d00e218595db9b2e8cd0b7df9ed97c (diff) | |
Merge branch 'feature/voucher-group' into production
Diffstat (limited to 'indoteknik_custom/models/voucher_line.py')
| -rw-r--r-- | indoteknik_custom/models/voucher_line.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indoteknik_custom/models/voucher_line.py b/indoteknik_custom/models/voucher_line.py new file mode 100644 index 00000000..8b449d1f --- /dev/null +++ b/indoteknik_custom/models/voucher_line.py @@ -0,0 +1,20 @@ +from odoo import models, fields + + +class Voucher(models.Model): + _name = 'voucher.line' + + voucher_id = fields.Many2one('voucher', string='Voucher') + manufacture_id = fields.Many2one('x_manufactures', string='Brand') + min_purchase_amount = fields.Integer(string='Min. Purchase Amount', help='Nominal minimum untuk dapat menggunakan voucher. Isi 0 jika tidak ada minimum purchase amount') + discount_amount = fields.Integer(string='Discount Amount') + discount_type = fields.Selection(string='Discount Type', + selection=[ + ('percentage', 'Percentage'), + ('fixed_price', 'Fixed Price'), + ], + help='Select the type of discount:\n' + '- Percentage: Persentase dari total harga.\n' + '- Fixed Price: Jumlah tetap yang dikurangi dari harga total.' + ) + max_discount_amount = fields.Integer(string='Max. Discount Amount', help='Max nominal terhadap persentase diskon')
\ No newline at end of file |
