Skip to content

Commit

Permalink
[IMP] add clicks menu
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Mar 13, 2024
1 parent 1e4d411 commit ae9d959
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions automation_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"views/automation_record_activity.xml",
"views/automation_configuration_activity.xml",
"views/automation_configuration.xml",
"views/link_tracker_clicks.xml",
"data/cron.xml",
],
"assets": {
Expand Down
2 changes: 1 addition & 1 deletion automation_oca/views/automation_record_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</record>

<record model="ir.actions.act_window" id="automation_record_activity_act_window">
<field name="name">Activities</field> <!-- TODO -->
<field name="name">Activities</field>
<field name="res_model">automation.record.activity</field>
<field name="view_mode">graph,pivot,tree,form</field>
<field name="domain">[]</field>
Expand Down
38 changes: 38 additions & 0 deletions automation_oca/views/link_tracker_clicks.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="link_tracker_click_search_view" model="ir.ui.view">
<field name="name">link.tracker.click.view.search.inherit.mass_mailing</field>
<field name="model">link.tracker.click</field>
<field name="inherit_id" ref="link_tracker.link_tracker_click_view_search" />
<field name="arch" type="xml">
<xpath expr="//field[@name='country_id']" position="after">
<field name="automation_configuration_id" />
</xpath>
<xpath expr="//filter[@name='groupby_country_id']" position="after">
<filter
string="Automation configuration"
name="groupby_automation_configuration_id"
context="{'group_by': 'automation_configuration_id'}"
/>
</xpath>
</field>
</record>

<record model="ir.actions.act_window" id="link_tracker_click_act_window">
<field name="name">Clicks</field>
<field name="res_model">link.tracker.click</field>
<field name="view_mode">graph,pivot,tree</field>
<field name="domain">[('automation_record_activity_id', '!=', False)]</field>
<field
name="context"
>{'search_default_groupby_automation_configuration_id': 1}</field>
</record>

<record model="ir.ui.menu" id="link_tracker_click_menu">
<field name="name">Clicks</field>
<field name="parent_id" ref="automation_reporting_root_menu" />
<field name="action" ref="link_tracker_click_act_window" />
<field name="sequence" eval="30" />
</record>
</odoo>

0 comments on commit ae9d959

Please sign in to comment.