summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/x_manufactures.py
blob: b32d257d5afc2f9300e9409ea510efc665ab9643 (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
35
36
37
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_logo_manufacture_128 = fields.Image("Image 128", related="x_logo_manufacture", max_width=128, max_height=128, store=True)
    image_promotion_1 = fields.Binary(string="Promotion Image 1")
    image_promotion_2 = fields.Binary(string="Promotion Image 2")
    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")