Source

trytond-subscription / subscription.xml

Full commit
<?xml version="1.0"?>
<!-- This file is part of subscription module of Tryton.
The COPYRIGHT file at the top level of this repository contains the full
copyright notices and license terms. -->
<tryton>
    <data>

        <record model="res.group" id="group_subscription_admin">
            <field name="name">Subscription Administration</field>
        </record>
        <record model="res.user-res.group" id="user_admin_group_subscription_admin">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_subscription_admin"/>
        </record>
        <record model="res.user-res.group" id="user_trigger_group_subscription_admin">
            <field name="user" ref="res.user_trigger"/>
            <field name="group" ref="group_subscription_admin"/>
        </record>

        <menuitem name="Subscription" id="menu_main_subscription"
                parent="ir.menu_administration"/>

<!-- subscription.subscription -->
        <record model="ir.ui.view" id="subscription_subscription_view_tree">
            <field name="model">subscription.subscription</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                    <tree string="Subscriptions">
                        <field name="name"/>
                        <field name="user"/>
                        <field name="request_user"/>
                        <field name="request_group"/>
                        <field name="interval_number"/>
                        <field name="interval_type"/>
                        <field name="number_calls"/>
                        <field name="next_call"/>
                        <field name="state"/>
                        <field name="cron"/>
                        <field name="active"/>
                    </tree>
                    ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="subscription_subscription_view_form">
            <field name="model">subscription.subscription</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                    <form string="Subscription" col="6">
                        <label name="name"/>
                        <field name="name" xexpand="1"/>
                        <label name="active"/>
                        <field name="active" xexpand="0"/>
                        <newline/>
                        <label name="user"/>
                        <field name="user" xexpand="1"/>
                        <label name="request_user"/>
                        <field name="request_user" xexpand="1"/>
                        <label name="request_group"/>
                        <field name="request_group" xexpand="1"/>
                        <notebook colspan="6">
                            <page string="Subsription Data"
                                    id="subsription_data" col="6">
                                <label name="interval_type"/>
                                <field name="interval_type" colspan="5"/>
                                <label name="interval_number"/>
                                <field name="interval_number"/>
                                <label name="number_calls"/>
                                <field name="number_calls"/>
                                <label name="next_call"/>
                                <field name="next_call"/>
                                <label name="model_source"/>
                                <field name="model_source" colspan="5"/>
                                <label name="cron"/>
                                <field name="cron" colspan="5"/>
                                <label name="state"/>
                                <field name="state"/>
                                <group col="3" colspan="4"
                                        id="subscriptions_buttons">
                                    <button name="set_process"
                                        string="Process"
                                        icon="tryton-go-next"/>
                                    <button name="set_done"
                                        string="Stop"
                                        icon="tryton-cancel"/>
                                    <button name="set_draft"
                                        string="Set to Draft"
                                        icon="tryton-ok"/>
                                </group>
                            </page>
                            <page string="Computed Fields" id="computed_lines">
                                <field name="lines" colspan="4"/>
                            </page>
                            <page string="Notes" id="notes">
                                <field name="note" colspan="4"/>
                            </page>
                        </notebook>
                    </form>
                    ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="act_subscription_subscription">
            <field name="name">Subscriptions</field>
            <field name="res_model">subscription.subscription</field>
        </record>

        <record model="ir.action.act_window.view" id="act_subscription_subscription_tree_view">
            <field name="sequence" eval="10"/>
            <field name="view" ref="subscription_subscription_view_tree"/>
            <field name="act_window" ref="act_subscription_subscription"/>
        </record>

        <record model="ir.action.act_window.view" id="act_subscription_subscription_form_view">
            <field name="sequence" eval="20"/>
            <field name="view" ref="subscription_subscription_view_form"/>
            <field name="act_window" ref="act_subscription_subscription"/>
        </record>

        <menuitem name="Subscriptions"
            parent="menu_main_subscription"
            sequence="1" id="menu_subscription_subscription"
            action="act_subscription_subscription"/>

        <record model="ir.model.access" id="access_subscription">
            <field name="model" search="[('model', '=', 'subscription.subscription')]"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.model.access" id="access_subscription_admin">
            <field name="model" search="[('model', '=', 'subscription.subscription')]"/>
            <field name="group" ref="group_subscription_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

<!-- subscription.line -->
        <record model="ir.ui.view" id="subscription_line_view_tree">
            <field name="model">subscription.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                    <tree string="Fields">
                        <field name="name"/>
                        <field name="subscription"/>
                    </tree>
                    ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="subscription_line_view_form">
            <field name="model">subscription.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                    <form string="Field" col="6">
                        <label name="name"/>
                        <field name="name"/>
                        <label name="subscription"/>
                        <field name="subscription"/>
                        <separator string="Value" id="value"
                                colspan="6"/>
                        <field name="value" colspan="6"/>
                    </form>
                    ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="act_subscription_line">
            <field name="name">Fields</field>
            <field name="res_model">subscription.line</field>
        </record>

        <record model="ir.action.act_window.view" id="act_subscription_line_tree_view">
            <field name="sequence" eval="10"/>
            <field name="view" ref="subscription_line_view_tree"/>
            <field name="act_window" ref="act_subscription_line"/>
        </record>

        <record model="ir.action.act_window.view" id="act_subscription_line_form_view">
            <field name="sequence" eval="20"/>
            <field name="view" ref="subscription_line_view_form"/>
            <field name="act_window" ref="act_subscription_line"/>
        </record>

        <menuitem name="Fields"
            parent="menu_main_subscription"
            sequence="1" id="menu_subscription_line"
            action="act_subscription_line"/>

        <record model="ir.model.access" id="access_subscription_line">
            <field name="model" search="[('model', '=', 'subscription.line')]"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.model.access" id="access_subscription_line_admin">
            <field name="model" search="[('model', '=', 'subscription.line')]"/>
            <field name="group" ref="group_subscription_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

    </data>
</tryton>