You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.9 KiB
72 lines
2.9 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="survey_survey_view_form" model="ir.ui.view">
|
|
<field name="name">survey_deadline_autoclose form</field>
|
|
<field name="model">survey.survey</field>
|
|
<field name="inherit_id" ref="survey.survey_survey_view_form" />
|
|
<field name="priority">28</field>
|
|
<field name="arch" type="xml">
|
|
<field name="scoring_type" position="before">
|
|
<label for="deadline" />
|
|
<div class="o_row">
|
|
<field name="deadline" class="oe_inline" />
|
|
<label for="auto_close" string="Automatic closing ?" attrs="{'invisible': [('deadline', '=', False)]}" />
|
|
<field name="auto_close" attrs="{'invisible': [('deadline', '=', False)]}" />
|
|
</div>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="survey_survey_view_tree" model="ir.ui.view">
|
|
<field name="name">survey_deadline_autoclose tree</field>
|
|
<field name="model">survey.survey</field>
|
|
<field name="inherit_id" ref="survey.survey_survey_view_tree" />
|
|
<field name="priority">28</field>
|
|
<field name="arch" type="xml">
|
|
<field name="user_id" position="after">
|
|
<field name="deadline" />
|
|
<field name="auto_close" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="survey_survey_view_kanban" model="ir.ui.view">
|
|
<field name="name">survey_deadline_autoclose kanban</field>
|
|
<field name="model">survey.survey</field>
|
|
<field name="inherit_id" ref="survey.survey_survey_view_kanban" />
|
|
<field name="priority">28</field>
|
|
<field name="arch" type="xml">
|
|
<field name="color" position="after">
|
|
<field name="auto_close" />
|
|
</field>
|
|
<xpath expr="//div[hasclass('o_survey_kanban_card_ungrouped', 'row', 'mx-0')]/div[1]" position="after">
|
|
<div t-if="!selection_mode and record.deadline.raw_value" class="col-lg-1 col-sm-4 col-6 py-0 my-2">
|
|
<span t-attf-class="fw-bold">
|
|
<field name="deadline" widget="date" />
|
|
</span>
|
|
<br />
|
|
<span class="text-muted"
|
|
t-attf-title="#{record.auto_close.raw_value ? 'Survey will be automatically closed once deadline passed' : ''}">
|
|
Deadline <i t-if="record.auto_close.raw_value" class="fa fa-cogs" /> <i
|
|
t-if="record.auto_close.raw_value" class="fa fa-long-arrow-right" /> <i
|
|
t-if="record.auto_close.raw_value" class="fa fa-archive" /></span>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="survey_survey_view_search" model="ir.ui.view">
|
|
<field name="name">survey_deadline_autoclose search</field>
|
|
<field name="model">survey.survey</field>
|
|
<field name="inherit_id" ref="survey.survey_survey_view_search" />
|
|
<field name="priority">28</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//filter[@name='group_by_responsible']" posititon="after">
|
|
<filter string="Deadline" name="group_by_deadline"
|
|
context="{'group_by':'deadline'}" />
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|