Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC
This commit is contained in:
15
mklab_project_task_indicators/reports/action.xml
Normal file
15
mklab_project_task_indicators/reports/action.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="action_report_project" model="ir.actions.report">
|
||||
<field name="name">Сводная ведомость по проекту</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="report_type">qweb-html</field>
|
||||
<field name="report_name">mklab_project_task_indicators.general_report</field>
|
||||
<field name="report_file">mklab_project_task_indicators.general_report</field>
|
||||
<field name="binding_model_id" ref="project.model_project_project"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="print_report_name">'Ведомость для проекта '+str(object.name)</field>
|
||||
<field name="attachment">'Ведомость для проекта '+str(object.name)</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
101
mklab_project_task_indicators/reports/template.xml
Normal file
101
mklab_project_task_indicators/reports/template.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<odoo>
|
||||
<template id="mklab_project_task_indicators.general_report">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.basic_layout">
|
||||
<div class="header">
|
||||
<style>
|
||||
.separator {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.gen-style {
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div class="row gen-style">
|
||||
<div class="col-12">
|
||||
<h2>Сводная ведомость по проекту:</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row separator gen-style">
|
||||
<div class="col-12">
|
||||
<h2 t-field="doc.sudo().name"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<style>
|
||||
.separator {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.gen-style {
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
}
|
||||
.font-arial {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-align: center;
|
||||
}
|
||||
.task-name{
|
||||
background-color:lightgray;
|
||||
}
|
||||
</style>
|
||||
<div class="oe_structure"/>
|
||||
<div class="container">
|
||||
<div class="row gen-style">
|
||||
<div class="col-4 font-arial">
|
||||
Наименование показателя
|
||||
</div>
|
||||
<div class="col-4 font-arial">
|
||||
На дату
|
||||
</div>
|
||||
<div class="col-4 font-arial">
|
||||
Плановый показатель
|
||||
</div>
|
||||
</div>
|
||||
<div t-foreach="doc.sudo().task_ids" t-as="task">
|
||||
<t t-if="len(task.index_ids) > 1">
|
||||
<div class="row gen-style">
|
||||
<div class="col-12 font-arial task-name">
|
||||
<span t-field="task.sudo().name"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-foreach="task.sudo().index_ids" t-as="value">
|
||||
<div class="col-4 font-arial">
|
||||
<span t-field="value.sudo().name"/>
|
||||
</div>
|
||||
<t t-foreach="value.sudo().value_ids" t-as="h_values">
|
||||
<div class="row separator">
|
||||
<div class="col-4 font-arial"/>
|
||||
<div class="col-4 font-arial">
|
||||
<span t-field="h_values.sudo().date_due" t-options="{"widget": "date","format": "dd.MM.yyyy"}"/>
|
||||
</div>
|
||||
<div class="col-4 font-arial">
|
||||
<span t-field="h_values.sudo().value_float_plan"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-4"><span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d.%m.%Y')"/></div>
|
||||
<div class="col-4">Согласовано</div>
|
||||
<div class="col-4"><span t-field="doc.sudo().user_id"/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user