asset.xml 11.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of this
     repository contains the full copyright notices and license terms. -->
<tryton>
    <data>

        <menuitem name="Assets" parent="account.menu_account"
            id="menu_asset" sequence="48"/>

        <record model="ir.action.wizard" id="wizard_update">
            <field name="name">Update Asset</field>
            <field name="wiz_name">account.asset.update</field>
        </record>

        <record model="ir.ui.view" id="asset_view_form">
            <field name="model">account.asset</field>
            <field name="type">form</field>
            <field name="name">asset_form</field>
        </record>
        <record model="ir.ui.view" id="asset_view_tree">
            <field name="model">account.asset</field>
            <field name="type">tree</field>
            <field name="name">asset_tree</field>
        </record>

        <record model="ir.action.act_window" id="act_asset_form">
            <field name="name">Assets</field>
            <field name="res_model">account.asset</field>
        </record>
        <record model="ir.action.act_window.view" id="act_asset_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="asset_view_tree"/>
            <field name="act_window" ref="act_asset_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_asset_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="asset_view_form"/>
            <field name="act_window" ref="act_asset_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_asset_form_domain_draft">
            <field name="name">Draft</field>
            <field name="sequence" eval="10"/>
44
            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
45
            <field name="count" eval="True"/>
46 47 48 49 50 51
            <field name="act_window" ref="act_asset_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_asset_form_domain_running">
            <field name="name">Running</field>
            <field name="sequence" eval="20"/>
52
            <field name="domain" eval="[('state', '=', 'running')]" pyson="1"/>
53
            <field name="count" eval="True"/>
54 55 56 57 58 59
            <field name="act_window" ref="act_asset_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_asset_form_domain_closed">
            <field name="name">Closed</field>
            <field name="sequence" eval="30"/>
60
            <field name="domain" eval="[('state', '=', 'closed')]" pyson="1"/>
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
            <field name="act_window" ref="act_asset_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_asset_form_domain_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain"></field>
            <field name="act_window" ref="act_asset_form"/>
        </record>
        <menuitem parent="menu_asset" sequence="10"
            action="act_asset_form" id="menu_asset_form"/>

        <record model="ir.sequence.type" id="sequence_type_asset">
            <field name="name">Asset</field>
            <field name="code">account.asset</field>
        </record>
        <record model="ir.sequence.type-res.group"
            id="sequence_type_asset_group_admin">
            <field name="sequence_type" ref="sequence_type_asset"/>
            <field name="group" ref="res.group_admin"/>
        </record>
        <record model="ir.sequence.type-res.group"
            id="sequence_type_asset_group_account_admin">
            <field name="sequence_type" ref="sequence_type_asset"/>
            <field name="group" ref="account.group_account_admin"/>
        </record>

        <record model="ir.sequence" id="sequence_asset">
            <field name="name">Asset</field>
            <field name="code">account.asset</field>
        </record>

        <record model="ir.rule.group" id="rule_group_asset">
            <field name="model" search="[('model', '=', 'account.asset')]"/>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_asset1">
98 99 100
            <field name="domain"
                eval="[('company', '=', Eval('user', {}).get('company', None))]"
                pyson="1"/>
101 102 103
            <field name="rule_group" ref="rule_group_asset"/>
        </record>

104 105 106 107 108 109 110
        <record model="ir.model.access" id="access_asset">
            <field name="model" search="[('model', '=', 'account.asset')]"/>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
        <record model="ir.model.access" id="access_asset_account_admin">
            <field name="model" search="[('model', '=', 'account.asset')]"/>
            <field name="group" ref="account.group_account_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.model.access" id="access_asset_account">
            <field name="model" search="[('model', '=', 'account.asset')]"/>
            <field name="group" ref="account.group_account"/>
            <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>

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
        <record model="ir.model.button" id="asset_close_button">
            <field name="name">close</field>
            <field name="string">Close</field>
            <field name="confirm">Are you sure to close the asset?</field>
            <field name="model" search="[('model', '=', 'account.asset')]"/>
        </record>

        <record model="ir.model.button" id="asset_run_button">
            <field name="name">run</field>
            <field name="string">Run</field>
            <field name="model" search="[('model', '=', 'account.asset')]"/>
        </record>

        <record model="ir.model.button" id="asset_create_lines_button">
            <field name="name">create_lines</field>
            <field name="string">Create Lines</field>
            <field name="model" search="[('model', '=', 'account.asset')]"/>
        </record>

        <record model="ir.model.button" id="asset_clear_lines_button">
            <field name="name">clear_lines</field>
            <field name="string">Clear Lines</field>
            <field name="model" search="[('model', '=', 'account.asset')]"/>
        </record>

        <record model="ir.model.button" id="asset_update_button">
            <field name="name">update</field>
            <field name="string">Update Asset</field>
            <field name="model" search="[('model', '=', 'account.asset')]"/>
        </record>

159 160 161 162 163 164 165 166 167 168 169
        <record model="ir.ui.view" id="asset_line_view_form">
            <field name="model">account.asset.line</field>
            <field name="type">form</field>
            <field name="name">asset_line_form</field>
        </record>
        <record model="ir.ui.view" id="asset_line_view_tree">
            <field name="model">account.asset.line</field>
            <field name="type">tree</field>
            <field name="name">asset_line_tree</field>
        </record>

170 171 172 173 174 175 176
        <record model="ir.model.access" id="access_asset_line">
            <field name="model" search="[('model', '=', 'account.asset.line')]"/>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
        <record model="ir.model.access" id="access_asset_line_account_admin">
            <field name="model" search="[('model', '=', 'account.asset.line')]"/>
            <field name="group" ref="account.group_account_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.model.access" id="access_asset_line_account">
            <field name="model" search="[('model', '=', 'account.asset.line')]"/>
            <field name="group" ref="account.group_account"/>
            <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.ui.view" id="asset_create_moves_start_view_form">
            <field name="model">account.asset.create_moves.start</field>
            <field name="type">form</field>
            <field name="name">asset_create_moves_start_form</field>
        </record>

        <record model="ir.ui.view" id="asset_update_start_view_form">
            <field name="model">account.asset.update.start</field>
            <field name="type">form</field>
            <field name="name">asset_update_start_form</field>
        </record>

        <record model="ir.ui.view" id="asset_update_show_depreciation_view_form">
            <field name="model">account.asset.update.show_depreciation</field>
            <field name="type">form</field>
            <field name="name">asset_update_show_depreciation_form</field>
        </record>

        <record model="ir.action.wizard" id="wizard_create_moves">
            <field name="name">Create Assets Moves</field>
            <field name="wiz_name">account.asset.create_moves</field>
        </record>
        <menuitem name="Create Assets Moves" parent="menu_asset" sequence="10"
            action="wizard_create_moves" id="menu_create_moves"/>
218 219 220 221 222

        <record model="ir.action.report" id="report_depreciation_table">
            <field name="name">Depreciation Table</field>
            <field name="model">account.asset</field>
            <field name="report_name">account.asset.depreciation_table</field>
223
            <field name="report">account_asset/asset_table.fodt</field>
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
        </record>
        <record model="ir.ui.view"
            id="print_depreciation_table_start_view_form">
            <field name="model">account.asset.print_depreciation_table.start</field>
            <field name="type">form</field>
            <field name="name">print_depreciation_table_start</field>
        </record>
        <record model="ir.action.wizard" id="wizard_print_depreciation_table">
            <field name="name">Print Depreciation Table</field>
            <field name="wiz_name">account.asset.print_depreciation_table</field>
        </record>
        <menuitem name="Print Depreciation Table" icon="tryton-print"
            parent="account.menu_reporting"
            action="wizard_print_depreciation_table"
            id="menu_create_depreciation_table"/>
239 240 241 242 243 244 245 246 247 248
    </data>
    <data noupdate="1">
        <record model="account.journal" id="journal_asset">
            <field name="name">Asset</field>
            <field name="code">ASS</field>
            <field name="type">asset</field>
            <field name="sequence" ref="account.sequence_account_journal"/>
        </record>
    </data>
</tryton>