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.Float(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')