Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
237
account_cash_deposit/views/account_cash_deposit.xml
Executable file
237
account_cash_deposit/views/account_cash_deposit.xml
Executable file
@@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
-->
|
||||
<odoo>
|
||||
<record id="account_cash_deposit_form" model="ir.ui.view">
|
||||
<field name="model">account.cash.deposit</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<!-- order -->
|
||||
<button
|
||||
name="confirm_order"
|
||||
string="Confirm Order"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="operation_type != 'order' or state != 'draft'"
|
||||
/>
|
||||
<button
|
||||
name="%(account_cash_order_reception_action)d"
|
||||
string="Cash Received"
|
||||
type="action"
|
||||
class="btn-primary"
|
||||
invisible="operation_type != 'order' or state != 'confirmed'"
|
||||
/>
|
||||
<!-- deposit -->
|
||||
<button
|
||||
name="validate"
|
||||
string="Validate"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="operation_type != 'deposit' or state != 'draft'"
|
||||
/>
|
||||
|
||||
<button
|
||||
name="%(account_cash_deposit.report_account_cash_deposit)d"
|
||||
string="Print"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="backtodraft"
|
||||
invisible="state == 'draft'"
|
||||
string="Back to Draft"
|
||||
type="object"
|
||||
/>
|
||||
<field
|
||||
name="state"
|
||||
widget="statusbar"
|
||||
statusbar_visible="draft,done"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<b>
|
||||
<field name="operation_type" />
|
||||
</b>
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group name="main">
|
||||
<group name="left">
|
||||
<field name="cash_journal_id" readonly="state != 'draft'" />
|
||||
<field name="bank_journal_id" readonly="state != 'draft'" />
|
||||
<field
|
||||
name="coin_amount"
|
||||
invisible="operation_type != 'deposit'"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
<field name="total_amount" />
|
||||
</group>
|
||||
<group name="right">
|
||||
<field
|
||||
name="currency_id"
|
||||
groups="base.group_multi_currency"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field
|
||||
name="order_date"
|
||||
invisible="operation_type != 'order'"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
|
||||
<field name="date" readonly="state == 'done'" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="move_id" />
|
||||
</group>
|
||||
</group>
|
||||
<group name="lines">
|
||||
<field
|
||||
name="line_ids"
|
||||
nolabel="1"
|
||||
colspan="2"
|
||||
context="{'default_currency_id': currency_id}"
|
||||
readonly="state != 'draft'"
|
||||
>
|
||||
<list editable="bottom">
|
||||
<field name="cash_unit_id" />
|
||||
<field name="qty" />
|
||||
<field name="subtotal" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
<group name="notes" string="Notes">
|
||||
<field name="notes" nolabel="1" />
|
||||
</group>
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_cash_deposit_tree" model="ir.ui.view">
|
||||
<field name="model">account.cash.deposit</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="operation_type" optional="hide" />
|
||||
<field name="name" decoration-bf="1" />
|
||||
<field
|
||||
name="order_date"
|
||||
invisible="context.get('default_operation_type')!='order'"
|
||||
/>
|
||||
<field name="date" />
|
||||
<field name="cash_journal_id" />
|
||||
<field name="bank_journal_id" />
|
||||
<field name="total_amount" decoration-bf="1" />
|
||||
<field
|
||||
name="currency_id"
|
||||
groups="base.group_multi_currency"
|
||||
optional="hide"
|
||||
/>
|
||||
<field name="is_reconcile" optional="show" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="state"
|
||||
widget="badge"
|
||||
decoration-info="state == 'draft'"
|
||||
decoration-warning="state == 'confirmed'"
|
||||
decoration-success="state == 'done'"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_cash_deposit_search" model="ir.ui.view">
|
||||
<field name="model">account.cash.deposit</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" />
|
||||
<field name="cash_journal_id" domain="[('type', '=', 'cash')]" />
|
||||
<field
|
||||
name="bank_journal_id"
|
||||
domain="[('type', '=', 'bank'), ('bank_account_id', '!=', False)]"
|
||||
/>
|
||||
<filter
|
||||
name="draft"
|
||||
string="Draft"
|
||||
domain="[('state', '=', 'draft')]"
|
||||
/>
|
||||
<filter
|
||||
name="confirmed"
|
||||
string="Confirmed"
|
||||
domain="[('state', '=', 'confirmed')]"
|
||||
/>
|
||||
<filter name="done" string="Done" domain="[('state', '=', 'done')]" />
|
||||
<separator />
|
||||
<filter name="date" string="Date" date="date" />
|
||||
<group string="Group By" name="groupby">
|
||||
<filter
|
||||
name="date_groupby"
|
||||
string="Date"
|
||||
context="{'group_by': 'date'}"
|
||||
/>
|
||||
<filter
|
||||
name="cash_journal_groupby"
|
||||
string="Cash Box"
|
||||
context="{'group_by': 'cash_journal_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="bank_journal_id_groupby"
|
||||
string="Bank Account"
|
||||
context="{'group_by': 'bank_journal_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="currency_groupby"
|
||||
string="Currency"
|
||||
context="{'group_by': 'currency_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="state_groupby"
|
||||
string="State"
|
||||
context="{'group_by': 'state'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_cash_deposit_action" model="ir.actions.act_window">
|
||||
<field name="name">Cash Deposits</field>
|
||||
<field name="res_model">account.cash.deposit</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="domain">[('operation_type', '=', 'deposit')]</field>
|
||||
<field name="context">{'default_operation_type': 'deposit'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="account_cash_deposit_menu"
|
||||
action="account_cash_deposit_action"
|
||||
parent="account.menu_finance_entries"
|
||||
sequence="25"
|
||||
/>
|
||||
<record id="account_cash_order_action" model="ir.actions.act_window">
|
||||
<field name="name">Cash Orders</field>
|
||||
<field name="res_model">account.cash.deposit</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="domain">[('operation_type', '=', 'order')]</field>
|
||||
<field name="context">{'default_operation_type': 'order'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="account_cash_order_menu"
|
||||
action="account_cash_order_action"
|
||||
parent="account.menu_finance_entries"
|
||||
sequence="27"
|
||||
/>
|
||||
</odoo>
|
||||
67
account_cash_deposit/views/cash_unit.xml
Executable file
67
account_cash_deposit/views/cash_unit.xml
Executable file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record id="cash_unit_form" model="ir.ui.view">
|
||||
<field name="model">cash.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<group name="main">
|
||||
<field
|
||||
name="currency_id"
|
||||
invisible="not context.get('cash_unit_main_view')"
|
||||
/>
|
||||
<field name="active" invisible="1" />
|
||||
<field name="cash_type" />
|
||||
<field
|
||||
name="coinroll_qty"
|
||||
invisible="cash_type != 'coinroll'"
|
||||
required="cash_type == 'coinroll'"
|
||||
/>
|
||||
<field name="value" />
|
||||
<field name="total_value" invisible="cash_type != 'coinroll'" />
|
||||
<field name="auto_create" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cash_unit_tree" model="ir.ui.view">
|
||||
<field name="model">cash.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field
|
||||
name="currency_id"
|
||||
invisible="not context.get('cash_unit_main_view')"
|
||||
/>
|
||||
<field
|
||||
name="cash_type"
|
||||
widget="badge"
|
||||
decoration-success="cash_type == 'note'"
|
||||
decoration-muted="cash_type == 'coin'"
|
||||
decoration-info="cash_type == 'coinroll'"
|
||||
/>
|
||||
<field name="value" />
|
||||
<field name="coinroll_qty" invisible="cash_type != 'coinroll'" />
|
||||
<field name="total_value" />
|
||||
<field name="auto_create" optional="show" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cash_unit_action" model="ir.actions.act_window">
|
||||
<field name="name">Cash Unit</field>
|
||||
<field name="res_model">cash.unit</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'cash_unit_main_view': True}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
19
account_cash_deposit/views/res_currency.xml
Executable file
19
account_cash_deposit/views/res_currency.xml
Executable file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record id="view_currency_form" model="ir.ui.view">
|
||||
<field name="model">res.currency</field>
|
||||
<field name="inherit_id" ref="base.view_currency_form" />
|
||||
<field name="arch" type="xml">
|
||||
<sheet position="inside">
|
||||
<group name="cash_units" string="Cash Units">
|
||||
<field name="cash_unit_ids" nolabel="1" colspan="2" />
|
||||
</group>
|
||||
</sheet>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user