2020-01-29 18:37:08 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
2018-08-05 20:33:56 +02:00
|
|
|
<odoo>
|
2020-01-29 18:37:08 +01:00
|
|
|
<record model="ir.ui.view" id="account_asset_view_form">
|
|
|
|
<field name="name">account.asset.form</field>
|
|
|
|
<field name="model">account.asset</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Asset">
|
|
|
|
<header>
|
|
|
|
<button
|
|
|
|
name="validate"
|
|
|
|
string="Confirm Asset"
|
|
|
|
type="object"
|
|
|
|
class="oe_highlight"
|
|
|
|
attrs="{'invisible': [('state', '!=', 'draft')]}"
|
|
|
|
/>
|
|
|
|
<button
|
|
|
|
name="set_to_draft"
|
|
|
|
states="open,close"
|
|
|
|
string="Set to Draft"
|
|
|
|
type="object"
|
|
|
|
groups="account.group_account_manager"
|
|
|
|
/>
|
|
|
|
<button
|
|
|
|
name="remove"
|
|
|
|
string="Remove"
|
|
|
|
type="object"
|
|
|
|
groups="account.group_account_manager"
|
2022-01-11 08:47:52 +01:00
|
|
|
attrs="{'invisible':[('state', 'not in', ['open', 'close'])]}"
|
2020-01-29 18:37:08 +01:00
|
|
|
help="Asset removal."
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="state"
|
|
|
|
widget="statusbar"
|
|
|
|
statusbar_visible="draft,open,close,removed"
|
|
|
|
/>
|
|
|
|
</header>
|
|
|
|
<sheet>
|
2021-10-30 15:05:14 +02:00
|
|
|
<widget
|
|
|
|
name="web_ribbon"
|
|
|
|
title="Archived"
|
|
|
|
bg_color="bg-danger"
|
|
|
|
attrs="{'invisible': [('active', '=', True)]}"
|
|
|
|
/>
|
|
|
|
<div class="oe_button_box" name="button_box">
|
2020-01-29 18:37:08 +01:00
|
|
|
<button
|
|
|
|
name="open_entries"
|
|
|
|
string="Journal Entries"
|
|
|
|
type="object"
|
|
|
|
class="oe_stat_button"
|
|
|
|
icon="fa-bars"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div class="oe_title">
|
|
|
|
<label for="name" class="oe_edit_only" />
|
|
|
|
<h1>
|
|
|
|
<field name="name" class="oe_inline" />
|
|
|
|
</h1>
|
|
|
|
</div>
|
2021-10-30 15:05:14 +02:00
|
|
|
<group col="4">
|
2020-01-29 18:37:08 +01:00
|
|
|
<field name="code" />
|
|
|
|
<field
|
|
|
|
name="company_id"
|
|
|
|
widget="selection"
|
|
|
|
groups="base.group_multi_company"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="company_currency_id"
|
|
|
|
groups="base.group_multi_currency"
|
|
|
|
invisible="1"
|
|
|
|
/>
|
|
|
|
<field name="move_line_check" invisible="1" />
|
|
|
|
<newline />
|
|
|
|
<field
|
|
|
|
name="depreciation_base"
|
|
|
|
widget="monetary"
|
|
|
|
options="{'currency_field': 'company_currency_id'}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="value_depreciated"
|
|
|
|
widget="monetary"
|
|
|
|
options="{'currency_field': 'company_currency_id'}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="value_residual"
|
|
|
|
widget="monetary"
|
|
|
|
options="{'currency_field': 'company_currency_id'}"
|
|
|
|
/>
|
2021-10-30 15:05:14 +02:00
|
|
|
<field name="active" invisible="1" />
|
2018-08-05 20:33:56 +02:00
|
|
|
</group>
|
2020-01-29 18:37:08 +01:00
|
|
|
<notebook colspan="4">
|
|
|
|
<page string="General">
|
2021-10-30 15:05:14 +02:00
|
|
|
<group>
|
2020-01-29 18:37:08 +01:00
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="purchase_value"
|
|
|
|
widget="monetary"
|
|
|
|
options="{'currency_field': 'currency_id'}"
|
|
|
|
attrs="{'readonly':['|', ('move_line_check', '=', True), ('state', '!=', 'draft')]}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="date_start"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
|
|
|
/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="salvage_value"
|
|
|
|
widget="monetary"
|
|
|
|
options="{'currency_field': 'company_currency_id'}"
|
2020-08-06 12:33:27 +02:00
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
2020-01-29 18:37:08 +01:00
|
|
|
/>
|
|
|
|
<field name="date_remove" />
|
|
|
|
</group>
|
|
|
|
</group>
|
2021-10-30 15:05:14 +02:00
|
|
|
<group col="4" string="Other Information">
|
2020-01-29 18:37:08 +01:00
|
|
|
<field name="profile_id" />
|
|
|
|
<field name="group_ids" widget="many2many_tags" />
|
|
|
|
<field name="partner_id" />
|
|
|
|
<field
|
|
|
|
name="account_analytic_id"
|
|
|
|
groups="analytic.group_analytic_accounting"
|
|
|
|
/>
|
2021-04-06 15:24:08 +02:00
|
|
|
<field
|
|
|
|
name="analytic_tag_ids"
|
2021-10-30 15:05:14 +02:00
|
|
|
groups="analytic.group_analytic_tags"
|
2021-04-06 15:24:08 +02:00
|
|
|
widget="many2many_tags"
|
|
|
|
/>
|
2020-01-29 18:37:08 +01:00
|
|
|
</group>
|
2021-10-30 15:05:14 +02:00
|
|
|
<group>
|
|
|
|
<group string="Depreciation Dates">
|
2020-03-19 13:17:36 +01:00
|
|
|
<field name="method_time" required="1" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field
|
|
|
|
name="method_number"
|
|
|
|
attrs="{'invisible': [('method_time', 'not in', ['number', 'year'])], 'required': [('method_time', 'in', ['number', 'year'])]}"
|
|
|
|
/>
|
2020-03-19 13:17:36 +01:00
|
|
|
<field name="method_period" required="1" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field
|
|
|
|
name="method_end"
|
|
|
|
attrs="{'required': [('method_time', '=', 'end')], 'invisible': [('method_time', 'in', ['number'])]}"
|
|
|
|
/>
|
|
|
|
<field name="days_calc" />
|
|
|
|
<field
|
|
|
|
name="use_leap_years"
|
|
|
|
attrs="{'invisible': [('days_calc', '=', True)]}"
|
|
|
|
/>
|
|
|
|
</group>
|
2021-10-30 15:05:14 +02:00
|
|
|
<group string="Depreciation Method">
|
2020-03-19 13:17:36 +01:00
|
|
|
<field name="method" required="1" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field
|
|
|
|
name="method_progress_factor"
|
|
|
|
attrs="{'invisible': [('method', 'in', ['linear', 'linear-limit'])], 'required': [('method', 'in', ['degressive', 'degr-linear', 'degr-limit'])]}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="prorata"
|
|
|
|
attrs="{'readonly': [('method_time', '!=', 'year')]}"
|
|
|
|
/>
|
2021-06-10 14:12:43 +02:00
|
|
|
<field name="carry_forward_missed_depreciations" />
|
2020-01-29 18:37:08 +01:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</page>
|
|
|
|
<page string="Depreciation Board">
|
|
|
|
<div>
|
|
|
|
<button
|
|
|
|
type="object"
|
|
|
|
name="compute_depreciation_board"
|
|
|
|
string="Compute"
|
|
|
|
icon="fa-gears"
|
|
|
|
attrs="{'invisible': [('state', 'in', ['close', 'removed'])]}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<field
|
|
|
|
name="depreciation_line_ids"
|
|
|
|
mode="tree"
|
|
|
|
options="{'reload_on_button': true}"
|
|
|
|
>
|
|
|
|
<tree
|
|
|
|
decoration-info="(move_check == False) and (init_entry == False)"
|
|
|
|
create="false"
|
|
|
|
>
|
|
|
|
<field name="type" />
|
|
|
|
<field name="line_date" />
|
|
|
|
<field name="line_days" sum="Total Days" />
|
|
|
|
<field name="depreciated_value" readonly="1" />
|
|
|
|
<field name="amount" />
|
|
|
|
<field name="remaining_value" readonly="1" />
|
|
|
|
<field name="init_entry" string="Init" />
|
|
|
|
<field name="move_check" />
|
|
|
|
<field name="parent_state" invisible="1" />
|
|
|
|
<button
|
|
|
|
name="create_move"
|
|
|
|
icon="fa-cog"
|
|
|
|
string="Create Move"
|
|
|
|
type="object"
|
|
|
|
attrs="{'invisible': ['|', '|', ('init_entry', '=', True), ('move_check', '!=', False), ('parent_state', '!=', 'open')]}"
|
|
|
|
/>
|
|
|
|
<button
|
|
|
|
name="open_move"
|
|
|
|
icon="fa-folder-open-o"
|
|
|
|
string="View Move"
|
|
|
|
type="object"
|
|
|
|
attrs="{'invisible': [('move_check', '!=', True)]}"
|
|
|
|
/>
|
|
|
|
<button
|
|
|
|
name="unlink_move"
|
|
|
|
icon="fa-times"
|
2021-07-06 17:34:48 +02:00
|
|
|
string="Delete/Reverse Move"
|
2020-01-29 18:37:08 +01:00
|
|
|
type="object"
|
|
|
|
confirm="Are you sure ?"
|
|
|
|
groups="account.group_account_manager"
|
|
|
|
attrs="{'invisible': [('move_check', '!=', True)]}"
|
|
|
|
/>
|
|
|
|
</tree>
|
|
|
|
<form string="Asset Line">
|
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="parent_state" invisible="1" />
|
|
|
|
<field
|
|
|
|
name="depreciation_base"
|
|
|
|
invisible="1"
|
|
|
|
/>
|
|
|
|
<field name="type" />
|
|
|
|
<field name="name" />
|
|
|
|
<field
|
|
|
|
name="amount"
|
|
|
|
attrs="{'readonly': [('move_check', '=', True)]}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="init_entry"
|
|
|
|
attrs="{'readonly': ['|', ('move_check', '=', True), ('type', '=', 'create')]}"
|
|
|
|
/>
|
|
|
|
<field name="move_id" />
|
|
|
|
<field name="move_check" />
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="line_date"
|
|
|
|
attrs="{'readonly': [('move_check', '=', True)]}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="depreciated_value"
|
|
|
|
readonly="1"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="remaining_value"
|
|
|
|
readonly="1"
|
|
|
|
/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
<page string="History">
|
|
|
|
<field name="account_move_line_ids" readonly="1">
|
2022-04-13 12:18:36 +02:00
|
|
|
<tree>
|
2020-01-29 18:37:08 +01:00
|
|
|
<field name="date" />
|
2021-10-30 15:05:14 +02:00
|
|
|
<field name="move_id" />
|
|
|
|
<field name="journal_id" optional="show" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field name="account_id" />
|
2021-10-30 15:05:14 +02:00
|
|
|
<field name="partner_id" optional="show" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field
|
|
|
|
name="analytic_account_id"
|
|
|
|
groups="analytic.group_analytic_accounting"
|
2021-10-30 15:05:14 +02:00
|
|
|
optional="show"
|
2020-01-29 18:37:08 +01:00
|
|
|
/>
|
2021-10-30 15:05:14 +02:00
|
|
|
<field name="ref" />
|
|
|
|
<field name="name" optional="hide" />
|
|
|
|
<field name="debit" sum="1" />
|
|
|
|
<field name="credit" sum="1" />
|
|
|
|
</tree>
|
2020-01-29 18:37:08 +01:00
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
<page string="Notes">
|
|
|
|
<field
|
|
|
|
name="note"
|
|
|
|
placeholder="Add an internal note here..."
|
|
|
|
/>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
</sheet>
|
2022-02-10 12:37:50 +01:00
|
|
|
<div class="oe_chatter">
|
|
|
|
<field name="message_follower_ids" />
|
|
|
|
<field name="activity_ids" />
|
|
|
|
<field name="message_ids" />
|
|
|
|
</div>
|
2020-01-29 18:37:08 +01:00
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="account_asset_view_tree">
|
|
|
|
<field name="name">account.asset.tree</field>
|
|
|
|
<field name="model">account.asset</field>
|
|
|
|
<field name="arch" type="xml">
|
2022-04-13 12:18:36 +02:00
|
|
|
<tree>
|
2020-01-29 18:37:08 +01:00
|
|
|
<field name="name" />
|
2021-10-30 15:05:14 +02:00
|
|
|
<field name="code" optional="show" />
|
|
|
|
<field name="depreciation_base" optional="show" />
|
|
|
|
<field name="value_depreciated" optional="show" />
|
|
|
|
<field name="value_residual" optional="show" />
|
|
|
|
<field name="date_start" optional="show" />
|
|
|
|
<field name="date_remove" optional="show" />
|
|
|
|
<field name="profile_id" optional="show" />
|
|
|
|
<field name="account_analytic_id" optional="hide" />
|
|
|
|
<field name="method" optional="hide" />
|
|
|
|
<field name="prorata" optional="hide" />
|
|
|
|
<field name="group_ids" widget="many2many_tags" optional="hide" />
|
|
|
|
<field
|
|
|
|
name="company_id"
|
|
|
|
groups="base.group_multi_company"
|
|
|
|
optional="show"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="state"
|
|
|
|
widget="badge"
|
|
|
|
decoration-success="state == 'open'"
|
|
|
|
decoration-warning="state == 'removed'"
|
|
|
|
decoration-info="state == 'draft'"
|
|
|
|
decoration-muted="state == 'close'"
|
|
|
|
/>
|
2020-01-29 18:37:08 +01:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="account_asset_view_search" model="ir.ui.view">
|
|
|
|
<field name="name">account.asset.search</field>
|
|
|
|
<field name="model">account.asset</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Account Asset">
|
|
|
|
<filter
|
|
|
|
string="Draft"
|
|
|
|
name="draft"
|
|
|
|
domain="[('state', '=', 'draft')]"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Running"
|
|
|
|
name="running"
|
|
|
|
domain="[('state', '=', 'open')]"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Close"
|
|
|
|
name="close"
|
|
|
|
domain="[('state', '=', 'close')]"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Removed"
|
|
|
|
name="removed"
|
|
|
|
domain="[('state', '=', 'removed')]"
|
|
|
|
/>
|
2021-10-30 15:05:14 +02:00
|
|
|
<separator />
|
|
|
|
<filter
|
|
|
|
string="Archived"
|
|
|
|
name="inactive"
|
|
|
|
domain="[('active', '=', False)]"
|
|
|
|
/>
|
|
|
|
<separator />
|
|
|
|
<field name="name" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field name="code" />
|
|
|
|
<field name="date_start" />
|
|
|
|
<field name="profile_id" />
|
2019-10-06 23:24:00 +02:00
|
|
|
<field name="group_ids" />
|
2020-01-29 18:37:08 +01:00
|
|
|
<field
|
|
|
|
name="partner_id"
|
|
|
|
filter_domain="[('partner_id', 'child_of', self)]"
|
|
|
|
/>
|
2021-10-30 15:05:14 +02:00
|
|
|
<group name="groupby">
|
2020-01-29 18:37:08 +01:00
|
|
|
<filter
|
|
|
|
string="Profile"
|
|
|
|
name="profile"
|
|
|
|
domain=""
|
|
|
|
context="{'group_by': 'profile_id'}"
|
|
|
|
/>
|
2021-10-30 15:05:14 +02:00
|
|
|
<filter
|
|
|
|
string="Status"
|
|
|
|
name="state_groupby"
|
|
|
|
domain=""
|
|
|
|
context="{'group_by': 'state'}"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Analytic account"
|
|
|
|
name="account_analytic_groupby"
|
|
|
|
domain=""
|
|
|
|
context="{'group_by': 'account_analytic_id'}"
|
|
|
|
/>
|
|
|
|
<filter
|
|
|
|
string="Computation Method"
|
|
|
|
name="method_groupby"
|
|
|
|
domain=""
|
|
|
|
context="{'group_by': 'method'}"
|
|
|
|
/>
|
2020-01-29 18:37:08 +01:00
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="account_asset_action" model="ir.actions.act_window">
|
|
|
|
<field name="name">Assets</field>
|
|
|
|
<field name="res_model">account.asset</field>
|
2021-02-11 13:03:58 +01:00
|
|
|
<field name="view_mode">tree,form</field>
|
2020-01-29 18:37:08 +01:00
|
|
|
</record>
|
2021-01-14 08:53:25 +01:00
|
|
|
<record id="act_entries_open" model="ir.actions.act_window">
|
|
|
|
<field name="name">Journal Items</field>
|
|
|
|
<field name="binding_model_id" ref="model_account_asset" />
|
|
|
|
<field name="binding_view_types">form</field>
|
|
|
|
<field name="res_model">account.move.line</field>
|
|
|
|
<field
|
|
|
|
name="domain"
|
|
|
|
>['|',('asset_id','in',context.get('active_ids')),('asset_id','=','active_id')]</field>
|
|
|
|
</record>
|
2018-08-05 20:33:56 +02:00
|
|
|
</odoo>
|