account_move_reversal_view.xml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="view_account_move_reversal" model="ir.ui.view">
  5. <field name="name">account.move.reversal.form</field>
  6. <field name="model">account.move.reversal</field>
  7. <field name="arch" type="xml">
  8. <form string="Reverse Journal Entry">
  9. <field name="residual" invisible="1"/>
  10. <field name="company_id" invisible="1"/>
  11. <field name="move_ids" invisible="1"/>
  12. <field name="move_type" invisible="1"/>
  13. <field name="available_journal_ids" invisible="1"/>
  14. <group>
  15. <group attrs="{'invisible': ['|',('move_type', 'not in', ('out_invoice', 'in_invoice')),('residual', '=', 0)]}">
  16. <field name="refund_method" widget="radio" attrs="{'readonly': [('residual', '=', 0)]}"/>
  17. </group>
  18. <group attrs="{'invisible': ['|', ('move_type', 'not in', ('out_invoice', 'in_invoice', 'some_invoice')), ('residual', '=', 0)]}">
  19. <div attrs="{'invisible':[('refund_method', '!=', 'refund')]}" class="oe_grey" colspan="2">
  20. The credit note is created in draft and can be edited before being issued.
  21. </div>
  22. <div attrs="{'invisible':[('refund_method', '!=', 'cancel')]}" class="oe_grey" colspan="2">
  23. The credit note is auto-validated and reconciled with the invoice.
  24. </div>
  25. <div attrs="{'invisible':[('refund_method', '!=', 'modify')]}" class="oe_grey" colspan="2">
  26. The credit note is auto-validated and reconciled with the invoice.
  27. The original invoice is duplicated as a new draft.
  28. </div>
  29. </group>
  30. </group>
  31. <group>
  32. <group>
  33. <field name="reason" attrs="{'invisible': [('move_type', '=', 'entry')]}"/>
  34. <field name="date_mode" string="Reversal Date" widget="radio"/>
  35. </group>
  36. <group>
  37. <field name="journal_id" domain="[('id', 'in', available_journal_ids)]"/>
  38. <field name="date" string="Refund Date" attrs="{'invisible': ['|', ('move_type', 'not in', ('out_invoice', 'in_invoice')), ('date_mode', '!=', 'custom')], 'required':[('date_mode', '=', 'custom')]}"/>
  39. <field name="date" attrs="{'invisible': ['|', ('move_type', 'in', ('out_invoice', 'in_invoice')), ('date_mode', '!=', 'custom')], 'required':[('date_mode', '=', 'custom')]}"/>
  40. </group>
  41. </group>
  42. <footer>
  43. <button string='Reverse' name="reverse_moves" type="object" class="btn-primary" data-hotkey="q"/>
  44. <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
  45. </footer>
  46. </form>
  47. </field>
  48. </record>
  49. <record id="action_view_account_move_reversal" model="ir.actions.act_window">
  50. <field name="name">Reverse</field>
  51. <field name="res_model">account.move.reversal</field>
  52. <field name="view_mode">tree,form</field>
  53. <field name="view_id" ref="view_account_move_reversal"/>
  54. <field name="target">new</field>
  55. <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
  56. <field name="binding_model_id" ref="account.model_account_move" />
  57. <field name="binding_view_types">list</field>
  58. </record>
  59. </data>
  60. </odoo>