Files
account-tools/account_budget_forecast/views/account_analytic_account.xml
2022-05-19 12:21:24 +02:00

102 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_analytic_budget_forecast" model="ir.ui.view">
<field name="name">analytic.analytic.account.budget.forecast</field>
<field name="model">account.analytic.account</field>
<field name="priority">100</field>
<field name="arch" type="xml">
<form string="Project Budget" create="false" delete="false">
<header>
<!-- Refresh -->
<button name="action_refresh" string="Refresh" class="oe_highlight" type="object" />
<button name="action_create_quotation" string="Create Quotation" class="oe_highlight" type="object" />
<button type="object" class="oe_stat_button" icon="fa-eye" name="displayActualAmounts" string="Display Actual amounts" attrs="{'invisible' : [('display_actual_amounts', '=', True)]}">
<field name="display_actual_amounts" widget="boolean_toggle" />
</button>
<button type="object" class="oe_stat_button" icon="fa-eye" name="displayActualAmounts" string="Hide Actual amounts" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}">
<field name="display_actual_amounts" widget="boolean_toggle" />
</button>
</header>
<sheet string="Project Budget">
<group>
<group name="planned_amounts" string="Planned amounts">
<field name="plan_amount_without_coeff" />
<field name="plan_amount_with_coeff" />
</group>
<group name="expenses_amounts" string="Expenses" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}">
<field name="total_expenses" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}" />
<field name="remaining_budget" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}" />
</group>
<group name="incomes_balance" string="Incomes and Balance" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}">
<field name="total_incomes" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}" />
<field name="project_balance" attrs="{'invisible' : [('display_actual_amounts', '=', False)]}" />
</group>
<group name="project_management" string="Project management">
<field name="project_managers" widget="many2many_tags" />
<field name="opportunity" />
</group>
</group>
<notebook>
<page name="summary" string="Summary">
<field name="project_section_budget_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1">
<tree editable="bottom" default_order="sequence">
<control>
<create string="Add a section" context="{'default_display_type': 'line_section', 'default_is_summary': True}" />
<create string="Add a sub-section" context="{'default_display_type': 'line_subsection', 'default_is_summary': True}" />
</control>
<field name="sequence" widget="handle" />
<field name="is_summary" invisible="1" />
<field name="display_type" invisible="1" />
<field name="name" optional="hide" />
<field name="product_id" />
<field name="description" />
<field name="plan_amount_without_coeff" readonly="1" />
<field name="plan_amount_with_coeff" readonly="1" />
<field name="actual_amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" readonly="1" />
<field name="diff_expenses" string="Diff" optional="hide" />
<field name="incomes" string="Incomes" optional="hide" />
<field name="balance" string="Balance" optional="hide" />
</tree>
</field>
</page>
<page name="coefficients" string="Coeff">
<field name="budget_coefficients_ids" nolabel="1">
<tree>
<field name="name" />
<field name="note" />
<field name="coeff" sum="Total" />
</tree>
</field>
<button name="default_budget_coefficients_ids" string="Re-initialize" class="oe_highlight" type="object" />
</page>
</notebook>
</sheet>
<!-- Attachment preview -->
<div class="o_attachment_preview" />
<!-- Chatter -->
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<record id="view_account_analytic_account_form" model="ir.ui.view">
<field name="name">analytic.analytic.account.form</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
<field name="arch" type="xml">
<div name="button_box">
<button type="object" name="action_budget_forecast" class="oe_stat_button" icon="fa-usd">
<field name="plan_amount_with_coeff" widget="statinfo" string="Budget" />
</button>
</div>
<xpath expr="//field[@name='company_id']" position="after">
<field name="project_managers" widget="many2many_tags" />
</xpath>
</field>
</record>
</odoo>