Files
odoo_source/addons/survey/data/ir_actions_data.xml
T
Thibault Delavallée 6da632a68e [MOV] survey: split and move files according to their underlying model
Purpose of this commit is to polish a bit this old module before working
on it. Contains

 * split python model into separate main files to ease models understanding;
 * split views into separate main files to ease views finding;
 * move data lost in views to data files (server action notably);
 * merge templates in the same file to have all available at hand;
 * move assets in their own file in order to remove noise from templates;

No functional behavior change should occur with this commit. Only move
has been performed.

This commit is linked to task ID 1903617 and PR #28166.
2018-11-14 14:57:27 +00:00

16 lines
670 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="survey_action_server_clean_test_answers" model="ir.actions.server">
<field name="name">Survey: Clean test answers</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_survey_survey" />
<field name="binding_model_id" ref="model_survey_survey" />
<field name="state">code</field>
<field name="code">
if records:
env['survey.user_input'].search([('survey_id', 'in', records.ids), ('test_entry', '=', 'True')]).unlink()
</field>
</record>
</data>
</odoo>