[IMP] web_editor_class_selector: Order classes by sequence

pull/3096/head
Pedro M. Baeza 2025-02-19 09:01:37 +01:00
parent d8b634050d
commit 243e9ef17c
2 changed files with 4 additions and 0 deletions

View File

@ -4,8 +4,10 @@ from odoo import fields, models
class WebEditorClass(models.Model):
_name = "web.editor.class"
_description = "Web editor class selector"
_order = "sequence,id"
name = fields.Char(required=True)
sequence = fields.Integer(default=10)
class_name = fields.Char(
required=True,
help="The class name to be added to the tag. It must be created in the CSS file.",

View File

@ -6,6 +6,7 @@
<field name="model">web.editor.class</field>
<field name="arch" type="xml">
<tree>
<field name="sequence" widget="handle" />
<field name="name" />
<field name="class_name" />
</tree>
@ -25,6 +26,7 @@
</h1>
</div>
<group>
<field name="sequence" />
<field name="class_name" placeholder="Some CSS class" />
</group>
</sheet>