account_automatic_entry_wizard_views.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="account_automatic_entry_wizard_form" model="ir.ui.view">
  5. <field name="name">account.automatic.entry.wizard.form</field>
  6. <field name="model">account.automatic.entry.wizard</field>
  7. <field name="arch" type="xml">
  8. <form>
  9. <field name="account_type" invisible="1"/>
  10. <field name="company_id" invisible="1"/>
  11. <field name="move_line_ids" invisible="1"/>
  12. <field name="display_currency_helper" invisible="1"/>
  13. <div attrs="{'invisible': [('display_currency_helper', '=', False)]}" class="alert alert-info text-center" role="status">
  14. The selected destination account is set to use a specific currency. Every entry transferred to it will be converted into this currency, causing
  15. the loss of any pre-existing foreign currency amount.
  16. </div>
  17. <div attrs="{'invisible': [('lock_date_message', '=', False)]}" class="alert alert-warning text-center" role="status">
  18. <field name="lock_date_message" nolabel="1"/>
  19. </div>
  20. <field name="action" invisible="context.get('hide_automatic_options')" widget="radio" options="{'horizontal': true}"/>
  21. <group>
  22. <group attrs="{'invisible': [('action', '!=', 'change_period')]}">
  23. <field name="date" string="Recognition Date"/>
  24. <field name="expense_accrual_account" string="Accrued Account"
  25. attrs="{'invisible': [('account_type', '!=', 'expense')], 'required': [('account_type', '=', 'expense'), ('action', '=', 'change_period')]}"/>
  26. <field name="revenue_accrual_account" string="Accrued Account"
  27. attrs="{'invisible': [('account_type', '!=', 'income')], 'required': [('account_type', '=', 'income'), ('action', '=', 'change_period')]}"/>
  28. </group>
  29. <group attrs="{'invisible': [('action', '!=', 'change_account')]}">
  30. <field name="date" string="Transfer Date"/>
  31. <field name="destination_account_id" attrs="{'required': [('action', '=', 'change_account')]}" domain="[('company_id', '=', company_id)]"/>
  32. </group>
  33. <group>
  34. <label for="total_amount" string="Adjusting Amount" attrs="{'invisible': [('action', '!=', 'change_period')]}"/>
  35. <div attrs="{'invisible': [('action', '!=', 'change_period')]}">
  36. <field name="percentage" style="width:40% !important" attrs="{'readonly': [('action', '!=', 'change_period')]}"/>%<span class="px-3"></span>(<field name="total_amount" class="oe_inline"/>)
  37. </div>
  38. <field name="total_amount" readonly="1" attrs="{'invisible': [('action', '=', 'change_period')]}"/>
  39. <field name="journal_id"/>
  40. </group>
  41. </group>
  42. <label for="preview_move_data" string="The following Journal Entries will be generated"/>
  43. <field name="preview_move_data" widget="grouped_view_widget" class="d-block"/>
  44. <footer>
  45. <button string="Create Journal Entries" name="do_action" type="object" class="oe_highlight" data-hotkey="q"/>
  46. <button string="Cancel" class="btn btn-secondary" special="cancel" data-hotkey="z"/>
  47. </footer>
  48. </form>
  49. </field>
  50. </record>
  51. <record id="account_automatic_entry_wizard_action" model="ir.actions.act_window">
  52. <field name="name">Create Automatic Entries for selected Journal Items</field>
  53. <field name="res_model">account.automatic.entry.wizard</field>
  54. <field name="view_mode">form</field>
  55. <field name="target">new</field>
  56. </record>
  57. </data>
  58. </odoo>