summaryrefslogtreecommitdiff
path: root/addons/account/wizard/account_automatic_entry_wizard_views.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/account/wizard/account_automatic_entry_wizard_views.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account/wizard/account_automatic_entry_wizard_views.xml')
-rw-r--r--addons/account/wizard/account_automatic_entry_wizard_views.xml56
1 files changed, 56 insertions, 0 deletions
diff --git a/addons/account/wizard/account_automatic_entry_wizard_views.xml b/addons/account/wizard/account_automatic_entry_wizard_views.xml
new file mode 100644
index 00000000..70426742
--- /dev/null
+++ b/addons/account/wizard/account_automatic_entry_wizard_views.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <record id="account_automatic_entry_wizard_form" model="ir.ui.view">
+ <field name="name">account.automatic.entry.wizard.form</field>
+ <field name="model">account.automatic.entry.wizard</field>
+ <field name="arch" type="xml">
+ <form>
+ <field name="account_type" invisible="1"/>
+ <field name="company_id" invisible="1"/>
+ <field name="move_line_ids" invisible="1"/>
+ <field name="display_currency_helper" invisible="1"/>
+ <div attrs="{'invisible': [('display_currency_helper', '=', False)]}" class="alert alert-info text-center" role="status">
+ The selected destination account is set to use a specific currency. Every entry transferred to it will be converted into this currency, causing
+ the loss of any pre-existing foreign currency amount.
+ </div>
+ <field name="action" invisible="context.get('hide_automatic_options')" widget="radio" options="{'horizontal': true}"/>
+ <group>
+ <group attrs="{'invisible': [('action', '!=', 'change_period')]}">
+ <field name="date" string="Recognition Date"/>
+ <field name="expense_accrual_account" string="Accrued Account"
+ attrs="{'invisible': [('account_type', '!=', 'expense')], 'required': [('account_type', '=', 'expense'), ('action', '=', 'change_period')]}"/>
+ <field name="revenue_accrual_account" string="Accrued Account"
+ attrs="{'invisible': [('account_type', '!=', 'income')], 'required': [('account_type', '=', 'income'), ('action', '=', 'change_period')]}"/>
+ </group>
+ <group attrs="{'invisible': [('action', '!=', 'change_account')]}">
+ <field name="date" string="Transfer Date"/>
+ <field name="destination_account_id" attrs="{'required': [('action', '=', 'change_account')]}" domain="[('company_id', '=', company_id)]"/>
+ </group>
+ <group>
+ <label for="total_amount" string="Adjusting Amount" attrs="{'invisible': [('action', '!=', 'change_period')]}"/>
+ <div attrs="{'invisible': [('action', '!=', 'change_period')]}">
+ <field name="percentage" style="width:40% !important" class="oe_inline" attrs="{'readonly': [('action', '!=', 'change_period')]}"/>%<span class="px-3"></span>(<field name="total_amount" class="oe_inline"/>)
+ </div>
+ <field name="total_amount" readonly="1" attrs="{'invisible': [('action', '=', 'change_period')]}"/>
+ <field name="journal_id"/>
+ </group>
+ </group>
+ <label for="preview_move_data" string="The following Journal Entries will be generated"/>
+ <field name="preview_move_data" widget="grouped_view_widget"/>
+ <footer>
+ <button string="Create Journal Entries" name="do_action" type="object" class="oe_highlight"/>
+ <button string="Cancel" class="btn btn-secondary" special="cancel"/>
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <record id="account_automatic_entry_wizard_action" model="ir.actions.act_window">
+ <field name="name">Create Automatic Entries for selected Journal Items</field>
+ <field name="res_model">account.automatic.entry.wizard</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+ </data>
+</odoo>