summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/x_manufactures.py
blob: 8aff7f267698a18fd5357102e5a6faa26c6bbbd6 (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 models, fields


class XManufactures(models.Model):
    _name = 'x_manufactures'
    _description = "Manufactures"
    _rec_name = "x_name"

    x_name = fields.Char(string="Name")
    x_description = fields.Html(string="Description")
    x_logo_manufacture = fields.Binary(string="Logo Manufacture")
    x_manufacture_level = fields.Selection([
        ('prioritas', 'Prioritas'),
        ('gold', 'Gold'),
        ('silver', 'Silver')
    ], string="Manufacture Level")
    x_manufacture_product = fields.One2many(
        comodel_name="product.template",
        inverse_name="x_manufacture",
        string="Relasi Produk"
    )
    x_manufacture_service_center = fields.Many2many("res.partner", string="Service Center")
    x_manufactures_banners = fields.One2many(
        comodel_name="x_banner.banner",
        inverse_name="x_relasi_manufacture",
        string="Relasi Manufacture Banner"
    )
    x_negara_asal = fields.Char(string="Negara Asal")
    x_produk_aksesoris_sparepart = fields.Selection([
        ('produk', 'Produk'),
        ('aksesoris', 'Aksesoris'),
        ('sparepart', 'Spare Part')
    ], string="Jenis Produk")
    x_short_desc = fields.Text(string="Short Description")