<?xml version="1.0" ?>
<terp>
	<data>
		<record model="ir.ui.view" id="view_audittrail_rule_form">
			<field name="name">audittrail.rule.form</field>
			<field name="model">audittrail.rule</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="AuditTrail Rule">
					<field name="name" select="1" required="1"/>
					<field name="object_id" select="1"/>
					<field name="log_read" />
					<field name="log_write" />
					<field name="log_unlink" />
					<field name="log_create" />
					<field name="user_id" select="1" colspan="3"/>
					<field name="state" select="1" readonly="1" />
					<group colspan="2" col="2">
						<button string="Subscribe" name="subscribe" type="object" states="draft"/>
						<button string="UnSubscribe" name="unsubscribe" type="object"  states="subscribed"/>
					</group>
				</form>
			</field>
		</record>
		<record model="ir.ui.view" id="view_audittrail_rule_tree">
			<field name="name">audittrail.rule.tree</field>
			<field name="model">audittrail.rule</field>
			<field name="type">tree</field>
			<field name="arch" type="xml">
				<tree string="AuditTrail Rules">
					<field name="name" />
					<field name="object_id" />
					<field name="user_id" />
					<field name="log_read" />
					<field name="log_write" />
					<field name="log_unlink" />
					<field name="log_create" />
					<field name="state" />
				</tree>
			</field>
		</record>
		<record model="ir.actions.act_window" id="action_audittrail_rule_tree">
			<field name="name">audittrail.rule.form</field>
			<field name="res_model">audittrail.rule</field>
			<field name="view_type">form</field>
			<field name="view_id" ref="view_audittrail_rule_form" />
		</record>
		<menuitem name="Administration/AuditTrails/Rules" id="menu_action_audittrail_rule_tree" action="action_audittrail_rule_tree"/>

		<record model="ir.actions.act_window" id="action_audittrail_rule_tree_sub">
			<field name="name">audittrail.rule.form</field>
			<field name="res_model">audittrail.rule</field>
			<field name="view_type">form</field>
			<field name="view_mode">tree,form</field>
			<field name="domain">[('state','=','subscribed')]</field>
		</record>
		<menuitem name="Administration/AuditTrails/Rules/Subscribed Rules" id="menu_action_audittrail_rule_tree_sub" action="action_audittrail_rule_tree_sub"/>

		<record model="ir.ui.view" id="view_audittrail_log_form">
			<field name="name">audittrail.log.form</field>
			<field name="model">audittrail.log</field>
			<field name="type">form</field>
			<field name="arch" type="xml">
				<form string="AuditTrail Logs">
					<field name="timestamp" select="1" required="1" readonly="1"/>
					<field name="object_id" select="1" readonly="1"/>
					<field name="method" select="1" readonly="1"/>
					<field name="user_id" select="1" readonly="1"/>
					<field name="args" select="1" readonly="1" colspan="3"/>
				</form>
			</field>
		</record>
		
		<record model="ir.ui.view" id="view_audittrail_log_tree">
			<field name="name">audittrail.log.tree</field>
			<field name="model">audittrail.log</field>
			<field name="type">tree</field>
			<field name="arch" type="xml">
				<tree string="AuditTrail Logs">
					<field name="timestamp" />
					<field name="object_id" />
					<field name="method" />
					<field name="user_id" />
				</tree>
			</field>
		</record>
		
		<record model="ir.actions.act_window" id="action_audittrail_log_tree">
			<field name="name">audittrail.log.tree</field>
			<field name="res_model">audittrail.log</field>
			<field name="view_type">form</field>
		</record>
		<menuitem name="Administration/AuditTrails/Logs" id="menu_action_audittrail_log_tree" action="action_audittrail_log_tree"/>
</data>
</terp>
