mirror of https://github.com/OCA/web.git
[IMP] web_editor_class_selector: Order classes by sequence
parent
d8b634050d
commit
243e9ef17c
|
@ -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.",
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue