Source

trytond-contract / contract.xml

<?xml version="1.0"?>
<!-- This file is part of contract module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full
copyright notices and license terms. -->
<tryton>
    <data>
        <!-- Icon -->
        <record model="ir.ui.icon" id="contract_icon">
            <field name="name">tryton-contract</field>
            <field name="path">icons/tryton-contract.svg</field>
        </record>

        <!-- Top Menus -->
        <menuitem name="Contract" id="menu_contract" icon="tryton-contract"/>

        <!-- Groups -->
        <record model="res.group" id="group_contract">
            <field name="name">Contract User</field>
        </record>
        <record model="res.group" id="group_contract_admin">
            <field name="name">Contract Administrator</field>
        </record>
        
        <record model="res.user-res.group" id="user_admin_group_contract">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_contract"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_contract_admin">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_contract_admin"/>
        </record>

        <!-- contract.service -->
        <record model="ir.ui.view" id="contract_service_view_tree">
            <field name="model">contract.service</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Contract Service">
                    <field name="name"/>
                    <field name="interval_number"/>
                    <field name="interval_type"/>
                </tree>
                ]]> 
            </field>
        </record>

        <record model="ir.ui.view" id="contract_service_view_form">
            <field name="model">contract.service</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Contract Service" col="4">
                    <label name="name"/>
                    <field name="name"/>
                    <notebook colspan="4">
                        <page string="General" id="general">
                            <label name="interval_number"/>
                            <field name="interval_number"/>
                            <label name="interval_type"/>
                            <field name="interval_type"/>
                            <separator string="Products" colspan="4" id="product"/>
                            <field name="products" colspan="4"/>
                        </page>
                        <page string="Notes" id="notes">
                            <field name="note"/>
                        </page>
                    </notebook>
                </form>
                ]]> 
            </field>
        </record>

        <record model="ir.action.act_window" id="act_contract_service">
            <field name="name">Services</field>
            <field name="res_model">contract.service</field>
        </record>

        <record model="ir.action.act_window.view" id="act_contract_service_tree">
            <field name="sequence" eval="10"/>
            <field name="view" ref="contract_service_view_tree"/>
            <field name="act_window" ref="act_contract_service"/>
        </record>

        <record model="ir.action.act_window.view" id="act_contract_service_form">
            <field name="sequence" eval="20"/>
            <field name="view" ref="contract_service_view_form"/>
            <field name="act_window" ref="act_contract_service"/>
        </record>

        <menuitem id="menu_contract_service" parent="menu_contract" action="act_contract_service"/>
        <record model="ir.ui.menu-res.group" id="menu_group_contract_service_manager">
            <field name="menu" ref="menu_contract_service"/>
            <field name="group" ref="group_contract_admin"/>
        </record>

        <record model="ir.model.access" id="access_contract_service">
            <field name="model" search="[('model', '=', 'contract.service')]"/>
            <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_contract_service_admin">
            <field name="model" search="[('model', '=', 'contract.service')]"/>
            <field name="group" ref="group_contract_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>

        <!-- contract.service.product -->
        <record model="ir.ui.view" id="contract_service_product_view_tree">
            <field name="model">contract.service.product</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Contract Service Product">
                    <field name="quantity"/>
                    <field name="product"/>
                </tree>
                ]]> 
            </field>
        </record>

        <record model="ir.ui.view" id="contract_service_product_view_form">
            <field name="model">contract.service.product</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Contract Service Product" col="6">
                    <label name="quantity"/>
                    <field name="quantity"/>
                    <label name="product"/>
                    <field name="product"/>
                </form>
                ]]> 
            </field>
        </record>

        <record model="ir.model.access" id="access_contract_service_product">
            <field name="model" search="[('model', '=', 'contract.service.product')]"/>
            <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_contract_service_product_admin">
            <field name="model" search="[('model', '=', 'contract.service.product')]"/>
            <field name="group" ref="group_contract_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>

        <!-- contract.contract -->
        <record model="ir.ui.view" id="contract_contract_view_tree">
            <field name="model">contract.contract</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Contracts">
                    <field name="reference"/>
                    <field name="party"/>
                    <field name="service"/>
                    <field name="start_date"/>
                    <field name="end_date"/>
                    <field name="company"/>
                    <field name="state"/>
                </tree>
                ]]> 
            </field>
        </record>

        <record model="ir.ui.view" id="contract_contract_view_form">
            <field name="model">contract.contract</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Contract" col="6">
                    <label name="service"/>
                    <field name="service" widget="selection"/>
                    <label name="party"/>
                    <field name="party"/>
                    <label name="reference"/>
                    <field name="reference"/>
                    <notebook colspan="6">
                        <page string="General" id="general">
                            <label name="start_date"/>
                            <field name="start_date"/>
                            <label name="end_date"/>
                            <field name="end_date"/>
                            <group col="4" colspan="4" id="contract_buttons">
                                <label name="state" xalign="1.0" xexpand="1"/>
                                <field name="state" xalign="1.0" xexpand="0"/>
                                <group col="7" colspan="2" id="buttons">
                                    <button name="cancel" string="Cancel" icon="tryton-cancel"/>
                                    <button name="draft" string="Draft"/>
                                    <button name="hold" string="Hold" icon="tryton-go-previous"/>
                                    <button name="active" string="Active" icon="tryton-go-next"/>
                                </group>
                            </group>
                        </page>
                        <page string="Other Info" id="other">
                            <label name="company"/>
                            <field name="company"/>
                        </page>
                        <page string="Notes" id="notes">
                            <field name="note"/>
                        </page>
                    </notebook>
                </form>
                ]]> 
            </field>
        </record>

        <record model="ir.action.act_window" id="act_contract_contract">
            <field name="name">Contract</field>
            <field name="res_model">contract.contract</field>
        </record>

        <record model="ir.action.act_window.view" id="act_contract_contract_tree">
            <field name="sequence" eval="10"/>
            <field name="view" ref="contract_contract_view_tree"/>
            <field name="act_window" ref="act_contract_contract"/>
        </record>

        <record model="ir.action.act_window.view" id="act_contract_contract_form">
            <field name="sequence" eval="20"/>
            <field name="view" ref="contract_contract_view_form"/>
            <field name="act_window" ref="act_contract_contract"/>
        </record>

        <menuitem id="menu_contract_contract" parent="menu_contract" action="act_contract_contract"/>
        <record model="ir.ui.menu-res.group" id="menu_group_contract_contract">
            <field name="menu" ref="menu_contract_contract"/>
            <field name="group" ref="group_contract"/>
        </record>
        <record model="ir.ui.menu-res.group" id="menu_group_contract_contract_manager">
            <field name="menu" ref="menu_contract_contract"/>
            <field name="group" ref="group_contract_admin"/>
        </record>

        <record model="ir.model.access" id="access_contract_contract">
            <field name="model" search="[('model', '=', 'contract.contract')]"/>
            <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_contract_contract_admin">
            <field name="model" search="[('model', '=', 'contract.contract')]"/>
            <field name="group" ref="group_contract_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>

        <record model="ir.sequence.type" id="sequence_type_contract">
            <field name="name">Contract</field>
            <field name="code">contract.contract</field>
        </record>
        <record model="ir.sequence.type-res.group" id="sequence_type_contract_group_admin">
            <field name="sequence_type" ref="sequence_type_contract"/>
            <field name="group" ref="res.group_admin"/>
        </record>
        <record model="ir.sequence.type-res.group" id="sequence_type_contract_group_contract_admin">
            <field name="sequence_type" ref="sequence_type_contract"/>
            <field name="group" ref="group_contract_admin"/>
        </record>

        <record model="ir.sequence" id="sequence_contract">
            <field name="name">Contract</field>
            <field name="code">contract.contract</field>
        </record>

    </data>
</tryton>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.