res_partner_views.xml 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="res_partner_view_purchase_buttons_inherit" model="ir.ui.view">
  4. <field name="name">res.partner.purchase.stock.form.inherit</field>
  5. <field name="model">res.partner</field>
  6. <field name="inherit_id" ref="purchase.res_partner_view_purchase_buttons"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//field[@name='purchase_order_count']/.." position="after">
  9. <button class="oe_stat_button" name="%(action_purchase_vendor_delay_report)d" type="action"
  10. groups="purchase.group_purchase_user"
  11. icon="fa-truck"
  12. context="{'search_default_partner_id': id}">
  13. <div class="o_form_field o_stat_info">
  14. <div class="o_row" attrs="{'invisible': [('on_time_rate', '&lt;', 0)]}">
  15. <span class="o_stat_value">
  16. <field string="On-time Rate" name="on_time_rate" widget="integer"/>
  17. </span>
  18. <span class="o_stat_value">%</span>
  19. </div>
  20. <div class="o_stat_value" attrs="{'invisible': [('on_time_rate', '&gt;=', 0)]}">
  21. No data yet
  22. </div>
  23. <span class="o_stat_text">On-time Rate</span>
  24. </div>
  25. </button>
  26. </xpath>
  27. </field>
  28. </record>
  29. </odoo>