[MIG] Migration account_budget_forecast addons to v14.0
This commit is contained in:
103
account_budget_forecast/views/account_analytic_account.xml
Normal file
103
account_budget_forecast/views/account_analytic_account.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<?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>
|
||||
<button type="action" class="oe_stat_button" icon="fa-refresh" name="%(action_budget_forecast_model_choice)d" string="Reset Budget" />
|
||||
</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>
|
@@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="budget_forecast_category_miscellaneous" model="ir.ui.view">
|
||||
<field name="name">budget.forecast.category.miscellaneous</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="inherit_id" ref="view_analytic_budget_forecast" />
|
||||
<field name="priority">9999</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page name="category_manpower" string="Manpower">
|
||||
<field name="budget_forecast_manpower_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'manpower'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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="category_material" string="Material">
|
||||
<field name="budget_forecast_material_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'material'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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="category_equipment" string="Equipment">
|
||||
<field name="budget_forecast_equipment_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'equipment'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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="category_subcontractors" string="Subcontractors">
|
||||
<field name="budget_forecast_subcontractors_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'subcontractors'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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="category_delivery" string="Delivery">
|
||||
<field name="budget_forecast_delivery_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'delivery'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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="category_miscellaneous" string="Miscellaneous">
|
||||
<field name="budget_forecast_miscellaneous_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'miscellaneous'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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="category_unplanned" string="Unplanned">
|
||||
<field name="budget_forecast_unplanned_ids" widget="section_category_and_note_one2many" mode="tree" nolabel="1" context="{'default_budget_category': 'unplanned'}">
|
||||
<tree default_order="sequence" editable="bottom">
|
||||
<control>
|
||||
<create string="Add an article" context="{'default_display_type': 'line_article'}" />
|
||||
<create string="Add a note" context="{'default_display_type': 'line_note'}" />
|
||||
</control>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="budget_category" invisible="1" optional="hide" />
|
||||
<field name="parent_id" optional="hide" />
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="name" optional="hide" />
|
||||
<field name="product_id" />
|
||||
<field name="description" optional="show" />
|
||||
<field name="note" optional="hide" />
|
||||
<field name="plan_price" />
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<field name="plan_amount_without_coeff" string="Plan Amount before Coeff" />
|
||||
<field name="plan_amount_with_coeff" string="Plan Amount after Coeff" />
|
||||
<field name="actual_amount" string="Actual Amount" attrs="{'column_invisible' : [('parent.display_actual_amounts', '=', False)]}" />
|
||||
<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>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
13
account_budget_forecast/views/account_invoice.xml
Normal file
13
account_budget_forecast/views/account_invoice.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="invoice_budget_form" model="ir.ui.view">
|
||||
<field name="name">account.invoice.budget.form</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_tag_ids']" position="after">
|
||||
<field name="budget_forecast_id" domain="[('analytic_id', '=', analytic_account_id), ('product_id', '=', product_id)]" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
8
account_budget_forecast/views/actions.xml
Normal file
8
account_budget_forecast/views/actions.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="act_budget_forecast_coeff_models" model="ir.actions.act_window">
|
||||
<field name="name">Budget coefficient models</field>
|
||||
<field name="res_model">budget.coefficient.model</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
9
account_budget_forecast/views/assets.xml
Normal file
9
account_budget_forecast/views/assets.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="assets_backend" name="budget forecast assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/account_budget_forecast/static/src/scss/section_category_and_note_backend.scss" />
|
||||
<script type="text/javascript" src="/account_budget_forecast/static/src/js/section_category_and_note_fields_backend.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
18
account_budget_forecast/views/budget_coefficient.xml
Normal file
18
account_budget_forecast/views/budget_coefficient.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_budget_coefficient_form" model="ir.ui.view">
|
||||
<field name="name">budget.coefficient.form</field>
|
||||
<field name="model">budget.coefficient</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="coeff" />
|
||||
<field name="note" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
14
account_budget_forecast/views/budget_coefficient_model.xml
Normal file
14
account_budget_forecast/views/budget_coefficient_model.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_budget_coefficient_tree" model="ir.ui.view">
|
||||
<field name="name">budget.coefficient.tree</field>
|
||||
<field name="model">budget.coefficient.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top">
|
||||
<field name="name" />
|
||||
<field name="coeff" />
|
||||
<field name="note" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
98
account_budget_forecast/views/budget_forecast.xml
Normal file
98
account_budget_forecast/views/budget_forecast.xml
Normal file
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_budget_forecast_form" model="ir.ui.view">
|
||||
<field name="name">budget.forecast.form</field>
|
||||
<field name="model">budget.forecast</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id" />
|
||||
<field name="description" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="analytic_id" />
|
||||
<field name="is_summary" />
|
||||
<field name="budget_category" />
|
||||
<field name="display_type" />
|
||||
<field name="parent_id" />
|
||||
<field name="sequence" />
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Unit prices">
|
||||
<field name="plan_price" />
|
||||
</group>
|
||||
<group string="Quantities">
|
||||
<field name="plan_qty" />
|
||||
<field name="actual_qty" />
|
||||
</group>
|
||||
<group string="Totals">
|
||||
<field name="plan_amount_without_coeff" />
|
||||
<field name="plan_amount_with_coeff" />
|
||||
<field name="actual_amount" />
|
||||
</group>
|
||||
</group>
|
||||
<group string="Analytic Lines">
|
||||
<field name="analytic_line_ids" nolabel="1">
|
||||
<tree>
|
||||
<field name="date" />
|
||||
<field name="employee_id" />
|
||||
<field name="product_id" />
|
||||
<field name="name" />
|
||||
<field name="unit_amount" string="Quantity" />
|
||||
<field name="amount" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="Childs" attrs="{'invisible' : [('child_ids','=', False)]}">
|
||||
<field name="child_ids" nolabel="1">
|
||||
<tree>
|
||||
<field name="product_id" />
|
||||
<field name="description" />
|
||||
<field name="budget_category" />
|
||||
<field name="plan_price" sum="total" />
|
||||
<field name="plan_qty" sum="total" />
|
||||
<field name="actual_qty" sum="total" />
|
||||
<field name="plan_amount_without_coeff" sum="total" />
|
||||
<field name="plan_amount_with_coeff" sum="total" />
|
||||
<field name="actual_amount" sum="total" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="Notes">
|
||||
<field name="note" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_budget_forecast_tree" model="ir.ui.view">
|
||||
<field name="name">budget.forecast.tree</field>
|
||||
<field name="model">budget.forecast</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="id" />
|
||||
<field name="analytic_id" />
|
||||
<field name="product_id" />
|
||||
<field name="description" />
|
||||
<field name="budget_category" />
|
||||
<field name="plan_price" sum="total" />
|
||||
<field name="plan_qty" sum="total" />
|
||||
<field name="actual_qty" sum="total" />
|
||||
<field name="plan_amount_without_coeff" sum="total" />
|
||||
<field name="plan_amount_with_coeff" sum="total" />
|
||||
<field name="actual_amount" sum="total" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_budget_forecast" model="ir.actions.act_window">
|
||||
<field name="name">Budget Forecast lines</field>
|
||||
<field name="res_model">budget.forecast</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
37
account_budget_forecast/views/budget_forecast_model.xml
Normal file
37
account_budget_forecast/views/budget_forecast_model.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_budget_forecast_model_tree" model="ir.ui.view">
|
||||
<field name="name">budget.forecast.model.tree</field>
|
||||
<field name="model">budget.forecast.model</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_budget_forecast_model_line_tree" model="ir.ui.view">
|
||||
<field name="name">budget.forecast.model.line.tree</field>
|
||||
<field name="model">budget.forecast.model.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top">
|
||||
<field name="budget_model" />
|
||||
<field name="display_type" />
|
||||
<field name="product_id" />
|
||||
<field name="name" />
|
||||
<field name="parent_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_budget_forecast_models" model="ir.actions.act_window">
|
||||
<field name="name">Budget Forecast Model</field>
|
||||
<field name="res_model">budget.forecast.model</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="act_budget_forecast_model_lines" model="ir.actions.act_window">
|
||||
<field name="name">Budget Forecast Model Lines</field>
|
||||
<field name="res_model">budget.forecast.model.line</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
18
account_budget_forecast/views/crm_lead.xml
Normal file
18
account_budget_forecast/views/crm_lead.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record id="crm_lead_analytic_account_view_form" model="ir.ui.view">
|
||||
<field name="name">crm.lead.analytic_account.form</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_lead_view_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='team_id']" position="after">
|
||||
<field name="analytic_account"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
16
account_budget_forecast/views/hr_employee.xml
Normal file
16
account_budget_forecast/views/hr_employee.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="hr_timesheet_view_tree_inherit_budget" model="ir.ui.view">
|
||||
<field name="name">hr.timesheet.tree.timesheet</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='task_id']" position="after">
|
||||
<field name="budget_forecast_id" domain="[('display_type', '=', 'line_article')]" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
14
account_budget_forecast/views/menu.xml
Normal file
14
account_budget_forecast/views/menu.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<menuitem id="menu_budget_forecast" parent="project.menu_project_config" sequence="20" name="Budget forecast" />
|
||||
|
||||
<menuitem id="menu_budget_forecast_lines" action="act_budget_forecast" parent="menu_budget_forecast" sequence="1" name="Budget lines" />
|
||||
|
||||
<menuitem id="menu_budget_forecast_coeff_models" action="act_budget_forecast_coeff_models" parent="menu_budget_forecast" sequence="2" name="Coefficient models" />
|
||||
|
||||
<menuitem id="menu_budget_forecast_models" action="act_budget_forecast_models" parent="menu_budget_forecast" sequence="3" name="Budget models" />
|
||||
|
||||
<menuitem id="menu_budget_forecast_model_lines" action="act_budget_forecast_model_lines" parent="menu_budget_forecast" sequence="4" name="Budget models lines" />
|
||||
|
||||
</odoo>
|
13
account_budget_forecast/views/product_template_form.xml
Normal file
13
account_budget_forecast/views/product_template_form.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_budget_level_form_inherit" model="ir.ui.view">
|
||||
<field name="name">product.budget.level.form.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='categ_id']" position="after">
|
||||
<field name="budget_level" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
13
account_budget_forecast/views/project_views.xml
Normal file
13
account_budget_forecast/views/project_views.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="view_task_form_budget_forecast">
|
||||
<field name="name">project.task.form.budget.forecast</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.view_task_form2_inherited" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='timesheet_ids']/tree/field[@name='name']" position="after">
|
||||
<field name="budget_forecast_id" domain="[('display_type', '=', 'line_article')]" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
23
account_budget_forecast/views/sale_order.xml
Normal file
23
account_budget_forecast/views/sale_order.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">sale.order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<header position="inside">
|
||||
<button name="sync_missing_budget_lines" string="Sync missing budget lines" type="object" />
|
||||
</header>
|
||||
<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='order_line']/tree/field[@name='name']" position="after">
|
||||
<field name="budget_forecast_id" optional="show" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
Reference in New Issue
Block a user