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.

105 lines
5.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- ********************************************************************** -->
  3. <!--Point Of Sale - Change Payment module for Odoo -->
  4. <!--Copyright (C) 2015-Today GRAP (http://www.grap.coop) -->
  5. <!--@author Sylvain LE GAL (https://twitter.com/legalsylvain) -->
  6. <!--This program is free software: you can redistribute it and/or modify -->
  7. <!--it under the terms of the GNU Affero General Public License as -->
  8. <!--published by the Free Software Foundation, either version 3 of the -->
  9. <!--License, or (at your option) any later version. -->
  10. <!--This program is distributed in the hope that it will be useful, -->
  11. <!--but WITHOUT ANY WARRANTY; without even the implied warranty of -->
  12. <!--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
  13. <!--GNU Affero General Public License for more details. -->
  14. <!--You should have received a copy of the GNU Affero General Public License-->
  15. <!--along with this program. If not, see <http://www.gnu.org/licenses/>. -->
  16. <!-- ********************************************************************** -->
  17. <openerp>
  18. <data>
  19. <!-- Model: pos.order -->
  20. <record id="view_pos_order_form" model="ir.ui.view">
  21. <field name="model">pos.order</field>
  22. <field name="inherit_id" ref="point_of_sale.view_pos_pos_form" />
  23. <field name="arch" type="xml">
  24. <button string="Payment" position="attributes">
  25. <attribute name="context">{'pos_session_id' : session_id}</attribute>
  26. </button>
  27. <button name="refund" position="before">
  28. <button name="%(action_pos_change_payments_wizard)d"
  29. context="{'pos_session_id' : session_id}"
  30. string="Change Payments" type="action" states="paid,invoiced"/>
  31. </button>
  32. <field name="journal_id" position="after">
  33. <button name="%(action_pos_switch_journal_wizard)d" string="Switch Journal"
  34. type="action" icon="gtk-index"/>
  35. </field>
  36. </field>
  37. </record>
  38. <!-- Model: account.bank.statement -->
  39. <record id="view_account_bank_statement_form" model="ir.ui.view">
  40. <field name="model">account.bank.statement</field>
  41. <field name="inherit_id" ref="account.view_bank_statement_form" />
  42. <field name="arch" type="xml">
  43. <xpath expr="//field[@name='line_ids']/tree/field[@name='amount']" position="after">
  44. <field name="pos_statement_id" invisible="1" />
  45. <button name="%(action_pos_switch_journal_wizard)d" string="Switch Journal" type="action" icon="gtk-index" attrs="{'invisible':[('pos_statement_id', '=', False)]}"/>
  46. </xpath>
  47. </field>
  48. </record>
  49. <!-- Model: pos.switch.journal.wizard-->
  50. <record id="view_pos_switch_journal_wizard_form" model="ir.ui.view">
  51. <field name="model">pos.switch.journal.wizard</field>
  52. <field name="arch" type="xml">
  53. <form string="Switch Journal">
  54. <group col="4">
  55. <field name="statement_line_id" />
  56. <field name="old_journal_id" />
  57. <field name="new_journal_id" />
  58. <field name="available_journal_ids" />
  59. <field name="new_statement_id" />
  60. <field name="amount" />
  61. </group>
  62. <footer>
  63. <button name="button_switch_journal" string="Switch Journal" type="object" class="oe_highlight"/>
  64. <label string="or" />
  65. <button string="Cancel" class="oe_link" special="cancel" />
  66. </footer>
  67. </form>
  68. </field>
  69. </record>
  70. <!-- Model: pos.switch.journal.wizard-->
  71. <record id="view_pos_change_payments_wizard_form" model="ir.ui.view">
  72. <field name="model">pos.change.payments.wizard</field>
  73. <field name="arch" type="xml">
  74. <form string="Change Payments" version="7.0">
  75. <group col="4">
  76. <field name="order_id" />
  77. <field name="amount_total" />
  78. <field name="line_ids" colspan="4">
  79. <tree string="Payment Lines" editable="bottom">
  80. <field name="journal_id" />
  81. <field name="amount" />
  82. </tree>
  83. </field>
  84. </group>
  85. <footer>
  86. <button name="button_change_payments" string="Change Payments" type="object" class="oe_highlight"/>
  87. <label string="or" />
  88. <button string="Cancel" class="oe_link" special="cancel" />
  89. </footer>
  90. </form>
  91. </field>
  92. </record>
  93. </data>
  94. </openerp>