[document_page] Implement active field

This commit is contained in:
Iván Todorovich 2018-04-24 15:06:39 -03:00
parent 4ff6f5bd5b
commit fc1e4ded0b
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,8 @@ class DocumentPage(models.Model):
default="content"
)
active = fields.Boolean(default=True)
parent_id = fields.Many2one(
'document.page',
'Category',

View File

@ -40,6 +40,11 @@
<field name="arch" type="xml">
<form string="Document Page">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" groups="document_page.group_document_manager" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/>
</button>
</div>
<field name="type" invisible="1"/>
<h1><field name="name" placeholder="Name"/></h1>
<group>