[IMP] survey_record_generation: add default filter on survey id and active user_input for generated records
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m32s
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m32s
This commit is contained in:
@@ -31,7 +31,7 @@ class SurveyUserInput(models.Model):
|
|||||||
action = self.env["ir.actions.act_window"]._for_xml_id(
|
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||||
"survey_record_generation.survey_generated_record_action"
|
"survey_record_generation.survey_generated_record_action"
|
||||||
)
|
)
|
||||||
action['domain'] = [('user_input_id', '=', self.id)]
|
action['domain'] = [('user_input_id.survey_id', '=', self.survey_id.id)]
|
||||||
return action
|
return action
|
||||||
|
|
||||||
def _mark_done(self):
|
def _mark_done(self):
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
<field name="model">survey.generated.record</field>
|
<field name="model">survey.generated.record</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
|
<filter string="Active survey input" name="active_input"
|
||||||
|
domain="[('user_input_id.id', '=', context.get('active_id'))]"
|
||||||
|
/>
|
||||||
<field name="survey_record_creation_name" />
|
<field name="survey_record_creation_name" />
|
||||||
<field name="survey_record_creation_id" />
|
<field name="survey_record_creation_id" />
|
||||||
<field name="user_input_id" />
|
<field name="user_input_id" />
|
||||||
@@ -30,6 +33,7 @@
|
|||||||
<field name="res_model">survey.generated.record</field>
|
<field name="res_model">survey.generated.record</field>
|
||||||
<field name="view_mode">list</field>
|
<field name="view_mode">list</field>
|
||||||
<field name="search_view_id" ref="survey_generated_record_view_search"/>
|
<field name="search_view_id" ref="survey_generated_record_view_search"/>
|
||||||
|
<field name="context">{'search_default_active_input': True}</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_empty_folder">
|
<p class="o_view_nocontent_empty_folder">
|
||||||
No generated records found
|
No generated records found
|
||||||
|
|||||||
Reference in New Issue
Block a user