From db2f280683b29ac5d32158f3fab0f3df671935e9 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 21 Dec 2022 18:48:38 +0700 Subject: add website categories homepage module --- indoteknik_custom/models/__init__.py | 1 + indoteknik_custom/models/website_categories_homepage.py | 14 ++++++++++++++ indoteknik_custom/models/x_manufactures.py | 1 + 3 files changed, 16 insertions(+) create mode 100644 indoteknik_custom/models/website_categories_homepage.py (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 17ad7b8d..dc85ce96 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -34,3 +34,4 @@ from . import website_user_cart from . import website_user_wishlist from . import website_brand_homepage from . import mail_mail +from . import website_categories_homepage diff --git a/indoteknik_custom/models/website_categories_homepage.py b/indoteknik_custom/models/website_categories_homepage.py new file mode 100644 index 00000000..612dd8a0 --- /dev/null +++ b/indoteknik_custom/models/website_categories_homepage.py @@ -0,0 +1,14 @@ +from odoo import fields, models + + +class WebsiteCategoriesHomepage(models.Model): + _name = 'website.categories.homepage' + + category_id = fields.Many2one('product.public.category', string='Category', help='table ecommerce category') + image = fields.Binary(string='Image') + url = fields.Char(string='URL') + sequence = fields.Integer(string='Sequence') + status = fields.Selection([ + ('tayang', 'Tayang'), + ('tidak_tayang', 'Tidak Tayang') + ], string='Status') diff --git a/indoteknik_custom/models/x_manufactures.py b/indoteknik_custom/models/x_manufactures.py index dae37668..24b64c14 100755 --- a/indoteknik_custom/models/x_manufactures.py +++ b/indoteknik_custom/models/x_manufactures.py @@ -35,6 +35,7 @@ class XManufactures(models.Model): ('sparepart', 'Spare Part') ], string="Jenis Produk") x_short_desc = fields.Text(string="Short Description") + product_tmpl_ids = fields.One2many('product.template', 'x_manufacture', string='Product Templates') @api.onchange('x_name','image_promotion_1','image_promotion_2') def update_solr_flag(self): -- cgit v1.2.3