summaryrefslogtreecommitdiff
path: root/addons/account/views/account_cash_rounding_view.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/views/account_cash_rounding_view.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account/views/account_cash_rounding_view.xml')
-rw-r--r--addons/account/views/account_cash_rounding_view.xml62
1 files changed, 62 insertions, 0 deletions
diff --git a/addons/account/views/account_cash_rounding_view.xml b/addons/account/views/account_cash_rounding_view.xml
new file mode 100644
index 00000000..273246d9
--- /dev/null
+++ b/addons/account/views/account_cash_rounding_view.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!-- Action -->
+ <record id="rounding_list_action" model="ir.actions.act_window">
+ <field name="name">Cash Roundings</field>
+ <field name="res_model">account.cash.rounding</field>
+ <field name="view_mode">tree,form</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">Create the first cash rounding</p>
+ </field>
+ </record>
+
+ <!-- Views -->
+ <record id="rounding_form_view" model="ir.ui.view">
+ <field name="name">account.cash.rounding.form</field>
+ <field name="model">account.cash.rounding</field>
+ <field name="arch" type="xml">
+ <form string="Rounding Form">
+ <sheet>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name" class="oe_inline"/></h1>
+ </div>
+ <group>
+ <field name="rounding"/>
+ <field name="strategy"/>
+ <field name="profit_account_id" options="{'no_create': True}" attrs="{'invisible': [('strategy', '!=', 'add_invoice_line')], 'required': [('strategy', '=', 'add_invoice_line')]}"
+ groups="account.group_account_invoice,account.group_account_readonly" domain="[('user_type_id.type', 'not in', ('receivable', 'payable'))]"/>
+ <field name="loss_account_id" options="{'no_create': True}" attrs="{'invisible': [('strategy', '!=', 'add_invoice_line')], 'required': [('strategy', '=', 'add_invoice_line')]}"
+ groups="account.group_account_invoice,account.group_account_readonly" domain="[('user_type_id.type', 'not in', ('receivable', 'payable'))]"/>
+ <field name="rounding_method"/>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="rounding_search_view" model="ir.ui.view">
+ <field name="name">account.cash.rounding.search</field>
+ <field name="model">account.cash.rounding</field>
+ <field name="arch" type="xml">
+ <search>
+ <field name="name"/>
+ </search>
+ </field>
+ </record>
+
+ <record id="rounding_tree_view" model="ir.ui.view">
+ <field name="name">account.cash.rounding.tree</field>
+ <field name="model">account.cash.rounding</field>
+ <field name="arch" type="xml">
+ <tree string="Rounding Tree">
+ <field name="name"/>
+ <field name="rounding"/>
+ <field name="rounding_method"/>
+ </tree>
+ </field>
+ </record>
+
+ </data>
+</odoo>