stock_lot_views.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="stock_production_lot_view_form" model="ir.ui.view">
  4. <field name="name">stock.production.lot.view.form</field>
  5. <field name="model">stock.lot</field>
  6. <field name="inherit_id" ref="stock.view_production_lot_form"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//div[hasclass('oe_button_box')]/button" position="before">
  9. <button class="oe_stat_button" name="action_view_po"
  10. type="object" icon="fa-credit-card" help="Purchase Orders"
  11. attrs="{'invisible': ['|', ('purchase_order_count', '=', 0), ('display_complete', '=', False)]}">
  12. <div class="o_field_widget o_stat_info">
  13. <span class="o_stat_value">
  14. <field name="purchase_order_count" widget="statinfo" nolabel="1" class="mr4"/>
  15. </span>
  16. <span class="o_stat_text">Purchases</span>
  17. </div>
  18. </button>
  19. </xpath>
  20. <xpath expr="//group[@name='main_group']" position="after">
  21. <group>
  22. <field name="purchase_order_ids" widget="many2many" readonly="True"
  23. attrs="{'invisible': ['|', ('purchase_order_ids', '=', []), ('display_complete', '=', True)]}">
  24. <tree>
  25. <field name="name"/>
  26. <field name="partner_id"/>
  27. <field name="date_order"/>
  28. <field name="state" invisible="1"/>
  29. </tree>
  30. </field>
  31. </group>
  32. </xpath>
  33. </field>
  34. </record>
  35. </odoo>