From a553bc46cd42aa5e56a9e438d959c32bd70d10b4 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 21 Dec 2022 14:12:50 +0700 Subject: add frontend sequence for category website --- indoteknik_custom/models/product_public_category.py | 4 ++++ indoteknik_custom/views/product_public_category.xml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/indoteknik_custom/models/product_public_category.py b/indoteknik_custom/models/product_public_category.py index 95122f18..45ebc26d 100755 --- a/indoteknik_custom/models/product_public_category.py +++ b/indoteknik_custom/models/product_public_category.py @@ -1,5 +1,6 @@ from odoo import fields, models + class ProductPublicCategory(models.Model): _inherit = "product.public.category" @@ -10,3 +11,6 @@ class ProductPublicCategory(models.Model): x_studio_field_d1HS4 = fields.Char(string="Name 2") x_studio_field_f54P2 = fields.Char(string="Name 3") english_name = fields.Char(string="English Name") + parent_frontend_id = fields.Many2one('product.public.category', string='Parent Frontend Category', index=True) + child_frontend_id = fields.One2many('product.public.category', 'parent_frontend_id', string='Children Frontend Categories') + sequence_frontend = fields.Integer(help="Gives the sequence order when displaying a list of product categories.", index=True) diff --git a/indoteknik_custom/views/product_public_category.xml b/indoteknik_custom/views/product_public_category.xml index 7e0eba36..3a9eb2df 100755 --- a/indoteknik_custom/views/product_public_category.xml +++ b/indoteknik_custom/views/product_public_category.xml @@ -19,6 +19,8 @@ + + -- cgit v1.2.3