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.

51 lines
2.6 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record id="view_pos_session_form" model="ir.ui.view">
  4. <field name="model">pos.session</field>
  5. <field name="inherit_id" ref="point_of_sale.view_pos_session_form"/>
  6. <field name="arch" type="xml">
  7. <!-- Add new buttons Buttons -->
  8. <xpath expr="//sheet/div[@name='button_box']" position="inside">
  9. <button class="oe_stat_button" name="button_move_income"
  10. type="object" icon="fa-level-down"
  11. attrs="{'invisible': ['|',
  12. ('display_move_reason_income', '=', False),
  13. ('state', 'not in', ['opened', 'closing_control'])]}">
  14. <div class="o_field_widget o_stat_info">
  15. <span class="o_stat_text">Put</span>
  16. <span class="o_stat_text">Money In</span>
  17. <field name="display_move_reason_income" invisible="1"/>
  18. </div>
  19. </button>
  20. <button class="oe_stat_button" name="button_move_expense"
  21. type="object" icon="fa-level-up"
  22. attrs="{'invisible': ['|',
  23. ('display_move_reason_expense', '=', False),
  24. ('state', 'not in', ['opened', 'closing_control'])]}">
  25. <div class="o_field_widget o_stat_info">
  26. <span class="o_stat_text">Take</span>
  27. <span class="o_stat_text">Money Out</span>
  28. <field name="display_move_reason_expense" invisible="1"/>
  29. </div>
  30. </button>
  31. </xpath>
  32. <!-- Hide obsolete Buttons -->
  33. <xpath expr="//button[@name='%(point_of_sale.action_pos_box_in)d']" position="attributes">
  34. <attribute name="groups">pos_cash_move_reason.group_pos_old_actions</attribute>
  35. </xpath>
  36. <xpath expr="//button[@name='%(point_of_sale.action_pos_box_out)d']" position="attributes">
  37. <attribute name="groups">pos_cash_move_reason.group_pos_old_actions</attribute>
  38. </xpath>
  39. </field>
  40. </record>
  41. <record id="point_of_sale.action_pos_box_in" model="ir.actions.act_window">
  42. <field name="groups_id" eval="[(4, ref('pos_cash_move_reason.group_pos_old_actions'))]"/>
  43. </record>
  44. <record id="point_of_sale.action_pos_box_out" model="ir.actions.act_window">
  45. <field name="groups_id" eval="[(4, ref('pos_cash_move_reason.group_pos_old_actions'))]"/>
  46. </record>
  47. </odoo>