Skip to content

Commit

Permalink
[IMP] views
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Mar 13, 2024
1 parent 678a2e5 commit 1e4d411
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 7 deletions.
10 changes: 5 additions & 5 deletions automation_oca/views/automation_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,32 +427,32 @@
<field name="name" class="o_text_overflow" />
</div>
<div class="row mt8">
<div class="col-4 text-center text-muted">
<div class="col-4 text-center text-black-50">
<div>Records</div>
<field name="record_count" class="h1" />
</div>
<div class="col-4 text-center text-primary">
<div>Running</div>
<field name="record_run_count" class="h1" />
</div>
<div class="col-4 text-center text-muted">
<div class="col-4 text-center text-black-50">
<div>Done</div>
<field name="record_done_count" class="h1" />
</div>
</div>
<div class="row mt8">
<div class="col-4 text-center text-muted">
<div class="col-4 text-center text-black-50">
<div><i
class="fa fa-envelope"
title="Mails"
/></div>
<field name="activity_mail_count" class="h2" />
</div>
<div class="col-4 text-center text-activity_mail_count">
<div class="col-4 text-center text-black-50">
<div><i class="fa fa-cogs" title="Actions" /></div>
<field name="activity_action_count" class="h2" />
</div>
<div class="col-4 text-center text-muted">
<div class="col-4 text-center text-black-50">
<div><i
class="fa fa-hand-pointer-o"
title="Clicks"
Expand Down
21 changes: 19 additions & 2 deletions automation_oca/views/automation_record.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@
<field name="arch" type="xml">
<search>
<field name="configuration_id" />
<separator />
<filter
name="filter_create_date"
string="Created on"
date="create_date"
/>
</search>
</field>
</record>
Expand All @@ -272,15 +278,26 @@
<field name="model">automation.record</field>
<field name="arch" type="xml">
<graph string="Records">
<field name="create_date" type="row" />
<field name="create_date" interval="day" />
</graph>
</field>
</record>

<record id="automation_record_pivot_view" model="ir.ui.view">
<field name="name">automation.record.pivot</field>
<field name="model">automation.record</field>
<field name="arch" type="xml">
<pivot string="Records">
<field name="configuration_id" type="row" />
<field name="state" type="col" />
</pivot>
</field>
</record>

<record model="ir.actions.act_window" id="automation_record_act_window">
<field name="name">Automation Record</field> <!-- TODO -->
<field name="res_model">automation.record</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_mode">graph,pivot,tree,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
</record>
Expand Down
89 changes: 89 additions & 0 deletions automation_oca/views/automation_record_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,93 @@
</field>
</record>

<record id="automation_record_activity_search_view" model="ir.ui.view">
<field name="name">automation.record.activity.search</field>
<field name="model">automation.record.activity</field>
<field name="arch" type="xml">
<search>

<field name="configuration_activity_id" />
<field name="configuration_id" />
<field name="record_id" />
<separator />
<filter
string="Scheduled"
name="scheduled"
domain="[('state', '=', 'scheduled')]"
/>
<filter string="Done" name="done" domain="[('state', '=', 'done')]" />
<filter
string="Expired"
name="expired"
domain="[('state', '=', 'expired')]"
/>
<filter
string="Rejected"
name="rejected"
domain="[('state', '=', 'rejected')]"
/>
<filter
string="Error"
name="error"
domain="[('state', '=', 'error')]"
/>
<filter
string="Canceled"
name="cancel"
domain="[('state', '=', 'cancel')]"
/>
<separator />
<filter
name="filter_schedule_date"
string="Scheduled date"
date="scheduled_date"
/>
<separator />
<filter
name="filter_processed_on"
string="Processed on"
date="processed_on"
/>
</search>
</field>
</record>

<record id="automation_record_activity_graph_view" model="ir.ui.view">
<field name="name">automation.record.activity.graph</field>
<field name="model">automation.record.activity</field>
<field name="arch" type="xml">
<graph string="Records">
<field name="scheduled_date" interval="day" />
<field name="state" />
</graph>
</field>
</record>

<record id="automation_record_activity_pivot_view" model="ir.ui.view">
<field name="name">automation.record.activity.pivot</field>
<field name="model">automation.record.activity</field>
<field name="arch" type="xml">
<pivot string="Records">
<field name="configuration_id" type="row" />
<field name="state" type="col" />
</pivot>
</field>
</record>

<record model="ir.actions.act_window" id="automation_record_activity_act_window">
<field name="name">Activities</field> <!-- TODO -->
<field name="res_model">automation.record.activity</field>
<field name="view_mode">graph,pivot,tree,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
</record>

<record model="ir.ui.menu" id="automation_record_activity_menu">
<field name="name">Activities</field>
<field name="parent_id" ref="automation_reporting_root_menu" />
<field name="action" ref="automation_record_activity_act_window" />
<field name="sequence" eval="20" />
</record>

</odoo>

0 comments on commit 1e4d411

Please sign in to comment.