<?xml version="1.0"?>
<terp>
<data>

	<menuitem name="Tools/Subscriptions/Definitions" groups="admin"/>
	<!--
	=======================================================
	Subscription Views
	=======================================================
	-->
	<record model="ir.ui.view" id="view_subscription_form">
		<field name="name">subscription.subscription.form</field>
		<field name="model">subscription.subscription</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Subscriptions">
				<notebook>
				<page string="Subsription Data">
					<field name="name" select="1"/>
					<field name="active" select="1"/>
					<field name="user_id" select="1"/>
					<field name="partner_id" select="1"/>
					<newline/>
					<field name="interval_number"/>
					<field name="interval_type"/>
					<field name="exec_init"/>
					<field name="date_init"/>
					<field name="doc_source" colspan="3" widget="reference"/>
					<field name="notes" colspan="3"/>
					<separator string="State" colspan="4"/>
					<field name="cron_id" colspan="4" readonly="1"/>
					<field name="state" readonly="1"/>
					<group col="3" colspan="2">
						<button name="set_process" states="draft" string="Process" type="object"/>
						<button name="set_done" states="running" string="Stop" type="object"/>
						<button name="set_draft" states="done" string="Set to Draft" type="object"/>
					</group>
				</page><page string="Documents created">
					<field name="doc_lines" colspan="4" nolabel="1" widget="one2many_list"/>
				</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_subscription_form">
		<field name="name">subscription.subscription.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">subscription.subscription</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_subscription_form"/>
	</record>
	<menuitem name="Tools/Subscriptions/All Subscriptions" id="menu_action_subscription_form" action="action_subscription_form"/>

	<record model="ir.ui.view" id="subscription_subscription_history_tree">
		<field name="name">subscription.subscription.history.tree</field>
		<field name="model">subscription.subscription.history</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Subscription History">
				<field name="date"/>
				<field name="name"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="subscription_subscription_history_form">
		<field name="name">subscription.subscription.history.form</field>
		<field name="model">subscription.subscription.history</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Subscription History">
				<field name="name"/>
				<field name="date"/>
				<newline/>
				<field name="document_id" colspan="3" widget="reference"/>
			</form>
		</field>
	</record>

	<record model="ir.ui.view" id="document_form">
		<field name="name">subscription.document.form</field>
		<field name="model">subscription.document</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Subscription Document">
				<field name="name" select="1"/>
				<field name="active" select="1"/>
				<field name="model" select="1"/>
				<field name="workflow_action"/>
				<newline/>
				<field name="field_ids" colspan="3" widget="one2many_list"/>
			</form>
		</field>
	</record>

	<record model="ir.ui.view" id="v2">
		<field name="name">subscription.document.fields.form</field>
		<field name="model">subscription.document.fields</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Subscription Document Fields">
				<field name="name"/>
				<newline/>
				<field name="field"/>
				<field name="value"/>
			</form>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_document_form">
		<field name="name">subscription.document.form</field>
		<field name="type">ir.actions.act_window</field>
		<field name="res_model">subscription.document</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="document_form"/>
	</record>
	<menuitem name="Tools/Subscriptions/Definitions/Document Types" id="menu_action_document_form" action="action_document_form"/>
</data>
</terp>
