diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-12-21 14:12:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-12-21 14:12:50 +0700 |
| commit | a553bc46cd42aa5e56a9e438d959c32bd70d10b4 (patch) | |
| tree | e4573bc916edae90ad31b1a1a3b34c9af6653253 | |
| parent | 8b681ddd7cf2823bdf7cd276500bb6ded9a5ab1e (diff) | |
add frontend sequence for category website
| -rwxr-xr-x | indoteknik_custom/models/product_public_category.py | 4 | ||||
| -rwxr-xr-x | indoteknik_custom/views/product_public_category.xml | 2 |
2 files changed, 6 insertions, 0 deletions
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 @@ <field name="website_meta_description"/> <!-- <field name="image_1024" string="Image Small" widget="image"/>--> <field name="x_studio_field_4qhoN"/> + <field name="sequence_frontend"/> + <field name="parent_frontend_id"/> </xpath> <xpath expr="//form[1]/sheet[1]/div[1]/group[1]" position="after"> <notebook> |
