You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
4.1 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record model="ir.actions.act_window"
  4. id="action_stock_picking_agreement_specific">
  5. <field name="name">Pickings</field>
  6. <field name="type">ir.actions.act_window</field>
  7. <field name="res_model">stock.picking</field>
  8. <field name="view_type">form</field>
  9. <field name="view_mode">tree,form</field>
  10. <field name="domain">[('agreement_id', '=', active_id)]</field>
  11. <field name="help" type="html">
  12. <p class="oe_view_nocontent_create">
  13. Create Pickings
  14. </p>
  15. </field>
  16. </record>
  17. <record model="ir.actions.act_window"
  18. id="action_stock_move_agreement_specific">
  19. <field name="name">Moves</field>
  20. <field name="type">ir.actions.act_window</field>
  21. <field name="res_model">stock.move</field>
  22. <field name="view_type">form</field>
  23. <field name="view_mode">tree,form</field>
  24. <field name="domain">[('agreement_id', '=', active_id)]</field>
  25. <field name="help" type="html">
  26. <p class="oe_view_nocontent_create">
  27. Create Moves
  28. </p>
  29. </field>
  30. </record>
  31. <record model="ir.actions.act_window"
  32. id="action_stock_production_lot_agreement_specific">
  33. <field name="name">Lots/Serials</field>
  34. <field name="type">ir.actions.act_window</field>
  35. <field name="res_model">stock.production.lot</field>
  36. <field name="view_type">form</field>
  37. <field name="view_mode">tree,form</field>
  38. <field name="domain">[('agreement_id', '=', active_id)]</field>
  39. <field name="help" type="html">
  40. <p class="oe_view_nocontent_create">
  41. Create Lot/Serial
  42. </p>
  43. </field>
  44. </record>
  45. <record id="partner_agreement_form_view_stock" model="ir.ui.view">
  46. <field name="name">agreement.form.stock</field>
  47. <field name="model">agreement</field>
  48. <field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
  49. <field name="arch" type="xml">
  50. <xpath expr="//div[@name='button_box']" position="inside">
  51. <button name="%(action_stock_picking_agreement_specific)d"
  52. type="action"
  53. attrs="{'invisible': [('picking_count', '=', 0)]}"
  54. class="oe_stat_button" icon="fa-truck">
  55. <div class="o_field_widget o_stat_info">
  56. <span class="o_stat_value">
  57. <field name="picking_count" widget="statinfo"
  58. nolabel="1"/>
  59. </span>
  60. <span class="o_stat_text">Pickings</span>
  61. </div>
  62. </button>
  63. <button name="%(action_stock_move_agreement_specific)d"
  64. type="action"
  65. attrs="{'invisible': [('move_count', '=', 0)]}"
  66. class="oe_stat_button" icon="fa-arrows-v">
  67. <div class="o_field_widget o_stat_info">
  68. <span class="o_stat_value">
  69. <field name="move_count" widget="statinfo"
  70. nolabel="1"/>
  71. </span>
  72. <span class="o_stat_text">Moves</span>
  73. </div>
  74. </button>
  75. <button name="%(action_stock_production_lot_agreement_specific)d"
  76. type="action"
  77. attrs="{'invisible': [('lot_count', '=', 0)]}"
  78. class="oe_stat_button" icon="fa-arrows">
  79. <div class="o_field_widget o_stat_info">
  80. <span class="o_stat_value">
  81. <field name="lot_count" widget="statinfo"
  82. nolabel="1"/>
  83. </span>
  84. <span class="o_stat_text">Lots/Serials</span>
  85. </div>
  86. </button>
  87. </xpath>
  88. </field>
  89. </record>
  90. </odoo>