summaryrefslogtreecommitdiff
path: root/addons/website_event_track/views
diff options
context:
space:
mode:
authordmonzonis <dmonzonis@protonmail.com>2020-03-23 15:31:39 +0000
committerdmonzonis <mod@odoo.com>2020-04-01 07:06:04 +0000
commite84bd187e0dd4e87261087903015b093b0d4ddf3 (patch)
tree48dbc747ff08fe1d5f056c72d0f54840cb169494 /addons/website_event_track/views
parent707522cb010ac4efc04a5eeeb04d02b04d721521 (diff)
[IMP] website_event_track: allow archiving of event sponsors
Before this commit, event sponsors could not be archived, only deleted. Now, users are able to archive event sponsors if they want to set them as inactive but do not wish to delete them from the database. A filter was also added in the Event Sponsor view to quickly retrieve archived records. Also, archived sponsors will show an "Archived" ribbon in their form view. Task: 2205443
Diffstat (limited to 'addons/website_event_track/views')
-rw-r--r--addons/website_event_track/views/event_sponsor_views.xml3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website_event_track/views/event_sponsor_views.xml b/addons/website_event_track/views/event_sponsor_views.xml
index 3d48dbf6396..6c96ca5e81b 100644
--- a/addons/website_event_track/views/event_sponsor_views.xml
+++ b/addons/website_event_track/views/event_sponsor_views.xml
@@ -42,6 +42,7 @@
<search string="Event Sponsors">
<field name="partner_id"/>
<field name="event_id"/>
+ <filter string="Archived" name="archived" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
@@ -52,6 +53,8 @@
<field name="arch" type="xml">
<form>
<sheet>
+ <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
+ <field name="active" invisible="1"/>
<field name="image_128" widget="image" class="oe_avatar"/>
<h1><field name="partner_id"/></h1>
<group>