website_visitor_views.xml 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo><data>
  3. <record id="website_visitor_view_tree" model="ir.ui.view">
  4. <field name="name">website.visitor.view.tree.inherit.event.track</field>
  5. <field name="model">website.visitor</field>
  6. <field name="inherit_id" ref="website_event.website_visitor_view_tree"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//field[@name='event_registration_count']" position="after">
  9. <field name="event_track_wishlisted_count" optional="hide"/>
  10. </xpath>
  11. </field>
  12. </record>
  13. <record id="website_visitor_view_form" model="ir.ui.view">
  14. <field name="name">website.visitor.view.form.inherit.event.track</field>
  15. <field name="model">website.visitor</field>
  16. <field name="inherit_id" ref="website_event.website_visitor_view_form"/>
  17. <field name="arch" type="xml">
  18. <xpath expr="//button[@id='w_visitor_visit_counter']" position="before">
  19. <button name="%(website_event_track.event_track_action_from_visitor)d"
  20. type="action"
  21. class="oe_stat_button" icon="fa-ticket"
  22. attrs="{'invisible': [('event_track_wishlisted_count', '=', 0)]}">
  23. <field name="event_track_wishlisted_count" widget="statinfo" string="Tracks"/>
  24. </button>
  25. </xpath>
  26. </field>
  27. </record>
  28. </data></odoo>