res_partner_view.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record id="act_res_partner_2_pos_order" model="ir.actions.act_window">
  5. <field name="name">Pos</field>
  6. <field name="res_model">pos.order</field>
  7. <field name="view_mode">tree,form</field>
  8. <field name="context">{'search_default_partner_id': active_id}</field>
  9. <field name="view_id" eval="False"/>
  10. <field name="search_view_id" ref="point_of_sale.view_pos_order_filter"/>
  11. </record>
  12. <!-- Partner kanban view inherte -->
  13. <record model="ir.ui.view" id="point_sale_partner_kanban_view">
  14. <field name="name">point.sale.kanban.saleorder.inherit</field>
  15. <field name="model">res.partner</field>
  16. <field name="inherit_id" ref="base.res_partner_kanban_view"/>
  17. <field name="priority" eval="20"/>
  18. <field name="arch" type="xml">
  19. <field name="mobile" position="after">
  20. <field name="pos_order_count"/>
  21. </field>
  22. <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
  23. <a name="%(smarticon_pos.act_res_partner_2_pos_order)d" type="action" t-if="record.pos_order_count.value>0">
  24. <t t-esc="record.pos_order_count.value"/> Pos
  25. </a>
  26. </xpath>
  27. </field>
  28. </record>
  29. <!-- Partners inherited form -->
  30. <record model="ir.ui.view" id="view_pos_partner_info_form">
  31. <field name="name">res.partner.pos.buttons</field>
  32. <field name="model">res.partner</field>
  33. <field name="inherit_id" ref="base.view_partner_form"/>
  34. <field name="priority" eval="50"/>
  35. <field name="arch" type="xml">
  36. <xpath expr="//div[@name='buttons']" position="inside">
  37. <button
  38. class="oe_inline oe_stat_button"
  39. type="action"
  40. name="%(smarticon_pos.act_res_partner_2_pos_order)d"
  41. attrs="{'invisible': [('customer', '=', False)]}"
  42. icon="fa-strikethrough"
  43. context="{'search_default_partner_id': active_id}">
  44. <field string="Pos" name="pos_order_count" widget="statinfo"/>
  45. </button>
  46. </xpath>
  47. </field>
  48. </record>
  49. </data>
  50. </openerp>