summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/price_group.py
blob: 2a1bbc918bbb87678458b45a7e727cf0e5137362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from odoo import fields, models, api
from odoo.exceptions import UserError
import logging

_logger = logging.getLogger(__name__)


class PriceGroup(models.Model):
    _name = 'price.group'
    
    name = fields.Char(string='Name')
    pricelist_id = fields.Many2one('product.pricelist', string='Price List')
    group1 = fields.Float(string='Kelompok 1 (%)')
    group2 = fields.Float(string='Kelompok 2 (%)')
    group3 = fields.Float(string='Kelompok 3 (%)')
    group4 = fields.Float(string='Kelompok 4 (%)')
    group5 = fields.Float(string='Kelompok 5 (%)')
    group6 = fields.Float(string='Kelompok 6 (%)')
    group7 = fields.Float(string='Kelompok 7 (%)')
    group8 = fields.Float(string='Kelompok 8 (%)')
    
class Manufacture(models.Model):
    _inherit = 'x_manufactures'
    
    pricing_group = fields.Selection([
        ('group1', 'Kelompok 1'),
        ('group2', 'Kelompok 2'),
        ('group3', 'Kelompok 3'),
        ('group4', 'Kelompok 4'),
        ('group5', 'Kelompok 5'),
        ('group6', 'Kelompok 6'),
        ('group7', 'Kelompok 7'),
        ('group8', 'Kelompok 8'),
    ], string='Pricing Group', copy=False)