Purpose ======= Make it possible to compare analytic values between plans by inputting up to one account per plan on each line. For instance, if we have 2 plans: "Country" and "Product Type", with the following accounts | Country | Product Type | | ------- | ------------ | | BE | Drinks | | LU | Food | And the following invoices: * 1000€ of drinks in Belgium * 2000€ of food in Belgium * 3000€ of food in Luxemburg We want to be able to display the following pivot tables: | | Drinks | Food | Total | | --- | ------ | ---- | ----- | | BE | 1000 | 2000 | 3000 | | LU | 0 | 3000 | 3000 | | Tot | 1000 | 5000 | 6000 | | | Total | | ------ | ----- | | Food | 5000 | | * BE | 2000 | | * LU | 3000 | | Drinks | 1000 | | * BE | 1000 | | Total | 6000 | Implementation ============== * `ir.fields` are added/removed dynamically on `account.analytic.line` * Each analytic plan corresponds to one field on `account.analytic.line` * The fields are added dynamically in the views. * `account.analytic.plan` doesn't have a `company_id` field anymore, meaning that all the companies have access to all the plans. This means that the applicability fields and lines are now company dependent, and those can be used to know which fields/plans to display for which company. * There can no longer be one "Project" plan per company, even if the accounts of that project can still be owned by only one company. * There is now only one method to get the default (or "Project" plan), which is `_get_plan_columns` task-3497653 closes odoo/odoo#139225 Related: odoo/upgrade#5306 Related: odoo/enterprise#49226 Signed-off-by: William André (wan) <wan@odoo.com> Co-authored-by: william <wan@odoo.com> Co-authored-by: h4818 <ayh@odoo.com>
61 lines
4.1 KiB
XML
61 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
|
<field name="name">res.config.settings.view.form.inherit.project</field>
|
|
<field name="model">res.config.settings</field>
|
|
<field name="priority" eval="50"/>
|
|
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//form" position="inside">
|
|
<app data-string="Project" string="Project" name="project" groups="project.group_project_manager">
|
|
<block title="Tasks Management" id="tasks_management">
|
|
<setting id="recurring_tasks_setting" help="Auto-generate tasks for regular activities">
|
|
<field name="group_project_recurring_tasks"/>
|
|
</setting>
|
|
<setting id="task_dependencies_setting" help="Determine the order in which to perform tasks">
|
|
<field name="group_project_task_dependencies"/>
|
|
</setting>
|
|
<setting id="project_stages" help="Track the progress of your projects">
|
|
<field name="group_project_stages"/>
|
|
<div class="content-group" invisible="not group_project_stages">
|
|
<div class="mt8">
|
|
<button name="%(project.project_project_stage_configure)d" icon="oi-arrow-right" type="action" string="Configure Stages" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="project_milestone" help="Track major progress points that must be reached to achieve success">
|
|
<field name="group_project_milestone"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Time Management" name="project_time">
|
|
<setting id="log_time_tasks_setting" help="Track time spent on projects and tasks">
|
|
<field name="module_hr_timesheet"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Analytics" name="analytic">
|
|
<setting id="track_customer_satisfaction_setting" help="Track customer satisfaction on tasks">
|
|
<field name="group_project_rating"/>
|
|
<div class="content-group" invisible="not group_project_rating">
|
|
<div class="mt16">
|
|
<button name="%(project.open_task_type_form)d" context="{'project_id':id}" icon="oi-arrow-right" type="action" string="Set a Rating Email Template on Stages" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="default_plan_setting" groups="analytic.group_analytic_accounting" help="Track the profitability of your project with analytic accounting. Select the analytic plan for new projects:" title="Track the profitability of your projects. Any project, its tasks and timesheets are linked to an analytic account and any analytic account belongs to a plan.">
|
|
<field name="analytic_plan_id"/>
|
|
</setting>
|
|
</block>
|
|
</app>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="project_config_settings_action" model="ir.actions.act_window">
|
|
<field name="name">Settings</field>
|
|
<field name="res_model">res.config.settings</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">inline</field>
|
|
<field name="context">{'module' : 'project', 'bin_size': False}</field>
|
|
</record>
|
|
</odoo>
|