diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/account/views | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/account/views')
37 files changed, 6633 insertions, 0 deletions
diff --git a/addons/account/views/account.xml b/addons/account/views/account.xml new file mode 100644 index 00000000..c0aa006d --- /dev/null +++ b/addons/account/views/account.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="_assets_primary_variables" inherit_id="web._assets_primary_variables"> + <xpath expr="//link[last()]" position="after"> + <link rel="stylesheet" type="text/scss" href="/account/static/src/scss/variables.scss"/> + </xpath> + </template> + + <template id="assets_backend" name="account assets" inherit_id="web.assets_backend"> + <xpath expr="." position="inside"> + <link rel="stylesheet" href="/account/static/src/css/account_bank_and_cash.css"/> + <link rel="stylesheet" href="/account/static/src/css/account.css"/> + <link rel="stylesheet" href="/account/static/src/css/tax_group.css"/> + <link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_reconciliation.scss"/> + <link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_journal_dashboard.scss"/> + <link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_dashboard.scss"/> + <link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_searchpanel.scss"/> + + <link rel="stylesheet" href="/account/static/src/scss/section_and_note_backend.scss"/> + <link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_activity.scss"/> + + <script type="text/javascript" src="/account/static/src/js/account_payment_field.js"></script> + <script type="text/javascript" src="/account/static/src/js/account_resequence_field.js"></script> + <script type="text/javascript" src="/account/static/src/js/grouped_view_widget.js"></script> + <script type="text/javascript" src="/account/static/src/js/mail_activity.js"></script> + <script type="text/javascript" src="/account/static/src/js/tax_group.js"></script> + + <script type="text/javascript" src="/account/static/src/js/bank_statement.js"></script> + <script type="text/javascript" src="/account/static/src/js/section_and_note_fields_backend.js"></script> + <script type="text/javascript" src="/account/static/src/js/tours/account.js"></script> + <script type="text/javascript" src="/account/static/src/js/bills_tree_upload.js"/> + <script type="text/javascript" src="/account/static/src/js/account_selection.js"/> + </xpath> + </template> + + <template id="assets_frontend" name="account assets" inherit_id="web.assets_frontend"> + <xpath expr="." position="inside"> + <script type="text/javascript" src="/account/static/src/js/account_portal_sidebar.js"></script> + </xpath> + </template> + + <template id="assets_tests" name="Account Assets Tests" inherit_id="web.assets_tests"> + <xpath expr="." position="inside"> + <script type="text/javascript" src="/account/static/tests/tours/account_dashboard_setup_bar_tests.js"></script> + <script type="text/javascript" src="/account/static/tests/tours/tax_group_tests.js"></script> + </xpath> + </template> + + <template id="qunit_suite" name="account tests" inherit_id="web.qunit_suite_tests"> + <xpath expr="//script[contains(@src, '/web/static/tests/views/kanban_tests.js')]" position="after"> + <script type="text/javascript" src="/account/static/tests/account_payment_field_tests.js"></script> + <script type="text/javascript" src="/account/static/tests/section_and_note_tests.js"></script> + </xpath> + </template> +</odoo> diff --git a/addons/account/views/account_account_tag_views.xml b/addons/account/views/account_account_tag_views.xml new file mode 100644 index 00000000..b5bb2307 --- /dev/null +++ b/addons/account/views/account_account_tag_views.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="account_tag_view_form" model="ir.ui.view"> + <field name="name">Tags</field> + <field name="model">account.account.tag</field> + <field name="arch" type="xml"> + <form string="Tags"> + <sheet> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <group> + <field name="active" invisible="1"/> + <field name="name"/> + <field name="applicability"/> + <field name="tax_negate" readonly="1" attrs="{'invisible': [('applicability', '!=', 'taxes')]}"/> + <field name="country_id" attrs="{'invisible': [('applicability', '!=', 'taxes')], 'readonly': [('tax_report_line_ids', '!=', [])]}"/> + <field name="tax_report_line_ids" readonly="1" attrs="{'invisible': [('applicability', '!=', 'taxes')]}"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="account_tag_view_tree" model="ir.ui.view"> + <field name="name">Tags</field> + <field name="model">account.account.tag</field> + <field name="arch" type="xml"> + <tree string="Tags"> + <field name="name"/> + <field name="applicability"/> + </tree> + </field> + </record> + + <record id="account_tag_view_search" model="ir.ui.view"> + <field name="name">account.tag.view.search</field> + <field name="model">account.account.tag</field> + <field name="arch" type="xml"> + <search> + <field name="name"/> + <separator/> + <filter name="archived" string="Archived" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_account_type_views.xml b/addons/account/views/account_account_type_views.xml new file mode 100644 index 00000000..286263b3 --- /dev/null +++ b/addons/account/views/account_account_type_views.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_account_type_search" model="ir.ui.view"> + <field name="name">account.account.type.search</field> + <field name="model">account.account.type</field> + <field name="arch" type="xml"> + <search string="Account Type"> + <field name="name" filter_domain="['|', ('name','ilike',self), ('type','ilike',self)]" string="Account Type"/> + </search> + </field> + </record> + + <record id="view_account_type_tree" model="ir.ui.view"> + <field name="name">account.account.type.tree</field> + <field name="model">account.account.type</field> + <field name="arch" type="xml"> + <tree string="Account Type"> + <field name="name"/> + <field name="type"/> + </tree> + </field> + </record> + + <record id="view_account_type_form" model="ir.ui.view"> + <field name="name">account.account.type.form</field> + <field name="model">account.account.type</field> + <field name="arch" type="xml"> + <form string="Account Type"> + <group> + <group> + <field name="name"/> + <field name="type"/> + </group> + <group> + <field name="include_initial_balance"/> + </group> + </group> + <separator string="Description"/> + <field name="note"/> + </form> + </field> + </record> + + <record id="action_account_type_form" model="ir.actions.act_window"> + <field name="name">Account Types</field> + <field name="res_model">account.account.type</field> + <field name="view_mode">tree,form</field> + <field name="search_view_id" ref="view_account_type_search"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Define a new account type + </p><p> + An account type is used to determine how an account is used in + each journal. The deferral method of an account type determines + the process for the annual closing. Reports such as the Balance + Sheet and the Profit and Loss report use the category + (profit/loss or balance sheet). + </p> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_account_views.xml b/addons/account/views/account_account_views.xml new file mode 100644 index 00000000..37a629ba --- /dev/null +++ b/addons/account/views/account_account_views.xml @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <record id="view_account_form" model="ir.ui.view"> + <field name="name">account.account.form</field> + <field name="model">account.account</field> + <field name="arch" type="xml"> + <form string="Account"> + <sheet> + <div class="oe_button_box" name="button_box"> + <button class="oe_stat_button" name="account.action_move_line_select" + string="Journal Items" type="action" icon="fa-bars"/> + </div> + <div class="oe_title"> + <h1 class= "oe_read_only"> + <field name="code" placeholder="code"/> - <field name="name" placeholder="name"/> + <field name="company_id" invisible="1"/> + </h1> + <div class="oe_inline oe_edit_only"> + <label for="code"/> + <field name="code" placeholder="code"/> + <label for="name"/> + <field name="name" placeholder="name"/> + </div> + </div> + <group> + <group name="left_main_group"> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + <field name="user_type_id" widget="account_hierarchy_selection"/> + <field name="group_id"/> + <field name="internal_type" invisible="1" readonly="1"/> + <field name="internal_group" invisible="1" readonly="1"/> + </group> + <group name="right_main_group"> + <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> + <field name="deprecated"/> + </group> + <group string="Account Options" name="options_group"> + <field name="tax_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" attrs="{'invisible': [('internal_group', '=', 'off_balance')]}"/> + <field name="tag_ids" widget="many2many_tags" domain="[('applicability', '!=', 'taxes')]" context="{'default_applicability': 'accounts'}" options="{'no_create_edit': True}"/> + </group> + <group string="Security" name="security_group"> + <field name="allowed_journal_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" options="{'no_create_edit': True}"/> + </group> + </group> + </sheet> + </form> + </field> + </record> + + <record id="view_account_list" model="ir.ui.view"> + <field name="name">account.account.list</field> + <field name="model">account.account</field> + <field name="arch" type="xml"> + <tree editable="top" create="1" delete="1" multi_edit="1" string="Chart of accounts"> + <field name="code"/> + <field name="name"/> + <field name="user_type_id" widget="account_hierarchy_selection"/> + <field name="group_id" optional="hide"/> + <field name="internal_type" invisible="1"/> + <field name="internal_group" invisible="1"/> + <field name="reconcile" widget="boolean_toggle" attrs="{'invisible': ['|', ('internal_type','=','liquidity'), ('internal_group', '=', 'off_balance')]}"/> + <field name="tax_ids" optional="hide" widget="many2many_tags"/> + <field name="tag_ids" optional="hide" widget="many2many_tags"/> + <field name="allowed_journal_ids" optional="hide" widget="many2many_tags"/> + <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + <button name="action_read_account" type="object" string="Setup" class="float-right btn-secondary"/> + </tree> + </field> + </record> + + <record id="view_account_account_kanban" model="ir.ui.view"> + <field name="name">account.account.kanban</field> + <field name="model">account.account</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile"> + <field name="name"/> + <field name="code"/> + <field name="user_type_id"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_global_click"> + <div class="row"> + <div class="col-6"> + <strong><field name="name"/></strong> + </div> + <div class="col-6 text-right"> + <span class="badge badge-pill"><t t-esc="record.code.value"/></span> + </div> + </div> + <div> + <strong>Type: </strong><t t-esc="record.user_type_id.value"/> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_account_search" model="ir.ui.view"> + <field name="name">account.account.search</field> + <field name="model">account.account</field> + <field name="arch" type="xml"> + <search string="Accounts"> + <field name="name" filter_domain="['|', ('name','ilike',self), ('code','=like',str(self)+'%')]" string="Account"/> + <filter string="Receivable Accounts" name="receivableacc" domain="[('internal_type','=','receivable')]"/> + <filter string="Payable Accounts" name="payableacc" domain="[('internal_type','=','payable')]"/> + <filter string="Equity" name="equityacc" domain="[('internal_group','=', 'equity')]"/> + <filter string="Assets" name="assetsacc" domain="[('internal_group','=', 'asset')]"/> + <filter string="Liability" name="liabilityacc" domain="[('internal_group','=', 'liability')]"/> + <filter string="Income" name="incomeacc" domain="[('internal_group','=', 'income')]"/> + <filter string="Expenses" name="expensesacc" domain="[('internal_group','=', 'expense')]"/> + <separator/> + <filter string="Account with Entries" name="used" domain="[('used', '=', True)]"/> + <filter string="Active Account" name="activeacc" domain="[('deprecated', '=', False)]"/> + <separator/> + <field name="user_type_id"/> + <group expand="0" string="Group By"> + <filter string="Account Type" name="accounttype" domain="" context="{'group_by':'user_type_id'}"/> + </group> + <searchpanel class="account_root"> + <field name="root_id" icon="fa-filter" limit="0"/> + </searchpanel> + </search> + </field> + </record> + + <record id="action_account_form" model="ir.actions.act_window"> + <field name="name">Chart of Accounts</field> + <field name="res_model">account.account</field> + <field name="view_mode">tree,kanban,form</field> + <field name="search_view_id" ref="view_account_search"/> + <field name="view_id" ref="view_account_list"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Add a new account + </p><p> + An account is part of a ledger allowing your company + to register all kinds of debit and credit transactions. + Companies present their annual accounts in two main parts: the + balance sheet and the income statement (profit and loss + account). The annual accounts of a company are required by law + to disclose a certain amount of information. + </p> + </field> + <field name="context">{'search_default_activeacc': True}</field> + </record> + + <record id="action_duplicate_account" model="ir.actions.server"> + <field name="name">Duplicate</field> + <field name="model_id" ref="model_account_account"/> + <field name="binding_model_id" ref="account.model_account_account"/> + <field name="binding_view_types">list</field> + <field name="state">code</field> + <field name="code"> + action = model.action_duplicate_accounts() + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_analytic_default_view.xml b/addons/account/views/account_analytic_default_view.xml new file mode 100644 index 00000000..379136cf --- /dev/null +++ b/addons/account/views/account_analytic_default_view.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="view_account_analytic_default_tree" model="ir.ui.view"> + <field name="name">account.analytic.default.tree</field> + <field name="model">account.analytic.default</field> + <field name="arch" type="xml"> + <tree string="Analytic Defaults"> + <field name="sequence" widget="handle"/> + <field name="analytic_id" required="0" groups="analytic.group_analytic_accounting"/> + <field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/> + <field name="product_id"/> + <field name="partner_id"/> + <field name="user_id"/> + <field name="account_id"/> + <field name="date_start"/> + <field name="date_stop"/> + <field name="company_id" groups="base.group_multi_company"/> + </tree> + </field> + </record> + + <record id="view_account_analytic_default_form" model="ir.ui.view"> + <field name="name">account.analytic.default.form</field> + <field name="model">account.analytic.default</field> + <field name="arch" type="xml"> + <form string="Analytic Defaults"> + <sheet> + <group col="4"> + <separator string="Analytic Default Rule" colspan="4"/> + <field name="analytic_id" groups="analytic.group_analytic_accounting" string="Account"/> + <field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags" string="Tags"/> + <separator string="Conditions" colspan="4"/> + <field name="product_id"/> + <field name="partner_id"/> + <field name="user_id"/> + <field name="account_id"/> + <field name="date_start"/> + <field name="date_stop"/> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="view_account_analytic_default_kanban" model="ir.ui.view"> + <field name="name">account.analytic.default.kanban</field> + <field name="model">account.analytic.default</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile"> + <field name="analytic_id"/> + <field name="date_start"/> + <field name="date_stop"/> + <field name="product_id"/> + <field name="partner_id"/> + <field name="user_id"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_card oe_kanban_global_click"> + <div> + <strong><span><field name="analytic_id"/></span></strong> + </div> + <div t-if="record.date_start.value"><i class="fa fa-calendar"></i> From <field name="date_start"/> <t t-if="record.date_stop.value">to <field name="date_stop"/></t></div> + <div t-if="record.product_id.value"><strong>Product</strong> <field name="product_id"/> </div> + <div t-if="record.partner_id.value"><strong>Customer</strong> <field name="partner_id"/> </div> + <div class="float-right"> + <field name="user_id" widget="many2one_avatar_user"/> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_account_analytic_default_form_search" model="ir.ui.view"> + <field name="name">account.analytic.default.search</field> + <field name="model">account.analytic.default</field> + <field name="arch" type="xml"> + <search string="Accounts"> + <field name="date_stop"/> + <field name="analytic_id" groups="analytic.group_analytic_accounting"/> + <field name="product_id"/> + <field name="partner_id"/> + <field name="user_id"/> + <field name="company_id" groups="base.group_multi_company"/> + <group expand="0" string="Group By"> + <filter string="User" name="user" context="{'group_by':'user_id'}" help="User"/> + <filter string="Partner" name="partner" context="{'group_by':'partner_id'}" help="Partner"/> + <filter string="Product" name="product" context="{'group_by':'product_id'}" help="Product" /> + <filter string="Analytic Account" name="analyticacc" context="{'group_by':'analytic_id'}" help="Analytic Account" groups="analytic.group_analytic_accounting"/> + <filter string="Company" name="company" context="{'group_by':'company_id'}" groups="base.group_multi_company" /> + </group> + </search> + </field> + </record> + + <record id="action_analytic_default_list" model="ir.actions.act_window"> + <field name="name">Analytic Defaults Rules</field> + <field name="res_model">account.analytic.default</field> + <field name="view_mode">tree,kanban,form</field> + <field name="search_view_id" ref="view_account_analytic_default_form_search"/> + <field name="context">{"search_default_current":1}</field> + </record> + + + <menuitem id="menu_analytic_default_list" + action="action_analytic_default_list" + parent="account.menu_analytic_accounting"/> + + <record id="analytic_rule_action_user" model="ir.actions.act_window"> + <field name="name">Analytic Rules</field> + <field name="res_model">account.analytic.default</field> + <field name="context">{'search_default_user_id': [active_id], 'default_user_id': active_id}</field> + <field name="binding_model_id" ref="base.model_res_users"/> + <field name="binding_view_types">form</field> + <field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/> + </record> +</odoo> diff --git a/addons/account/views/account_analytic_view.xml b/addons/account/views/account_analytic_view.xml new file mode 100644 index 00000000..0488534d --- /dev/null +++ b/addons/account/views/account_analytic_view.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <record id="view_account_analytic_line_form_inherit_account" model="ir.ui.view"> + <field name="name">account.analytic.line.form.inherit.account</field> + <field name="model">account.analytic.line</field> + <field name="inherit_id" ref="analytic.view_account_analytic_line_form"/> + <field name="arch" type="xml"> + <data> + <xpath expr="//field[@name='tag_ids']" position="after"> + <field name="ref"/> + <field name="partner_id"/> + </xpath> + <xpath expr="//field[@name='product_uom_id']" position="before"> + <field name="product_id"/> + </xpath> + <group name="amount" position="after"> + <group/> <!-- put Accounting group under Amount group --> + <group name="accounting" string="Accounting"> + <field name="general_account_id" options="{'no_create': True}"/> + <field name="move_id" options="{'no_create': True}"/> + </group> + </group> + </data> + </field> + </record> + <record id="view_account_analytic_line_tree_inherit_account" model="ir.ui.view"> + <field name="name">account.analytic.line.tree.inherit.account</field> + <field name="model">account.analytic.line</field> + <field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/> + <field name="arch" type="xml"> + <data> + <xpath expr="//field[@name='account_id']" position="after"> + <field name="ref" invisible="context.get('to_invoice', False)" optional="hide"/> + <field name="general_account_id" optional="hide"/> + <field name="move_id" optional="hide"/> + <field name="product_id" optional="hide"/> + </xpath> + </data> + </field> + </record> + <record id="view_account_analytic_line_filter_inherit_account" model="ir.ui.view"> + <field name="name">account.analytic.line.select.inherit.account</field> + <field name="model">account.analytic.line</field> + <field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/> + <field name="arch" type="xml"> + <data> + <xpath expr="//field[@name='date']" position="after"> + <field name="product_id"/> + <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/> + </xpath> + <xpath expr="//group[@name='groupby']" position="after"> + <filter string="Financial Account" name="financialaccount" context="{'group_by':'general_account_id'}"/> + <filter string="Product" name="product" context="{'group_by':'product_id'}"/> + <filter string="Partner" name="partner" context="{'group_by':'partner_id'}"/> + </xpath> + </data> + </field> + </record> + + <record id="view_account_analytic_line_pivot" model="ir.ui.view"> + <field name="name">account.analytic.line.pivot</field> + <field name="model">account.analytic.line</field> + <field name="inherit_id" ref="analytic.view_account_analytic_line_pivot"/> + <field name="arch" type="xml"> + <field name="account_id" position="after"> + <field name="partner_id" type="row"/> + </field> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_bank_statement_views.xml b/addons/account/views/account_bank_statement_views.xml new file mode 100644 index 00000000..7b02f726 --- /dev/null +++ b/addons/account/views/account_bank_statement_views.xml @@ -0,0 +1,425 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_account_bnk_stmt_cashbox" model="ir.ui.view"> + <field name="name">account.bnk_stmt_cashbox.form</field> + <field name="model">account.bank.statement.cashbox</field> + <field name="arch" type="xml"> + <form> + <sheet> + <field name="start_bank_stmt_ids" invisible="1"/> + <field name="end_bank_stmt_ids" invisible="1"/> + <field name="currency_id" invisible="1"/> + <field name="cashbox_lines_ids" nolabel="1" context="{'default_currency_id': currency_id}"> + <tree editable="bottom"> + <field name="currency_id" invisible="1"/> + <field name="number"/> + <field name="coin_value" widget="monetary" options="{'currency_field': 'currency_id'}"/> + <field name="subtotal" widget="monetary" options="{'currency_field': 'currency_id'}"/> + </tree> + </field> + <div> + <group> + <group class="oe_subtotal_footer oe_right" cols="6"> + <field name="currency_id" invisible="1" /> + <div class="o_td_label"></div> + <field name="total" widget="monetary" options="{'currency_field': 'currency_id'}"/> + </group> + </group> + </div> + </sheet> + </form> + </field> + </record> + + <record id="view_account_bnk_stmt_cashbox_footer" model="ir.ui.view"> + <field name="name">account.bnk_stmt_cashbox.form</field> + <field name="model">account.bank.statement.cashbox</field> + <field name="priority">1000</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="view_account_bnk_stmt_cashbox"/> + <field name="arch" type="xml"> + <xpath expr="//sheet" position="after"> + <footer> + <button string="Confirm" class="btn-primary" special="save"/> + <button string="Cancel" class="btn-secondary" special="cancel"/> + </footer> + </xpath> + </field> + </record> + + <record id="view_account_bnk_stmt_check" model="ir.ui.view"> + <field name="name">account.bnk_stmt_check.form</field> + <field name="model">account.bank.statement.closebalance</field> + <field name="arch" type="xml"> + <form> + <div> + <p>The closing balance is different than the computed one!</p> + <p>Confirming this will create automatically a journal entry with the difference in the profit/loss account set on the cash journal.</p> + <footer> + <button string="Confirm" name="validate" type="object" class="btn-primary"/> + <button string="Cancel" class="btn-secondary" special="cancel"/> + </footer> + </div> + </form> + </field> + </record> + + <record id="action_view_account_bnk_stmt_check" model="ir.actions.act_window"> + <field name="name">Check Closing Balance</field> + <field name="res_model">account.bank.statement.closebalance</field> + <field name="view_mode">tree,form</field> + <field name="view_id" ref="view_account_bnk_stmt_check"/> + <field name="target">new</field> + </record> + + <record id="view_bank_statement_tree" model="ir.ui.view"> + <field name="name">account.bank.statement.tree</field> + <field name="model">account.bank.statement</field> + <field name="arch" type="xml"> + <tree decoration-danger="not is_difference_zero" decoration-info="state=='open' and is_difference_zero" string="Statements"> + <field name="name"/> + <field name="date"/> + <field name="journal_id"/> + <field name="company_id" groups="base.group_multi_company"/> + <field name="balance_start"/> + <field name="balance_end_real"/> + <field name="balance_end" invisible="1"/> + <field name="currency_id" invisible="1"/> + <field name="state"/> + <field name="is_difference_zero" invisible="1"/> + </tree> + </field> + </record> + + <record id="view_bank_statement_search" model="ir.ui.view"> + <field name="name">account.bank.statement.search</field> + <field name="model">account.bank.statement</field> + <field name="arch" type="xml"> + <search string="Search Bank Statements"> + <field name="name" string="Bank Statement"/> + <field name="date"/> + <filter string="New" name="draft" domain="[('state','=','open')]"/> + <filter string="Processing" name="processing" domain="[('state','=','posted')]"/> + <filter string="Validated" name="confirmed" domain="[('state','=','confirm')]"/> + <separator/> + <filter name="filter_date" date="date"/> + <field name="journal_id" domain="[('type', 'in', ('bank', 'cash'))]" /> + <group expand="0" string="Group By"> + <filter string="Journal" name="journal" context="{'group_by': 'journal_id'}"/> + <filter string="Status" name="status" context="{'group_by': 'state'}"/> + <filter string="Date" name="date" context="{'group_by': 'date'}"/> + </group> + </search> + </field> + </record> + + <record id="view_bank_statement_form" model="ir.ui.view"> + <field name="name">account.bank.statement.form</field> + <field name="model">account.bank.statement</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <form string="Bank Statement"> + <header> + <button string="Post" states="open" class="oe_highlight" + name="button_post" type="object"/> + <button string="Validate" class="oe_highlight" + name="button_validate_or_action" type="object" + attrs="{'invisible':['|', '|', ('all_lines_reconciled', '=', False), ('line_ids','=',[]), ('state', '!=', 'posted')]}"/> + <button string="Reset to New" + name="button_reopen" type="object" + attrs="{'invisible': [('state', '!=', 'posted')]}"/> + <button string="Reset to Processing" + name="button_reprocess" type="object" + attrs="{'invisible': [('state', '!=', 'confirm')]}"/> + <button name="%(action_cash_box_out)d" string="Take Money In/Out" type="action" class="oe_highlight" attrs="{'invisible': [('journal_type','!=','cash')]}"/> + <field name="state" widget="statusbar" statusbar_visible="open,posted,confirm"/> + </header> + <div class="alert alert-warning" role="alert" attrs="{'invisible': ['|', ('previous_statement_id', '=', False), ('is_valid_balance_start', '=', True)]}"> + The starting balance <b>doesn't match</b> with the ending balance of the previous bank statement. + </div> + <sheet> + <!-- Invisible fields --> + <field name="all_lines_reconciled" invisible="1" /> + <field name="move_line_count" invisible="1"/> + <field name="country_code" invisible="1"/> + + <div class="oe_button_box" name="button_box"> + <button class="oe_stat_button" name="button_journal_entries" + string="Journal Entries" type="object" + attrs="{'invisible':[('move_line_count','=', 0)]}" icon="fa-bars"/> + </div> + + <div class="oe_title oe_inline"> + <label for="name" class="oe_edit_only"/> + <h1><field name="name"/></h1> + </div> + <group> + <group> + <field name="previous_statement_id" invisible="1"/> + <field name="is_valid_balance_start" invisible="1"/> + <field name="journal_type" invisible="1"/> + <field name="cashbox_start_id" invisible="1"/> + <field name="cashbox_end_id" invisible="1"/> + <field name="journal_id" domain="[('type', '=', journal_type)]" attrs="{'readonly': [('move_line_count','!=', 0)]}" widget="selection"/> + <field name="date" + attrs="{'readonly': [('state', '!=', 'open')]}" + options="{'datepicker': {'warn_future': true}}"/> + <field name='company_id' options="{'no_create': True}" groups="base.group_multi_company" /> + <field name="currency_id" invisible="1"/> + </group><group> + <label for="balance_start"/> + <div> + <field name="balance_start" class="oe_inline" attrs="{'readonly': [('state', '=', 'confirm')]}"/> + <button name="open_cashbox_id" attrs="{'invisible': ['|',('state','!=','open'),('journal_type','!=','cash')]}" string="→ Count" type="object" class="oe_edit_only oe_link oe_inline" context="{'balance':'start'}"/> + </div> + <label for="balance_end_real"/> + <div> + <field name="balance_end_real" class="oe_inline" attrs="{'readonly': [('state', '=', 'confirm')]}"/> + <button name="open_cashbox_id" attrs="{'invisible': ['|',('state','!=','open'),('journal_type','!=','cash')]}" string="→ Count" type="object" class="oe_edit_only oe_link oe_inline" context="{'balance':'close'}"/> + </div> + </group> + </group> + + <notebook> + <page string="Transactions" name="statement_line_ids"> + <field name="line_ids" + attrs="{'readonly': [('state', '!=', 'open')]}" + context="{'default_date': date, 'default_journal_id': journal_id}"> + <tree string="Statement lines" + editable="bottom" + decoration-muted="is_reconciled" + limit="500"> + + <!-- Invisible fields --> + <field name="company_id" invisible="1"/> + <field name="state" invisible="1"/> + <field name="is_reconciled" invisible="1"/> + <field name="currency_id" invisible="1"/> + <field name="partner_bank_id" invisible="1"/> + <field name="country_code" invisible="1"/> + + <!-- Visible fields --> + <field name="sequence" widget="handle"/> + <field name="date" + attrs="{'readonly': [('parent.state', '!=', 'open')]}"/> + <field name="payment_ref"/> + <field name="partner_id" + attrs="{'readonly': [('parent.state', '!=', 'open')]}" + domain="['|', ('parent_id','=', False), ('is_company','=',True)]"/> + <field name="ref" optional="hidden"/> + <field name="transaction_type" optional="hidden"/> + <field name="narration" string="Notes" optional="hidden"/> + <field name="amount" + attrs="{'readonly': [('parent.state', '!=', 'open')]}"/> + <field name="amount_currency" optional="hidden" groups="base.group_multi_currency" + attrs="{'readonly': [('parent.state', '!=', 'open')]}"/> + <field name="account_number" optional="hidden"/> + <field name="foreign_currency_id" optional="hidden" groups="base.group_multi_currency" + attrs="{'readonly': [('parent.state', '!=', 'open')]}"/> + + <!-- Buttons --> + <button name="button_undo_reconciliation" type="object" + attrs="{'invisible': [('is_reconciled', '=', False)], 'column_invisible': [('parent.state', '!=', 'posted')]}" + string="Revert reconciliation" icon="fa-undo"/> + </tree> + </field> + </page> + </notebook> + <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total"> + <div class="oe_subtotal_footer_separator oe_inline"> + <label for="balance_end" /> + </div> + <field name="balance_end" nolabel="1" class="oe_subtotal_footer_separator"/> + </group> + <div class="oe_clear"/> + </sheet> + <div class="o_attachment_preview"/> + <div class="oe_chatter"> + <field name="message_follower_ids"/> + <field name="message_ids"/> + </div> + </form> + </field> + </record> + + <record id="action_bank_statement_tree" model="ir.actions.act_window"> + <field name="name">Bank Statements</field> + <field name="res_model">account.bank.statement</field> + <field name="view_mode">tree,form,pivot,graph</field> + <field name="domain">[('journal_id.type', '=', 'bank')]</field> + <field name="context">{'journal_type':'bank'}</field> + <field name="search_view_id" ref="view_bank_statement_search"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Register a bank statement + </p><p> + A bank statement is a summary of all financial transactions + occurring over a given period of time on a bank account. You + should receive this periodicaly from your bank. + </p><p> + Odoo allows you to reconcile a statement line directly with + the related sale or purchase invoices. + </p> + </field> + </record> + <record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank"> + <field name="sequence" eval="1"/> + <field name="view_mode">tree</field> + <field name="view_id" ref="view_bank_statement_tree"/> + <field name="act_window_id" ref="action_bank_statement_tree"/> + </record> + <record model="ir.actions.act_window.view" id="action_bank_statement_form_bank"> + <field name="sequence" eval="2"/> + <field name="view_mode">form</field> + <field name="view_id" ref="view_bank_statement_form"/> + <field name="act_window_id" ref="action_bank_statement_tree"/> + </record> + + <record id="view_bank_statement_line_search" model="ir.ui.view"> + <field name="name">account.bank.statement.line.search</field> + <field name="model">account.bank.statement.line</field> + <field name="arch" type="xml"> + <search string="Search Bank Statements Line"> + <field name="payment_ref"/> + <field name="statement_id"/> + <field name="partner_id"/> + <field name="date"/> + <field name="journal_id" domain="[('type', 'in', ('bank', 'cash'))]" /> + <field name="narration" string="Notes"/> + <field name="transaction_type"/> + </search> + </field> + </record> + + <record id="view_bank_statement_line_form" model="ir.ui.view"> + <field name="name">bank.statement.line.form</field> + <field name="model">account.bank.statement.line</field> + <field name="priority">8</field> + <field name="arch" type="xml"> + <form string="Statement Line" create="false"> + <sheet> + <group col="4"> + <!-- Invisible fields --> + <field name="state" invisible="1"/> + <field name="company_id" invisible="1"/> + + <!-- Displayed fields --> + <field name="statement_id"/> + <field name="date"/> + <field name="payment_ref"/> + <field name="ref"/> + <field name="partner_id"/> + <field name="amount"/> + <field name="sequence"/> + <field name="narration" string="Notes"/> + <field name="transaction_type"/> + <field name="move_id"/> + </group> + </sheet> + </form> + </field> + </record> + <record id="view_bank_statement_line_tree" model="ir.ui.view"> + <field name="name">account.bank.statement.line.tree</field> + <field name="model">account.bank.statement.line</field> + <field name="priority">8</field> + <field name="arch" type="xml"> + <tree string="Statement lines" create="false" default_order="date desc, statement_id desc, sequence desc, id desc"> + <!-- Invisible fields --> + <field name="state" invisible="1"/> + <field name="sequence" readonly="1" invisible="1"/> + <field name="company_id" invisible="1"/> + <field name="journal_id" invisible="1" /> + <field name="is_reconciled" invisible="1"/> + <field name="partner_bank_id" invisible="1"/> + <field name="currency_id" invisible="1"/> + + <!-- Displayed fields --> + <field name="statement_id" optional="hide"/> + <field name="move_id"/> + <field name="date"/> + <field name="payment_ref"/> + <field name="ref" groups="base.group_no_one"/> + <field name="partner_id"/> + <field name="amount"/> + <field name="amount_currency" optional="hidden" groups="base.group_multi_currency"/> + <field name="foreign_currency_id" optional="hidden" groups="base.group_multi_currency"/> + <field name="account_number" optional="hidden"/> + <field name="transaction_type" optional="hidden"/> + <field name="narration" optional="hidden"/> + + <!-- Buttons --> + <button name="button_undo_reconciliation" type="object" + attrs="{'invisible': [('is_reconciled', '=', False)]}" + string="Revert reconciliation" icon="fa-undo"/> + </tree> + </field> + </record> + + <record id="action_bank_statement_line" model="ir.actions.act_window"> + <field name="name">Bank Statement Lines</field> + <field name="res_model">account.bank.statement.line</field> + <field name="view_mode">tree,form</field> + <field name="domain">[]</field> + <field name="context">{}</field> + <field name="search_view_id" ref="view_bank_statement_line_search"/> + <field name="help" type="html"> + <p class="o_view_nocontent_empty_folder"> + A bank statement line is a financial transaction on a bank account + </p><p> + Odoo allows you to reconcile a statement line directly with + the related sale or purchase invoice(s). + </p> + </field> + </record> + + <record id="account_bank_statement_pivot" model="ir.ui.view"> + <field name="name">account.bank.statement.pivot</field> + <field name="model">account.bank.statement</field> + <field name="arch" type="xml"> + <pivot string="Account Statistics" sample="1"> + <field name="date" type="row"/> + <field name="balance_start" type="measure"/> + <field name="balance_end" type="measure"/> + </pivot> + </field> + </record> + + <record id="account_bank_statement_graph" model="ir.ui.view"> + <field name="name">account.bank.statement.graph</field> + <field name="model">account.bank.statement</field> + <field name="arch" type="xml"> + <graph string="Account Statistics" type="bar" sample="1"> + <field name="date"/> + <field name="balance_start" operator="+"/> + <field name="balance_end" operator="+"/> + </graph> + </field> + </record> + + <record id="action_view_bank_statement_tree" model="ir.actions.act_window"> + <field name="name">Cash Registers</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">account.bank.statement</field> + <field name="view_mode">tree,form,pivot,graph</field> + <field name="view_id" ref="view_bank_statement_tree"/> + <field name="search_view_id" ref="view_bank_statement_search"/> + <field name="domain">[('journal_id.type', '=', 'cash')]</field> + <field name="context">{'journal_type':'cash'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new cash log + </p><p> + A Cash Register allows you to manage cash entries in your cash + journals. This feature provides an easy way to follow up cash + payments on a daily basis. You can enter the coins that are in + your cash box, and then post entries when money comes in or + goes out of the cash box. + </p> + </field> + </record> + + </data> +</odoo> 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> diff --git a/addons/account/views/account_chart_template_views.xml b/addons/account/views/account_chart_template_views.xml new file mode 100644 index 00000000..f42f53ec --- /dev/null +++ b/addons/account/views/account_chart_template_views.xml @@ -0,0 +1,278 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <!-- Chart of Accounts Templates --> + + <record id="view_account_chart_template_form" model="ir.ui.view"> + <field name="name">account.chart.template.form</field> + <field name="model">account.chart.template</field> + <field name="arch" type="xml"> + <form string="Chart of Accounts Template"> + <group col="4"> + <field name="name"/> + <field name="parent_id" /> + <field name="bank_account_code_prefix"/> + <field name="cash_account_code_prefix"/> + <field name="transfer_account_code_prefix"/> + <field name="code_digits" /> + <field name="visible" /> + <field name="complete_tax_set" /> + </group> + <separator string="Default Taxes" colspan="4"/> + <field name="tax_template_ids" colspan="4" nolabel="1"/> + <separator string="Properties" colspan="4"/> + <group col="4"> + <field name="property_account_receivable_id"/> + <field name="property_account_payable_id"/> + <field name="property_account_expense_categ_id"/> + <field name="property_account_income_categ_id"/> + <field name="property_account_expense_id"/> + <field name="property_account_income_id"/> + </group> + </form> + </field> + </record> + + <record id="view_account_chart_template_seacrh" model="ir.ui.view"> + <field name="name">account.chart.template.search</field> + <field name="model">account.chart.template</field> + <field name="arch" type="xml"> + <search string="Search Chart of Account Templates"> + <field name="name" string="Account Template"/> + <field name="bank_account_code_prefix"/> + <field name="cash_account_code_prefix"/> + <field name="transfer_account_code_prefix"/> + <group expand="0" string="Group By"> + <filter string="Receivable Account" name="receivalbeacc" domain="[]" context="{'group_by':'property_account_receivable_id'}"/> + <filter string="Payable Account" name="payableacc" domain="[]" context="{'group_by':'property_account_payable_id'}"/> + <filter string="Income Account" name="incomeacc" domain="[]" context="{'group_by':'property_account_income_categ_id'}"/> + <filter string="Expense Account" name="expenseacc" domain="[]" context="{'group_by':'property_account_expense_categ_id'}"/> + </group> + </search> + </field> + </record> + + <record id="view_account_chart_template_tree" model="ir.ui.view"> + <field name="name">account.chart.template.tree</field> + <field name="model">account.chart.template</field> + <field name="arch" type="xml"> + <tree string="Chart of Accounts Template"> + <field name="name"/> + <field name="property_account_receivable_id" invisible="1"/> + <field name="property_account_payable_id" invisible="1"/> + <field name="property_account_expense_categ_id" invisible="1"/> + <field name="property_account_income_categ_id" invisible="1"/> + </tree> + </field> + </record> + <record id="action_account_chart_template_form" model="ir.actions.act_window"> + <field name="name">Chart of Accounts Templates</field> + <field name="res_model">account.chart.template</field> + <field name="view_mode">tree,form</field> + </record> + + + <!-- Account Templates --> + + <record id="view_account_template_form" model="ir.ui.view"> + <field name="name">account.account.template.form</field> + <field name="model">account.account.template</field> + <field name="arch" type="xml"> + <form string="Account Template"> + <group col="4"> + <field name="name"/> + <field name="code"/> + <newline/> + <field name="user_type_id" widget="account_hierarchy_selection"/> + <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> + <field name="tag_ids" domain="[('applicability', '!=', 'taxes')]" widget="many2many_tags" context="{'default_applicability': 'accounts'}"/> + <field name="reconcile"/> + <field name="chart_template_id"/> + </group> + <separator string="Default Taxes"/> + <field name="tax_ids"/> + <separator string="Notes"/> + <field name="note" placeholder="Internal notes..."/> + </form> + </field> + </record> + + <record id="view_account_template_tree" model="ir.ui.view"> + <field name="name">account.account.template.tree</field> + <field name="model">account.account.template</field> + <field name="arch" type="xml"> + <tree string="Account Template"> + <field name="code"/> + <field name="name"/> + <field name="user_type_id" widget="account_hierarchy_selection" invisible="1"/> + </tree> + </field> + </record> + + <record id="view_account_template_search" model="ir.ui.view"> + <field name="name">account.account.template.search</field> + <field name="model">account.account.template</field> + <field name="arch" type="xml"> + <search string="Search Account Templates"> + <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/> + <field name="user_type_id"/> + <group expand="0" string="Group By"> + <filter string="Account Type" name="accounttype" domain="[]" context="{'group_by':'user_type_id'}"/> + </group> + </search> + </field> + </record> + + <!-- Account Tax Templates --> + + <record id="view_account_tax_template_form" model="ir.ui.view"> + <field name="name">account.tax.template.form</field> + <field name="model">account.tax.template</field> + <field name="arch" type="xml"> + <form string="Account Tax Template"> + <sheet> + <group name="main_group"> + <group> + <field name="name"/> + </group> + <group> + <field name="type_tax_use"/> + </group> + </group> + <notebook> + <page name="definition" string="Definition"> + <group name="tax_definitions"> + <group> + <field name="amount_type" /> + <label for="amount" attrs="{'invisible':[('amount_type','=', 'group')]}"/> + <div attrs="{'invisible':[('amount_type','=', 'group')]}"> + <field name="amount" class="oe_inline" /> + <span class="o_form_label oe_inline" attrs="{'invisible':[('amount_type','=','fixed')]}">%</span> + </div> + </group> + </group> + <field name="children_tax_ids" + attrs="{'invisible':['|', ('amount_type','!=','group'), ('type_tax_use','=','none')]}" + domain="[('type_tax_use','in',('none',type_tax_use)), ('amount_type','!=','group')]"> + <tree string="Children Taxes"> + <field name="sequence" widget="handle" /> + <field name="name"/> + <field name="amount_type" /> + <field name="amount" /> + </tree> + </field> + </page> + <page name="advanced_options" string="Advanced Options"> + <group name="advanced_definitions"> + <group> + <field name="description" attrs="{'invisible':[('amount_type','=', 'group')]}"/> + <field name="analytic" attrs="{'invisible':[('amount_type','=', 'group')]}" groups="analytic.group_analytic_accounting" /> + </group> + <group name="price_definitions"> + <field name="price_include" attrs="{'invisible':[('amount_type','=', 'group')]}" /> + <field name="include_base_amount" attrs="{'invisible':[('amount_type','=', 'group')]}" /> + </group> + <group name="tax_configuration"> + <field name="active" groups="base.group_no_one"/> + <field name="tax_exigibility" widget="radio" attrs="{'invisible':[('amount_type','=', 'group')]}"/> + <field name="cash_basis_transition_account_id" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}"/> + </group> + </group> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + + <record id="view_account_tax_template_tree" model="ir.ui.view"> + <field name="name">account.tax.template.tree</field> + <field name="model">account.tax.template</field> + <field name="arch" type="xml"> + <tree string="Account Tax Template"> + <field name="name"/> + <field name="description"/> + </tree> + </field> + </record> + + <record id="view_account_tax_template_search" model="ir.ui.view"> + <field name="name">account.tax.template.search</field> + <field name="model">account.tax.template</field> + <field name="arch" type="xml"> + <search string="Search Tax Templates"> + <field name="name" filter_domain="['|', ('name', 'ilike', self), ('description', 'ilike', self)]" string="Tax Template"/> + <field name="chart_template_id"/> + <filter string="Sale" name="sale" domain="[('type_tax_use', '=', 'sale')]" help="Taxes used in Sales"/> + <filter string="Purchase" name="purchase" domain="[('type_tax_use', '=', 'purchase')]" help="Taxes used in Purchases"/> + <separator/> + <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + <record id="action_account_tax_template_form" model="ir.actions.act_window"> + <field name="name">Tax Templates</field> + <field name="res_model">account.tax.template</field> + <field name="view_mode">tree,form</field> + <field name="search_view_id" ref="view_account_tax_template_search"/> + </record> + + <!-- Fiscal Position Templates --> + + <record id="view_account_position_template_search" model="ir.ui.view"> + <field name="name">account.fiscal.position.template.search</field> + <field name="model">account.fiscal.position.template</field> + <field name="arch" type="xml"> + <search string="Fiscal Position"> + <field name="name" string="Fiscal Position Template"/> + </search> + </field> + </record> + + <record id="view_account_position_template_form" model="ir.ui.view"> + <field name="name">account.fiscal.position.template.form</field> + <field name="model">account.fiscal.position.template</field> + <field name="arch" type="xml"> + <form string="Fiscal Position Template"> + <group col="4"> + <field name="name"/> + <field name="chart_template_id"/> + </group> + <field name="tax_ids"> + <tree string="Taxes Mapping" editable="bottom"> + <field name="tax_src_id" domain="[('type_tax_use', '!=', None)]"/> + <field name="tax_dest_id" domain="[('type_tax_use', '!=', None)]"/> + </tree> + <form string="Taxes Mapping"> + <field name="tax_src_id" domain="[('type_tax_use', '!=', None)]"/> + <field name="tax_dest_id" domain="[('type_tax_use', '!=', None)]"/> + </form> + </field> + <field name="account_ids"> + <tree string="Accounts Mapping" editable="bottom"> + <field name="account_src_id"/> + <field name="account_dest_id"/> + </tree> + <form string="Accounts Mapping"> + <field name="account_src_id"/> + <field name="account_dest_id"/> + </form> + </field> + </form> + </field> + </record> + + <record id="view_account_position_template_tree" model="ir.ui.view"> + <field name="name">account.fiscal.position.template.tree</field> + <field name="model">account.fiscal.position.template</field> + <field name="arch" type="xml"> + <tree string="Fiscal Position"> + <field name="name"/> + </tree> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_dashboard_setup_bar.xml b/addons/account/views/account_dashboard_setup_bar.xml new file mode 100644 index 00000000..c6a1c2ed --- /dev/null +++ b/addons/account/views/account_dashboard_setup_bar.xml @@ -0,0 +1,12 @@ +<odoo> + <record id="account_journal_dashboard_kanban_view_js" model="ir.ui.view"> + <field name="name">account.journal.dashboard.kanban.js</field> + <field name="model">account.journal</field> + <field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/> + <field name="arch" type="xml"> + <xpath expr="//kanban" position="attributes"> + <attribute name="js_class">account_setup_bar</attribute> + </xpath> + </field> + </record> +</odoo>
\ No newline at end of file diff --git a/addons/account/views/account_full_reconcile_views.xml b/addons/account/views/account_full_reconcile_views.xml new file mode 100644 index 00000000..d96c8335 --- /dev/null +++ b/addons/account/views/account_full_reconcile_views.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_full_reconcile_form" model="ir.ui.view"> + <field name="name">account.full.reconcile.form</field> + <field name="model">account.full.reconcile</field> + <field name="arch" type="xml"> + <form string="Matching"> + <group> + <div class="oe_title" colspan="4"> + <h1><field name="name" readonly="1"/></h1> + </div> + <separator string="Matched Journal Items" colspan="4"/> + <field name="reconciled_line_ids" readonly="1" colspan="4" nolabel="1"/> + </group> + </form> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_group_views.xml b/addons/account/views/account_group_views.xml new file mode 100644 index 00000000..b2e9f04a --- /dev/null +++ b/addons/account/views/account_group_views.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_account_group_form" model="ir.ui.view"> + <field name="name">account.group.form</field> + <field name="model">account.group</field> + <field name="arch" type="xml"> + <form string="Account Group"> + <sheet> + <group> + <field name="name"/> + <label for="code_prefix_start" string="Code Prefix"/> + <div> + From <field name="code_prefix_start" class="oe_inline"/> to <field name="code_prefix_end" class="oe_inline"/> + </div> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="view_account_group_search" model="ir.ui.view"> + <field name="name">account.group.search</field> + <field name="model">account.group</field> + <field name="arch" type="xml"> + <search string="Account groups"> + <field name="name" + filter_domain="['|', ('code_prefix_start', '=like', str(self) + '%'), ('name', 'ilike', self)]" + string="Account group"/> + </search> + </field> + </record> + + <record id="view_account_group_tree" model="ir.ui.view"> + <field name="name">account.group.tree</field> + <field name="model">account.group</field> + <field name="arch" type="xml"> + <tree string="Account Group"> + <field name="code_prefix_start"/> + <field name="code_prefix_end"/> + <field name="name"/> + <field name="company_id" groups="base.group_multi_company"/> + </tree> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_incoterms_view.xml b/addons/account/views/account_incoterms_view.xml new file mode 100644 index 00000000..9e33bae5 --- /dev/null +++ b/addons/account/views/account_incoterms_view.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <!-- account incoterms --> + <record id="view_incoterms_tree" model="ir.ui.view"> + <field name="name">account.incoterms.tree</field> + <field name="model">account.incoterms</field> + <field name="arch" type="xml"> + <tree string="Incoterms" editable="bottom"> + <field name="active" invisible="1"/> + <field name="code"/> + <field colspan="4" name="name"/> + </tree> + </field> + </record> + + <record id="account_incoterms_form" model="ir.ui.view"> + <field name="name">account.incoterms.form</field> + <field name="model">account.incoterms</field> + <field name="arch" type="xml"> + <form string="Incoterms"> + <sheet> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <group> + <field name="active" invisible="1"/> + <field name="name"/> + <field name="code"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="account_incoterms_view_search" model="ir.ui.view"> + <field name="name">account.incoterms.search</field> + <field name="model">account.incoterms</field> + <field name="arch" type="xml"> + <search string="Incoterms"> + <field name="name"/> + <separator/> + <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + <record id="action_incoterms_tree" model="ir.actions.act_window"> + <field name="name">Incoterms</field> + <field name="res_model">account.incoterms</field> + <field name="type">ir.actions.act_window</field> + <field name="view_mode">tree,form</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new incoterm + </p><p> + Incoterms are used to divide transaction costs and responsibilities between buyer and seller. + </p> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml new file mode 100644 index 00000000..347a36c2 --- /dev/null +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -0,0 +1,373 @@ +<odoo> + <record id="account_journal_dashboard_kanban_view" model="ir.ui.view"> + <field name="name">account.journal.dashboard.kanban</field> + <field name="model">account.journal</field> + <field name="arch" type="xml"> + <kanban create="false" class="oe_background_grey o_kanban_dashboard o_account_kanban" banner_route="/account/account_dashboard_onboarding" js_class="account_dashboard_kanban"> + <field name="id"/> + <field name="name"/> + <field name="type"/> + <field name="color"/> + <field name="show_on_dashboard"/> + <field name="kanban_dashboard"/> + <field name="activity_ids"/> + <field name="activity_state"/> + <field name="alias_domain"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}"> + <t t-value="JSON.parse(record.kanban_dashboard.raw_value)" t-set="dashboard"/> + <t t-value="record.type.raw_value" t-set="journal_type"/> + <t t-call="JournalTop"/> + <div t-att-class="'container o_kanban_card_content' + (dashboard.is_sample_data ? ' o_sample_data' : '')"> + <div class="row"> + <t t-if="(journal_type == 'bank' || journal_type == 'cash')" t-call="JournalBodyBankCash"/> + <t t-if="journal_type == 'sale' || journal_type == 'purchase'" t-call="JournalBodySalePurchase"/> + <t t-if="journal_type == 'general'" t-call="JournalMiscelaneous"/> + </div> + <t t-if="journal_type == 'bank' || journal_type == 'cash' || journal_type == 'sale' || journal_type == 'purchase'" t-call="JournalBodyGraph"/> + </div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu"> + <t t-call="JournalManage"/> + </div> + </div> + </t> + + <t t-name="JournalTop"> + <div t-attf-class="o_kanban_card_header"> + <div class="o_kanban_card_header_title"> + <div class="o_primary"> + <a type="object" name="open_action"><field name="name"/></a> + <t t-if="dashboard.company_count > 1"> + <span groups="base.group_multi_company" class="small">- <field name="company_id"/></span> + </t> + </div> + <div class="o_secondary" t-att-title="dashboard.title" t-if="journal_type == 'purchase' && record.alias_domain.raw_value"> + <field name="alias_id"/> + </div> + </div> + <div class="o_kanban_manage_button_section"> + <a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" aria-label="Selection" role="img" title="Selection"/></a> + </div> + </div> + </t> + + <t t-name="JournalManage"> + + <!-- For bank and cash --> + <div t-if="journal_type == 'bank' || journal_type == 'cash'" class="row"> + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_view"> + <div class="o_kanban_card_manage_title"> + <span role="separator">View</span> + </div> + <div> + <a t-if="journal_type == 'bank'" role="menuitem" type="object" name="open_action_with_context" context="{'action_name': 'action_bank_statement_tree', 'search_default_journal': True}">Statements</a> + <a t-if="journal_type == 'cash'" role="menuitem" type="object" name="open_action_with_context" context="{'action_name': 'action_view_bank_statement_tree', 'search_default_journal': True}">Statements</a> + </div> + <div> + <a role="menuitem" type="object" name="open_action_with_context" context="{'action_name': 'action_bank_statement_line', 'search_default_journal': True}">Operations</a> + </div> + <div> + <a role="menuitem" type="object" name="open_collect_money">Customer Payments</a> + </div> + <div> + <a role="menuitem" type="object" name="open_spend_money">Vendor Payments</a> + </div> + <div> + <a role="menuitem" type="object" name="open_transfer_money">Internal Transfers</a> + </div> + <div> + <a role="menuitem" type="object" name="open_action" context="{'action_name': 'action_account_moves_all_a'}" groups="base.group_no_one">Journal Items</a> + </div> + </div> + + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_new" groups="account.group_account_user"> + <div class="o_kanban_card_manage_title"> + <span role="separator">New</span> + </div> + <div name="bank_cash_commands"> + <t t-if="journal_type == 'bank'"> + <a role="menuitem" type="object" name="create_bank_statement">Statement</a> + </t> + <t t-if="journal_type == 'cash'"> + <a role="menuitem" type="object" name="create_cash_statement">Statement</a> + </t> + </div> + <div> + <a role="menuitem" type="object" name="create_customer_payment">Customer Payment</a> + </div> + <div> + <a role="menuitem" type="object" name="create_supplier_payment">Vendor Payment</a> + </div> + <div> + <a role="menuitem" type="object" name="create_internal_transfer">Internal Transfer</a> + </div> + </div> + + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_reconciliation"> + <div class="o_kanban_card_manage_title"> + <span role="separator">Reconciliation</span> + </div> + <div> + <a role="menuitem" type="object" name="open_action_with_context" context="{'action_name': 'action_account_reconcile_model', 'use_domain': ['|', ('match_journal_ids', '=', False), ('match_journal_ids', 'in', active_id)]}" groups="account.group_account_manager">Reconciliation Models</a> + </div> + </div> + </div> + + <!-- For purchase and sale --> + <div t-if="journal_type == 'purchase' || journal_type == 'sale'" class="row"> + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_view"> + <div class="o_kanban_card_manage_title"> + <span>View</span> + </div> + <div> + <a t-if="journal_type == 'sale'" type="object" name="open_action" context="{'action_name': 'action_move_out_invoice_type'}">Invoices</a> + <a t-if="journal_type == 'purchase'" type="object" name="open_action" context="{'action_name': 'action_move_in_invoice_type'}">Bills</a> + </div> + <div id="sale_purchase_refund"> + <a t-if="journal_type == 'sale'" type="object" name="open_action" context="{'action_name': 'action_move_out_refund_type'}">Credit Notes</a> + <a t-if="journal_type == 'purchase'" type="object" name="open_action" context="{'action_name': 'action_move_in_refund_type'}">Refund</a> + </div> + <div> + <a type="object" name="open_action" context="{'action_name': 'action_account_moves_all_a'}" groups="base.group_no_one">Journal Items</a> + </div> + </div> + + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_new" groups="account.group_account_invoice"> + <div class="o_kanban_card_manage_title"> + <span>New</span> + </div> + <div> + <a type="object" name="action_create_new"> + <span t-if="journal_type == 'sale'">Invoice</span> + <span t-if="journal_type == 'purchase'">Bill</span> + </a> + </div> + <div> + <a type="object" name="action_create_new" context="{'refund':True}"> + <span t-if="journal_type == 'sale'">Credit Note</span> + <span t-if="journal_type == 'purchase'">Refund</span> + </a> + </div> + <div t-if="journal_type == 'sale'"> + <a class="o_button_upload_bill" journal_type="sale" groups="account.group_account_invoice"> + <span>Upload Invoices</span> + </a> + </div> + </div> + + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_reports"> + <div class="o_kanban_card_manage_title"> + <span>Reporting</span> + </div> + <div> + <a t-if="journal_type == 'sale'" type="action" name="%(action_account_invoice_report_all)d" groups="account.group_account_readonly">Invoices Analysis</a> + <a t-if="journal_type == 'purchase'" type="action" name="%(action_account_invoice_report_all_supp)d" groups="account.group_account_readonly">Bills Analysis</a> + </div> + </div> + </div> + + <!-- For general and situation --> + <div t-if="journal_type == 'general' || journal_type == 'situation'" class="row"> + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_view"> + <div class="o_kanban_card_manage_title"> + <span>View</span> + </div> + <div> + <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line'}">Journal Entries</a> + </div> + <div> + <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line', 'search_default_unposted': 1}">Entries to Review</a> + </div> + <div> + <a type="object" name="open_action" context="{'action_name': 'action_account_moves_all_a'}" groups="base.group_no_one">Journal Items</a> + </div> + </div> + + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_new" groups="account.group_account_user"> + <div class="o_kanban_card_manage_title"> + <span>New</span> + </div> + <div> + <a type="object" name="action_create_new">Journal Entry</a> + </div> + </div> + + <div class="col-4 o_kanban_card_manage_section o_kanban_manage_operations"> + <div class="o_kanban_card_manage_title"> + <span>Operations</span> + </div> + <div> + <a type="object" name="open_action_with_context" context="{'action_name': 'action_validate_account_move', 'search_default_journal': True}" groups="account.group_account_user">Post All Entries</a> + </div> + </div> + </div> + + <div t-if="widget.editable" class="o_kanban_card_manage_settings row"> + <div class="col-8"> + <ul class="oe_kanban_colorpicker" data-field="color"/> + </div> + </div> + + <div groups="account.group_account_manager" class="row o_kanban_card_settings"> + <div class="col-6"> + <field name="show_on_dashboard" widget="boolean_favorite" /> + </div> + <div class="col-6 text-right mt-1"> + <a class="dropdown-item" t-if="widget.editable" type="edit">Configuration</a> + </div> + </div> + </t> + + <t t-name="JournalMiscelaneous"> + <div class="col-12 col-sm-4 mb-3 mb-sm-0 o_kanban_primary_left"> + <button type="object" name="action_create_new" class="btn btn-primary" groups="account.group_account_invoice"> + <span>New Entry</span> + </button> + </div> + <div class="col-12 col-sm-8 o_kanban_primary_right"> + <field name="json_activity_data" widget="kanban_vat_activity"/> + <t t-if="dashboard.number_to_check > 0"> + <div class="row"> + <div class="col overflow-hidden text-left"> + <a type="object" name="open_action" context="{'action_name': 'action_move_journal_line', 'search_default_to_check': True}"><t t-esc="dashboard.number_to_check"/> to check</a> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.to_check_balance"/></span> + </div> + </div> + </t> + </div> + </t> + + <t t-name="JournalBodyBankCash"> + <!-- On the left, display : + - A button corresponding to the bank_statements_source, if it wasn't configured, a button for each of them + - If there are statements to reconcile, a link to reconcile them --> + <div id="dashboard_bank_cash_left" class="col-12 col-sm-5 mb-3 mb-sm-0 o_kanban_primary_left"> + <t t-if="journal_type == 'bank'"> + <t t-if="dashboard.bank_statements_source == 'undefined'"> + <a t-if="dashboard.number_to_reconcile > 0" name="action_configure_bank_journal" type="object" class="oe_inline" groups="account.group_account_invoice">Connect</a> + <button t-if="dashboard.number_to_reconcile == 0" name="action_configure_bank_journal" type="object" class="btn btn-primary" groups="account.group_account_invoice">Connect</button> + </t> + <div name="bank_journal_cta" class="mt-3 mt-sm-0"> + <div name="bank_statement_create_button" groups="account.group_account_invoice"> + <a type="object" name="create_bank_statement" class="oe_inline">Create</a><span name="button_import_placeholder"/> Statements + </div> + </div> + </t> + <t t-if="journal_type == 'cash'"> + <a t-if="dashboard.number_to_reconcile > 0" type="object" name="create_cash_statement" class="oe_inline" groups="account.group_account_invoice">New Transaction</a> + <button t-if="dashboard.number_to_reconcile == 0" type="object" name="create_cash_statement" class="btn btn-primary" groups="account.group_account_invoice">New Transaction</button> + </t> + </div> + <!-- On the right, show other common informations/actions --> + <div id="dashboard_bank_cash_right" class="col-12 col-sm-7 o_kanban_primary_right"> + <div class="row" t-if="dashboard.nb_lines_bank_account_balance > 0"> + <div id="dashboard_bank_cash_balance" class="col overflow-hidden text-left"> + <span title="Balance in General Ledger">Balance in GL</span> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.account_balance"/></span> + </div> + </div> + <div class="row" t-if="dashboard.nb_lines_outstanding_pay_account_balance > 0"> + <div id="dashboard_bank_cash_outstanding_balance" class="col overflow-hidden text-left"> + <span title="Outstanding Payments/Receipts">Outstanding Payments/Receipts</span> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.outstanding_pay_account_balance"/></span> + </div> + </div> + <t t-if="dashboard.has_at_least_one_statement and dashboard.account_balance != dashboard.last_balance"> + <div class="row" name="latest_statement"> + <div class="col overflow-hidden text-left"> + <span title="Latest Statement">Latest Statement</span> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.last_balance"/></span> + </div> + </div> + </t> + </div> + </t> + <t t-name="JournalBodySalePurchase" id="account.JournalBodySalePurchase"> + <div class="col-12 col-sm-5 mb-3 mb-sm-0 o_kanban_primary_left"> + <t t-if="journal_type == 'sale'"> + <button type="object" name="action_create_new" class="btn btn-primary o_invoice_new" groups="account.group_account_invoice"> + <span>New Invoice</span> + </button> + </t> + <t t-if="journal_type == 'purchase'"> + <button class="btn btn-primary o_button_upload_bill oe_kanban_action_button" journal_type="purchase" groups="account.group_account_invoice"> + <span>Upload</span> + </button> + <a type="object" name="action_create_new" class="o_invoice_new" groups="account.group_account_invoice"><span>Create</span></a><span> Manually</span> + </t> + </div> + <div class="col-12 col-sm-7 o_kanban_primary_right"> + <div class="row" t-if="dashboard.number_draft"> + <div class="col overflow-hidden text-left"> + <a type="object" name="open_action" context="{'search_default_draft': '1'}"> + <span t-if="journal_type == 'sale'" title="Invoices to Validate"><t t-esc="dashboard.number_draft"/> Invoices to Validate</span> + <span t-if="journal_type == 'purchase'" title="Bills to Validate"><t t-esc="dashboard.number_draft"/> Bills to Validate</span> + </a> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.sum_draft"/></span> + </div> + </div> + <div class="row" t-if="dashboard.number_waiting"> + <div class="col overflow-hidden text-left"> + <a type="object" t-if="journal_type == 'sale'" name="open_action" + context="{'search_default_unpaid':1, 'search_default_posted':1, 'search_default_partial': 1}" id="account_dashboard_sale_pay_link"> + <t t-esc="dashboard.number_waiting"/> Unpaid Invoices + </a> + + <a type="object" t-if="journal_type == 'purchase'" name="open_action" + context="{'search_default_unpaid':1, 'search_default_posted':1, 'search_default_partial': 1}" id="account_dashboard_purchase_pay_link"> + <t t-esc="dashboard.number_waiting"/> Bills to Pay + </a> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.sum_waiting"/></span> + </div> + </div> + <t t-if="dashboard.number_to_check > 0"> + <div class="row"> + <div class="col overflow-hidden text-left"> + <a type="object" name="open_action" context="{'search_default_to_check': True}"><t t-esc="dashboard.number_to_check"/> to check</a> + </div> + <div class="col-auto text-right"> + <span><t t-esc="dashboard.to_check_balance"/></span> + </div> + </div> + </t> + </div> + </t> + <t t-name="JournalBodyGraph"> + <field name="kanban_dashboard_graph" t-att-graph_type="_.contains(['cash','bank'],journal_type) ? 'line' : 'bar'" widget="dashboard_graph"/> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="open_account_journal_dashboard_kanban" model="ir.actions.act_window"> + <field name="name">Accounting Dashboard</field> + <field name="res_model">account.journal</field> + <field name="view_mode">kanban,form</field> + <field name="view_id" ref="account_journal_dashboard_kanban_view"/> + <field name="usage">menu</field> + <field name="context">{'search_default_dashboard':1}</field> + <field name="domain">[]</field> + <field name="help" type="html"> + <p class="o_view_nocontent_neutral_face"> + This is the accounting dashboard + </p><p> + If you have not installed a chart of account, please install one first.<br/> + <a type="action" name="%(open_account_charts_modules)d" tabindex="-1">Browse available countries.</a> + </p> + </field> + </record> + +</odoo> diff --git a/addons/account/views/account_journal_views.xml b/addons/account/views/account_journal_views.xml new file mode 100644 index 00000000..abdf5380 --- /dev/null +++ b/addons/account/views/account_journal_views.xml @@ -0,0 +1,251 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_account_journal_tree" model="ir.ui.view"> + <field name="name">account.journal.tree</field> + <field name="model">account.journal</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <tree string="Account Journal"> + <field name='sequence' widget='handle'/> + <field name="name"/> + <field name="type"/> + <field name="journal_group_ids" widget="many2many_tags" readonly="1"/> + <field name="company_id" groups="base.group_multi_company"/> + </tree> + </field> + </record> + + <record id="view_account_journal_form" model="ir.ui.view"> + <field name="name">account.journal.form</field> + <field name="model">account.journal</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <form string="Account Journal"> + <sheet> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <div class="oe_title"> + <label for="name" class="oe_edit_only"/> + <h1><field name="name" class="oe_inline"/></h1> + </div> + <group> + <group> + <field name="active" invisible="1"/> + <field name="type"/> + </group> + <group> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + <field name="country_code" invisible="1"/> + </group> + </group> + <notebook> + <page name="bank_account" string="Journal Entries"> + <group> + <group string="Accounting information"> + <field name="default_account_type" invisible="1"/> + <!-- Bank --> + <field name="default_account_id" string="Bank Account" + attrs="{'required': [('id', '!=', False), ('type', '=', 'bank')], 'invisible': [('type', '!=', 'bank')]}" + groups="account.group_account_readonly"/> + <!-- Cash --> + <field name="default_account_id" string="Cash Account" + attrs="{'required': [('id', '!=', False), ('type', '=', 'cash')], 'invisible': [('type', '!=', 'cash')]}" + groups="account.group_account_readonly"/> + + <field name="suspense_account_id" + attrs="{'required': [('type', 'in', ('bank', 'cash'))], 'invisible': [('type', 'not in', ('bank', 'cash'))]}" + groups="account.group_account_readonly"/> + <field name="profit_account_id" attrs="{'invisible': [('type', '!=', 'cash')]}"/> + <field name="loss_account_id" attrs="{'invisible': [('type', '!=', 'cash')]}"/> + <!-- Sales --> + <field name="default_account_id" string="Default Income Account" + attrs="{'required': [('type', '=', 'sale')], 'invisible': [('type', '!=', 'sale')]}" + groups="account.group_account_readonly"/> + <!-- Purchase --> + <field name="default_account_id" string="Default Expense Account" + attrs="{'required': [('type', '=', 'purchase')], 'invisible': [('type', '!=', 'purchase')]}" + groups="account.group_account_readonly"/> + <field name="refund_sequence" attrs="{'invisible': [('type', 'not in', ['sale', 'purchase'])]}"/> + <field name="code"/> + <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> + </group> + <group string="Bank Account Number" attrs="{'invisible': [('type', '!=', 'bank')]}"> + <field name="company_partner_id" invisible="1"/> + <field name="bank_account_id" string="Account Number" context="{'default_partner_id': company_partner_id, 'form_view_ref': 'account.view_company_partner_bank_form'}"/> + <field name="bank_id" attrs="{'invisible': [('bank_account_id', '=', False)]}"/> + <field name="bank_statements_source" widget="radio" attrs="{'required': [('type', '=', 'bank')]}" groups="account.group_account_readonly"/> + </group> + </group> + </page> + <page name="journal_entries" string="Payments Configuration" attrs="{'invisible': [('type', 'in', ['sale', 'purchase', 'general'])]}"> + <group> + <group string="Incoming Payments"> + <field name="payment_debit_account_id" + attrs="{'required': [('id', '!=', False), ('type', 'in', ('bank', 'cash'))], 'invisible': [('type', 'not in', ('bank', 'cash'))]}" + groups="account.group_account_readonly"/> + <field name="inbound_payment_method_ids" string="Methods" widget="many2many_checkboxes" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/> + </group> + <group string="Outgoing Payments"> + <field name="id" invisible="1"/> + <field name="payment_credit_account_id" + attrs="{'required': [('id', '!=', False), ('type', 'in', ('bank', 'cash'))], 'invisible': [('type', 'not in', ('bank', 'cash'))]}" + groups="account.group_account_readonly"/> + <field name="outbound_payment_method_ids" string="Methods" widget="many2many_checkboxes" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/> + </group> + <group name="outgoing_payment" /> + </group> + </page> + <page name="advanced_settings" string="Advanced Settings"> + <group> + <group string="Control-Access" groups="account.group_account_manager"> + <div class="text-muted" colspan="2">Keep empty for no control</div> + <field name="type_control_ids" widget="many2many_tags" options="{'no_create': True}"/> + <field name="account_control_ids" widget="many2many_tags"/> + <field name="restrict_mode_hash_table" groups="account.group_account_readonly" attrs="{'invisible': [('type', 'in', ['bank', 'cash'])]}"/> + </group> + <!-- email alias --> + <group class="oe_read_only" name="group_alias_ro" string="Create Invoices upon Emails" attrs="{'invisible': ['|', ('type', 'not in', ('sale' ,'purchase')), ('alias_domain', '=', False)]}"> + <field name="alias_id"/> + </group> + <group name="group_alias_no_domain" string="Create Invoices upon Emails" attrs="{'invisible': ['|', ('type', 'not in', ('sale' ,'purchase')), ('alias_domain', '!=', False)]}"> + <div class="content-group"> + <a type='action' name='%(action_open_settings)d' class="btn btn-link" role="button"><i class="fa fa-fw o_button_icon fa-arrow-right"/> Configure Email Servers</a> + </div> + </group> + <group class="oe_edit_only" name="group_alias_edit" string="Create Invoices upon Emails" attrs="{'invisible': ['|', ('type', 'not in', ('sale' ,'purchase')), ('alias_domain', '=', False)]}"> + <label string="Email Alias" for="alias_name"/> + <div class="oe_inline" name="edit_alias" style="display: inline;" > + <field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/> + </div> + </group> + <!-- email alias end --> + <group string="Payment Communications" attrs="{'invisible': [('type', '!=', 'sale')]}"> + <field name="invoice_reference_type"/> + <field name="invoice_reference_model" attrs="{'invisible': [('invoice_reference_type', '=', 'none')]}"/> + </group> + <group string="Follow Customer Payments" attrs="{'invisible': [('type', '!=', 'sale')]}"> + <field name="sale_activity_type_id"/> + <field name="sale_activity_user_id" attrs="{'invisible': [('sale_activity_type_id', '=', False)]}"/> + <field name="sale_activity_note" placeholder="e.g. Give a phone call, check with others , ..." attrs="{'invisible': [('sale_activity_type_id', '=', False)]}"/> + </group> + </group> + </page> + </notebook> + </sheet> + <div class="oe_chatter"> + <field name="message_follower_ids"/> + <field name="activity_ids"/> + <field name="message_ids"/> + </div> + </form> + </field> + </record> + + <record id="account_journal_view_kanban" model="ir.ui.view"> + <field name="name">account.journal.kanban</field> + <field name="model">account.journal</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile"> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_content oe_kanban_global_click"> + <div class="row"> + <div class="col-6"> + <strong><field name="name"/></strong> + </div> + <div class="col-6"> + <span class="float-right"><field name="type"/></span> + </div> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_account_journal_search" model="ir.ui.view"> + <field name="name">account.journal.search</field> + <field name="model">account.journal</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <search string="Search Account Journal"> + <field name="name" string="Journal" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]"/> + <filter name="dashboard" string="Favorites" domain="[('show_on_dashboard', '=', True)]"/> + <separator/> + <filter name="sales" string="Sales" domain="[('type', '=', 'sale')]"/> + <filter name="purchases" string="Purchases" domain="[('type', '=', 'purchase')]"/> + <filter name="liquidity" string="Liquidity" domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]"/> + <filter name="miscellaneous" string="Miscellaneous" domain="[('type', 'not in', ['sale', 'purchase', 'cash', 'bank'])]"/> + <separator/> + <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + <record id="action_account_journal_form" model="ir.actions.act_window"> + <field name="name">Journals</field> + <field name="res_model">account.journal</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_ids" eval="[(5, 0, 0), + (0, 0, {'view_mode': 'tree', 'view_id': ref('view_account_journal_tree')}), + (0, 0, {'view_mode': 'kanban', 'view_id': ref('account_journal_view_kanban')}), + (0, 0, {'view_mode': 'form', 'view_id': ref('view_account_journal_form')})]"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Add a journal + </p><p> + A journal is used to record transactions of all accounting data + related to the day-to-day business. + </p> + </field> + </record> + + <record id="view_account_journal_group_tree" model="ir.ui.view"> + <field name="name">account.journal.group.tree</field> + <field name="model">account.journal.group</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <tree editable="bottom"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="excluded_journal_ids" widget="many2many_tags" options="{'no_create': True}"/> + <field name="company_id" groups="base.group_multi_company"/> + </tree> + </field> + </record> + + <record id="view_account_journal_group_form" model="ir.ui.view"> + <field name="name">account.journal.group.form</field> + <field name="model">account.journal.group</field> + <field name="priority">1</field> + <field name="arch" type="xml"> + <form string="Journal Groups"> + <sheet> + <group> + <field name="name" placeholder="e.g. GAAP, IFRS, ..."/> + <field name="excluded_journal_ids" widget="many2many_tags" options="{'no_create': True}"/> + <field name="sequence" groups="base.group_no_one"/> + <field name="company_id" groups="base.group_multi_company"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="action_account_journal_group_list" model="ir.actions.act_window"> + <field name="name">Journal Groups</field> + <field name="res_model">account.journal.group</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Add a journal group + </p><p> + Journal group are used in reporting to display relevant data together. + </p> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_menuitem.xml b/addons/account/views/account_menuitem.xml new file mode 100644 index 00000000..abcab09c --- /dev/null +++ b/addons/account/views/account_menuitem.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <!-- Top menu item --> + <menuitem name="Invoicing" + id="menu_finance" + groups="account.group_account_readonly,account.group_account_invoice" + web_icon="account,static/description/icon.png" + sequence="40"> + <menuitem id="menu_board_journal_1" name="Dashboard" action="open_account_journal_dashboard_kanban" groups="account.group_account_readonly" sequence="1"/> + <menuitem id="menu_finance_receivables" name="Customers" sequence="2"> + <menuitem id="menu_action_move_out_invoice_type" action="action_move_out_invoice_type" sequence="1"/> + <menuitem id="menu_action_move_out_refund_type" action="action_move_out_refund_type" sequence="2"/> + <menuitem id="menu_action_move_out_receipt_type" action="action_move_out_receipt_type" groups="account.group_sale_receipts" sequence="3"/> + <menuitem id="menu_action_account_payments_receivable" action="action_account_payments" sequence="15"/> + <menuitem id="product_product_menu_sellable" name="Products" action="product_product_action_sellable" sequence="100"/> + <menuitem id="menu_account_customer" name="Customers" action="res_partner_action_customer" sequence="110"/> + </menuitem> + <menuitem id="menu_finance_payables" name="Vendors" sequence="3"> + <menuitem id="menu_action_move_in_invoice_type" action="action_move_in_invoice_type" sequence="1"/> + <menuitem id="menu_action_move_in_refund_type" action="action_move_in_refund_type" sequence="2"/> + <menuitem id="menu_action_move_in_receipt_type" action="action_move_in_receipt_type" groups="account.group_purchase_receipts" sequence="3"/> + <menuitem id="menu_action_account_payments_payable" action="action_account_payments_payable" sequence="20"/> + <menuitem id="product_product_menu_purchasable" name="Products" action="product_product_action_purchasable" sequence="100"/> + <menuitem id="menu_account_supplier" name="Vendors" action="account.res_partner_action_supplier" sequence="200"/> + </menuitem> + <menuitem id="menu_finance_entries" name="Accounting" sequence="4" groups="account.group_account_readonly"> + <menuitem id="menu_finance_entries_accounting_miscellaneous" name="Miscellaneous" sequence="1"> + <menuitem id="menu_action_move_journal_line_form" action="action_move_journal_line" groups="account.group_account_readonly" sequence="1"/> + <menuitem id="menu_action_account_moves_all" action="action_account_moves_all" groups="base.group_no_one" sequence="10"/> + </menuitem> + <menuitem id="menu_finance_entries_accounting_journals" name="Journals" sequence="2"> + <menuitem id="menu_action_account_moves_journal_sales" action="action_account_moves_journal_sales" groups="account.group_account_readonly" sequence="1"/> + <menuitem id="menu_action_account_moves_journal_purchase" action="action_account_moves_journal_purchase" groups="account.group_account_readonly" sequence="2"/> + <menuitem id="menu_action_account_moves_journal_bank_cash" action="action_account_moves_journal_bank_cash" groups="account.group_account_readonly" sequence="3"/> + <menuitem id="menu_action_account_moves_journal_misc" action="action_account_moves_journal_misc" groups="account.group_account_readonly" sequence="4"/> + </menuitem> + <menuitem id="menu_finance_entries_accounting_ledgers" name="Ledgers" sequence="3"> + <menuitem id="menu_action_account_moves_ledger_general" action="action_account_moves_ledger_general" groups="account.group_account_readonly" sequence="1"/> + <menuitem id="menu_action_account_moves_ledger_partner" action="action_account_moves_ledger_partner" groups="account.group_account_readonly" sequence="2"/> + </menuitem> + <menuitem id="menu_finance_entries_management" name="Management" sequence="10" groups="account.group_account_invoice,account.group_account_readonly"/> + <menuitem id="menu_finance_entries_generate_entries" name="Generate Entries"/> + <menuitem id="menu_finance_entries_actions" name="Actions" sequence="11" groups="account.group_account_user"> + <menuitem id="menu_action_tax_adjustment" action="tax_adjustments_form" groups="base.group_no_one" sequence="45"/> + </menuitem> + </menuitem> + <menuitem id="menu_finance_reports" name="Reporting" sequence="20" groups="account.group_account_readonly,account.group_account_invoice"> + <menuitem id="account_reports_management_menu" name="Management" sequence="4"> + <menuitem id="menu_action_account_invoice_report_all" name="Invoice Analysis" action="action_account_invoice_report_all" sequence="1"/> + </menuitem> + <menuitem id="account_reports_legal_statements_menu" name="Generic Statements" sequence="1" groups="account.group_account_readonly"/> + </menuitem> + <menuitem id="menu_finance_configuration" name="Configuration" sequence="35" groups="account.group_account_manager"> + <menuitem id="menu_account_config" name="Settings" action="action_account_config" groups="base.group_system" sequence="0"/> + <menuitem id="account_invoicing_menu" name="Invoicing" groups="account.group_account_invoice,account.group_account_readonly" sequence="1"> + <menuitem id="menu_action_payment_term_form" action="action_payment_term_form" sequence="1"/> + <menuitem id="menu_action_incoterm_open" action="action_incoterms_tree" groups="account.group_account_manager" sequence="3"/> + </menuitem> + <menuitem id="account_banks_menu" name="Banks" groups="account.group_account_manager" sequence="2"> + <menuitem id="menu_action_account_bank_journal_form" action="action_new_bank_setting" groups="account.group_account_manager" sequence="1"/> + <menuitem id="action_account_reconcile_model_menu" action="account.action_account_reconcile_model" sequence="3" /> + </menuitem> + <menuitem id="account_account_menu" name="Accounting" groups="account.group_account_manager" sequence="3"> + <menuitem id="menu_action_account_form" action="action_account_form" groups="account.group_account_readonly" sequence="1"/> + <menuitem id="menu_action_tax_form" action="action_tax_form" sequence="2"/> + <menuitem id="menu_action_account_journal_form" action="action_account_journal_form" groups="account.group_account_manager" sequence="3"/> + <menuitem id="account_report_folder" name="Reporting" groups="account.group_account_readonly" sequence="4"/> + <menuitem id="menu_action_currency_form" action="base.action_currency_form" name="Currencies" groups="base.group_multi_currency" sequence="4"/> + <menuitem id="menu_action_account_fiscal_position_form" action="action_account_fiscal_position_form" sequence="5"/> + <menuitem id="menu_action_account_journal_group_list" action="action_account_journal_group_list" groups="account.group_account_manager" sequence="7"/> + </menuitem> + <menuitem id="root_payment_menu" name="Payments" groups="account.group_account_manager" sequence="4"/> + <menuitem id="account_management_menu" name="Management" groups="account.group_account_manager" sequence="5"> + <menuitem id="menu_product_product_categories" action="product.product_category_action_form" sequence="3"/> + <menuitem id="menu_action_rounding_form_view" action="rounding_list_action" groups="account.group_cash_rounding" sequence="4"/> + <menuitem id="menu_configure_tax_report" name="Tax Report" action="account.action_configure_tax_report" groups="base.group_no_one" sequence="5"/> + <menuitem id="menu_action_analytic_lines_tree" name="Analytic Items" action="analytic.account_analytic_line_action_entries" groups="analytic.group_analytic_accounting" sequence="35"/> + </menuitem> + <menuitem id="menu_analytic_accounting" name="Analytic Accounting" groups="analytic.group_analytic_accounting,analytic.group_analytic_tags" sequence="6"> + <menuitem id="account_analytic_def_account" action="analytic.action_account_analytic_account_form" groups="analytic.group_analytic_accounting" sequence="1"/> + <menuitem id="account_analytic_group_menu" name="Analytic Account Groups" action="analytic.account_analytic_group_action" groups="analytic.group_analytic_accounting" sequence="2"/> + <menuitem id="account_analytic_tag_menu" name="Analytic Tags" action="analytic.account_analytic_tag_action" groups="analytic.group_analytic_tags"/> + </menuitem> + </menuitem> + </menuitem> +</odoo> diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml new file mode 100644 index 00000000..7a56c589 --- /dev/null +++ b/addons/account/views/account_move_views.xml @@ -0,0 +1,1464 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <!-- VIEWS --> + + <!-- account.move.line (Journal items) --> + <record id="view_move_line_form" model="ir.ui.view"> + <field name="name">account.move.line.form</field> + <field name="model">account.move.line</field> + <field eval="2" name="priority"/> + <field name="arch" type="xml"> + <form string="Journal Item" create="false"> + <sheet> + <field name="company_id" invisible="1"/> + <field name="parent_state" invisible="1"/> + <group> + <field name="name"/> + <field name="partner_id" + domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]" + readonly="1"/> + </group> + <notebook colspan="4"> + <page string="Information" name="information"> + <group> + <group string="Amount"> + <field name="account_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" readonly="1"/> + <field name="debit" readonly="1"/> + <field name="credit" readonly="1"/> + <field name="quantity" readonly="1"/> + </group> + <group string="Accounting Documents"> + <field name="move_id" readonly="1"/> + <field name="statement_id" readonly="True" attrs="{'invisible': [('statement_id','=',False)]}"/> + </group> + <group string="Dates"> + <field name="date" groups="account.group_account_readonly"/> + <field name="date_maturity"/> + </group> + + <group string="Taxes" attrs="{'invisible': [('tax_line_id','=',False), ('tax_ids','=',[])]}"> + <field name="tax_line_id" readonly="1" attrs="{'invisible': [('tax_line_id','=',False)]}"/> + <field name="tax_ids" widget="many2many_tags" readonly="1" attrs="{'invisible': [('tax_ids','=',[])]}"/> + <field name="tax_exigible" readonly="1"/> + <field name="tax_audit"/> + </group> + <group string="Matching" attrs="{'invisible':[('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}"> + <label for="full_reconcile_id"/> + <div> + <field name="full_reconcile_id" attrs="{'invisible':[('full_reconcile_id','=',False)]}"/> + <field name="matched_debit_ids" invisible="1"/> + <field name="matched_credit_ids" invisible="1"/> + <button name="open_reconcile_view" + class="oe_link" + type="object" + string="-> View partially reconciled entries" + attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), '&', ('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}"> + </button> + </div> + </group> + <group string="Currency" groups="base.group_multi_currency"> + <field name="currency_id" invisible="1"/> + <field name="amount_currency"/> + </group> + <group string="Product" attrs="{'invisible': [('product_id', '=', False)]}"> + <field name="product_id" readonly="1"/> + </group> + <group string="States"> + <field name="blocked"/> + </group> + <group string="Analytic" groups="analytic.group_analytic_accounting,analytic.group_analytic_tags"> + <field name="analytic_account_id" groups="analytic.group_analytic_accounting" + domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" + readonly="1"/> + <field name="analytic_tag_ids" groups="analytic.group_analytic_tags" + widget="many2many_tags"/> + </group> + </group> + </page> + <page string="Analytic Lines" name="analytic_lines" groups="analytic.group_analytic_accounting"> + <field name="date" invisible="1"/> + <field name="analytic_line_ids" context="{'tree_view_ref':'analytic.view_account_analytic_line_tree', 'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + + <record id="account_move_line_view_kanban" model="ir.ui.view"> + <field name="name">account.move.line.kanban</field> + <field name="model">account.move.line</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile"> + <field name="date_maturity"/> + <field name="move_id"/> + <field name="name"/> + <field name="partner_id"/> + <templates> + <t t-name="kanban-box"> + <div class="oe_kanban_global_click"> + <div class="row mb4"> + <strong class="col-6"> + <span t-esc="record.move_id.value"/> + </strong> + <strong class="col-6 text-right"> + <i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/><field name="date_maturity"/> + </strong> + <div class="col-10"> + <span t-esc="record.name.value"/> + </div> + <div class="col-2 text-right"> + <img t-att-src="kanban_image('res.partner', 'image_128', record.partner_id.raw_value)" t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value" class="oe_kanban_avatar o_image_24_cover"/> + </div> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_move_line_pivot" model="ir.ui.view"> + <field name="name">account.move.line.pivot</field> + <field name="model">account.move.line</field> + <field name="arch" type="xml"> + <pivot string="Journal Items" sample="1"> + <field name="journal_id" type="row"/> + <field name="date" type="col"/> + <field name="balance" type="measure"/> + </pivot> + </field> + </record> + + <record id="view_move_line_tree" model="ir.ui.view"> + <field name="name">account.move.line.tree</field> + <field name="model">account.move.line</field> + <field eval="100" name="priority"/> + <field name="arch" type="xml"> + <tree string="Journal Items" create="false" edit="false" sample="1"> + <field name="date" optional="show"/> + <field name="company_id" groups="base.group_multi_company"/> + <field name="journal_id" options='{"no_open":True}'/> + <field name="move_id" optional="show"/> + <field name="account_id" options="{'no_open': True}" groups="account.group_account_readonly"/> + <field name="partner_id" optional="show"/> + <field name="statement_id" invisible="1"/> + <field name="ref" optional="show"/> + <field name="name" optional="show"/> + <field name="analytic_account_id" groups="account.group_account_readonly" optional="show" attrs="{'readonly':[('parent_state','=','posted')]}"/> + <field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags" optional="hide"/> + <field name="tax_ids" widget="many2many_tags" width="0.5" optional="show"/> + <field name="debit" sum="Total Debit"/> + <field name="credit" sum="Total Credit"/> + <field name="amount_currency" groups="base.group_multi_currency" optional="hide"/> + <field name="tax_tag_ids" widget="many2many_tags" width="0.5" optional="hide"/> + <field name="matching_number" optional="show"/> + <field name="currency_id" readonly="1" groups="base.group_multi_currency" optional="hide" string="Original Currency"/> + <field name="reconcile_model_id" invisible="1"/> + <field name="reconciled" invisible="1"/> + <field name="date_maturity" optional="hide"/> + <field name="company_currency_id" invisible="1"/> + <field name="parent_state" invisible="1"/> + </tree> + </field> + </record> + + <record id="view_move_line_tree_grouped" model="ir.ui.view"> + <field name="name">account.move.line.tree.grouped</field> + <field name="model">account.move.line</field> + <field eval="1" name="priority"/> + <field name="arch" type="xml"> + <tree string="Journal Items" create="false" expand="context.get('expand', False)" multi_edit="1"> + <field name="date" optional="show" readonly="1"/> + <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/> + <field name="move_id" optional="show"/> + <field name="account_id" optional="show" options="{'no_open': True, 'no_create': True}" + domain="[('company_id', '=', company_id)]" + groups="account.group_account_readonly"/> + <field name="statement_id" invisible="1"/> + <field name="partner_id" optional="show" readonly="1"/> + <field name="ref" optional="hide"/> + <field name="name"/> + <field name="reconciled" invisible="1"/> + <field name="matching_number" string="Matching" optional="show"/> + <field name="reconcile_model_id" invisible="1"/> + <field name="date_maturity" optional="hide"/> + <field name="analytic_account_id" optional="hide" groups="analytic.group_analytic_accounting" attrs="{'readonly':[('parent_state','=','posted')]}"/> + <field name="analytic_tag_ids" optional="hide" readonly="1" groups="analytic.group_analytic_tags"/> + <field name="debit" sum="Total Debit" readonly="1"/> + <field name="credit" sum="Total Credit" readonly="1"/> + <field name="balance" sum="Total Balance" readonly="1" optional="hide"/> + <field name="amount_currency" readonly="1" groups="base.group_multi_currency"/> + <field name="currency_id" readonly="1" groups="base.group_multi_currency" optional="hide" string="Original Currency"/> + <field name="company_currency_id" invisible="1"/> + <field name="parent_state" invisible="1"/> + <field name="tax_ids" widget="many2many_tags" width="0.5" optional="hide" readonly="1"/> + <field name="tax_tag_ids" widget="many2many_tags" width="0.5" optional="hide" string="Tax Grids" + options="{'no_open': True, 'no_create': True}" + domain="[('applicability', '=', 'taxes')]"/> + <groupby name="move_id"> + <field name="state" invisible="1"/> + <button name="edit" type="edit" icon="fa-edit" title="Edit"/> + <button name="action_post" states="draft" icon="fa-check" title="Post" type="object" groups="account.group_account_invoice"/> + <button name="%(action_view_account_move_reversal)d" states="posted" title="Reverse" icon="fa-refresh" type="action" groups="account.group_account_invoice"/> + <button name="action_duplicate" icon="fa-files-o" title="Duplicate" type="object" groups="account.group_account_invoice"/> + </groupby> + </tree> + </field> + </record> + + <record id="view_move_line_tree_grouped_sales_purchases" model="ir.ui.view"> + <field name="name">account.move.line.tree.grouped.sales.purchase</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.view_move_line_tree_grouped"/> + <field name="arch" type="xml"> + <field name="date" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="move_id" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="partner_id" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="matching_number" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="tax_ids" position="attributes"><attribute name="optional">show</attribute></field> + <field name="tax_tag_ids" position="attributes"><attribute name="optional">show</attribute></field> + </field> + </record> + + <record id="view_move_line_tree_grouped_bank_cash" model="ir.ui.view"> + <field name="name">account.move.line.tree.grouped.bank.cash</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.view_move_line_tree_grouped"/> + <field name="arch" type="xml"> + <field name="date" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="move_id" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="ref" position="attributes"><attribute name="optional">show</attribute></field> + <field name="matching_number" position="attributes"><attribute name="optional">hide</attribute></field> + </field> + </record> + + <record id="view_move_line_tree_grouped_misc" model="ir.ui.view"> + <field name="name">account.move.line.tree.grouped.misc</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.view_move_line_tree_grouped"/> + <field name="arch" type="xml"> + <field name="date" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="move_id" position="attributes"><attribute name="optional">hide</attribute></field> + </field> + </record> + + <record id="view_move_line_tree_grouped_general" model="ir.ui.view"> + <field name="name">account.move.line.tree.grouped.misc</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.view_move_line_tree_grouped"/> + <field name="arch" type="xml"> + <field name="account_id" position="attributes"> + <attribute name="optional">hide</attribute> + <attribute name="readonly">1</attribute> + </field> + <field name="balance" position="attributes"><attribute name="optional">show</attribute></field> + <field name="balance" position="after"> + <field name="cumulated_balance" optional="show"/> + </field> + </field> + </record> + + + <record id="view_move_line_tree_grouped_partner" model="ir.ui.view"> + <field name="name">account.move.line.tree.grouped.partner</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.view_move_line_tree_grouped"/> + <field name="arch" type="xml"> + <field name="partner_id" position="attributes"><attribute name="optional">hide</attribute></field> + <field name="date_maturity" position="attributes"><attribute name="optional">show</attribute></field> + <field name="balance" position="attributes"><attribute name="optional">show</attribute></field> + <field name="balance" position="after"> + <field name="cumulated_balance" optional="show"/> + </field> + </field> + </record> + + <record id="view_move_line_tax_audit_tree" model="ir.ui.view"> + <field name="name">account.move.line.tax.audit.tree</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.view_move_line_tree"/> + <field name="arch" type="xml"> + <field name="move_id" position="replace"/> + <field name="matching_number" position="replace"> + <field name="tax_line_id" string="Tax"/> + <field name="tax_base_amount" sum="Total Base Amount"/> + <field name="tax_audit"/> + <field name="move_id"/> + </field> + <field name="date_maturity" position="replace"/> + <field name="analytic_account_id" position="replace"/> + <field name="debit" position="replace"/> + <field name="credit" position="replace"/> + </field> + </record> + + <record id="account_move_line_graph_date" model="ir.ui.view"> + <field name="name">account.move.line.graph</field> + <field name="model">account.move.line</field> + <field name="arch" type="xml"> + <graph string="Account Statistics" type="bar" sample="1"> + <field name="date"/> + <field name="balance" operator="+" type='measure'/> + </graph> + </field> + </record> + + <record id="view_account_move_line_filter" model="ir.ui.view"> + <field name="name">account.move.line.search</field> + <field name="model">account.move.line</field> + <field name="arch" type="xml"> + <search string="Search Journal Items"> + <field name="name" string="Journal Item" filter_domain="[ + '|', '|', '|', + ('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/> + <field name="date"/> + <field name="account_id"/> + <field name="account_root_id"/> + <field name="account_internal_type"/> + <field name="partner_id"/> + <field name="journal_id"/> + <field name="move_id" string="Journal Entry" filter_domain="[ + '|', '|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self), ('move_id.partner_id', 'ilike', self)]"/> + <field name="tax_ids" /> + <field name="tax_line_id" string="Originator Tax"/> + <field name="reconcile_model_id"/> + <separator/> + <filter string="Unposted" name="unposted" domain="[('move_id.state', '=', 'draft')]" help="Unposted Journal Items"/> + <filter string="Posted" name="posted" domain="[('move_id.state', '=', 'posted')]" help="Posted Journal Items"/> + <separator/> + <filter string="To Check" name="to_check" domain="[('move_id.to_check', '=', True)]"/> + <separator/> + <filter string="Unreconciled" domain="[('full_reconcile_id', '=', False), ('balance', '!=', 0), ('account_id.reconcile', '=', True)]" help="Journal items where matching number isn't set" name="unreconciled"/> + <separator/> + <filter string="Sales" name="sales" domain="[('move_id.journal_id.type', '=', 'sale')]" context="{'default_journal_type': 'sale'}"/> + <filter string="Purchases" name="purchases" domain="[('move_id.journal_id.type', '=', 'purchase')]" context="{'default_journal_type': 'purchase'}"/> + <filter string="Bank" name="bank" domain="[('move_id.journal_id.type', '=', 'bank')]" context="{'default_journal_type': 'bank'}"/> + <filter string="Cash" name="cash" domain="[('move_id.journal_id.type', '=', 'cash')]" context="{'default_journal_type': 'cash'}"/> + <filter string="Miscellaneous" domain="[('move_id.journal_id.type', '=', 'general')]" name="misc_filter" context="{'default_journal_type': 'general'}"/> + <separator/> + <filter string="Payable" domain="[('account_id.internal_type', '=', 'payable')]" help="From Payable accounts" name="payable"/> + <filter string="Receivable" domain="[('account_id.internal_type', '=', 'receivable')]" help="From Receivable accounts" name="receivable"/> + <separator/> + <filter string="Date" name="date" date="date"/> + <separator/> + <group expand="0" string="Group By"> + <filter string="Journal Entry" name="group_by_move" domain="[]" context="{'group_by': 'move_id'}"/> + <filter string="Account" name="group_by_account" domain="[]" context="{'group_by': 'account_id'}"/> + <filter string="Partner" name="group_by_partner" domain="[]" context="{'group_by': 'partner_id'}"/> + <filter string="Journal" name="journal" domain="[]" context="{'group_by': 'journal_id'}"/> + <filter string="Date" name="groupby_date" domain="[]" context="{'group_by': 'date'}"/> + </group> + </search> + </field> + </record> + <record id="view_account_move_line_filter_with_root_selection" model="ir.ui.view"> + <field name="name">account.move.line.search</field> + <field name="model">account.move.line</field> + <field name="mode">primary</field> + <field name="priority">20</field> + <field name="inherit_id" ref="account.view_account_move_line_filter"/> + <field name="arch" type="xml"> + <xpath expr="//group" position="after"> + <searchpanel class="account_root"> + <field name="account_root_id" icon="fa-filter" limit="0"/> + </searchpanel> + </xpath> + </field> + </record> + + <!-- account.move (Journal Entry) --> + + <record id="view_move_tree" model="ir.ui.view"> + <field name="name">account.move.tree</field> + <field name="model">account.move</field> + <field name="arch" type="xml"> + <tree string="Journal Entries" sample="1"> + <field name="date"/> + <field name="name"/> + <field name="partner_id" optional="show"/> + <field name="ref" optional="show"/> + <field name="journal_id"/> + <field name="company_id" groups="base.group_multi_company" optional="show"/> + <field name="amount_total_signed" sum="Total Amount" string="Total" decoration-bf="1"/> + <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/> + <field name="currency_id" invisible="1"/> + </tree> + </field> + </record> + + <record id="view_invoice_tree" model="ir.ui.view"> + <field name="name">account.invoice.tree</field> + <field name="model">account.move</field> + <field name="arch" type="xml"> + <tree string="Invoices" + js_class="account_tree" + sample="1"> + <header> + <button name="action_register_payment" type="object" string="Register Payment" + groups="account.group_account_user" + invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund', 'out_receipt', 'in_invoice', 'in_refund','in_receipt')"/> + </header> + <field name="name" decoration-bf="1"/> + <field name="partner_id" invisible="1"/> + <field name="invoice_source_email" invisible="1"/> + <field name="invoice_partner_display_name" invisible="context.get('default_move_type') not in ('in_invoice', 'in_refund','in_receipt')" groups="base.group_user" string="Vendor" /> + <field name="invoice_partner_display_name" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" groups="base.group_user" string="Customer" /> + <field name="invoice_date" optional="show" invisible="context.get('default_move_type') not in ('in_invoice', 'in_refund','in_receipt')" string="Bill Date"/> + <field name="invoice_date" optional="show" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Invoice Date"/> + <field name="invoice_date_due" widget="remaining_days" optional="show" attrs="{'invisible': [['payment_state', 'in', ('paid', 'in_payment', 'reversed')]]}"/> + <field name="invoice_origin" optional="hide" string="Source Document"/> + <field name="payment_reference" optional="hide" invisible="context.get('default_move_type') in ('out_invoice', 'out_refund','out_receipt')"/> + <field name="ref" optional="hide"/> + <field name="invoice_user_id" optional="hide" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Sales Person" widget="many2one_avatar_user"/> + <field name="activity_ids" widget="list_activity" optional="show"/> + <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/> + <field name="amount_untaxed_signed" string="Tax Excluded" sum="Total" optional="show"/> + <field name="amount_tax_signed" string="Tax" sum="Total" optional="hide"/> + <field name="amount_total_signed" string="Total" sum="Total" decoration-bf="1" optional="show"/> + <field name="amount_residual_signed" string="Amount Due" sum="Amount Due" optional="hide"/> + <field name="currency_id" invisible="1"/> + <field name="company_currency_id" invisible="1"/> + <field name="state" widget="badge" decoration-success="state == 'posted'" decoration-info="state == 'draft'" optional="show"/> + <field name="payment_state" widget="badge" decoration-danger="payment_state == 'not_paid'" decoration-warning="payment_state in ('partial', 'in_payment')" decoration-success="payment_state in ('paid', 'reversed')" attrs="{'invisible': [('payment_state', 'in', ('invoicing_legacy'))]}"/> + <field name="move_type" invisible="context.get('default_move_type', True)"/> + </tree> + </field> + </record> + + <record id="view_out_invoice_tree" model="ir.ui.view"> + <field name="name">account.out.invoice.tree</field> + <field name="model">account.move</field> + <field name="inherit_id" ref="account.view_invoice_tree"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//tree" position="attributes"> + <attribute name="banner_route">/account/account_invoice_onboarding</attribute> + </xpath> + </field> + </record> + + <record id="view_in_invoice_tree" model="ir.ui.view"> + <field name="name">account.out.invoice.tree</field> + <field name="model">account.move</field> + <field name="inherit_id" ref="account.view_invoice_tree"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//field[@name='ref']" position="attributes"> + <attribute name="optional">show</attribute> + </xpath> + + <xpath expr="//field[@name='payment_state']" position="attributes"> + <attribute name="optional">hide</attribute> + </xpath> + </field> + </record> + + <record id="view_account_move_kanban" model="ir.ui.view"> + <field name="name">account.move.kanban</field> + <field name="model">account.move</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile" sample="1"> + <field name="journal_id"/> + <field name="partner_id"/> + <field name="ref"/> + <field name="date"/> + <field name="state"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_global_click"> + <div class="row mb4"> + <div class="col-6 o_kanban_record_headings"> + <strong> + <span> + <field name="partner_id" attrs="{'invisible': [('partner_id', '=', False)]}" /> + <field name="journal_id" attrs="{'invisible': [('partner_id', '!=', False)]}" /> + </span> + </strong> + </div> + <div class="col-6 text-right"> + <strong><i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/> <t t-esc="record.date.value"/></strong> + </div> + </div> + <div class="row"> + <div class="col-12"> + <span><field name="ref"/></span> + </div> + </div> + <div class="row"> + <div class="col-6"> + <span><field name="amount_total" widget='monetary'/></span> + <span><field name="currency_id" invisible="1"/></span> + </div> + <div class="col-6"> + <span class="float-right"> + <field name="state" widget="label_selection" options="{'classes': {'draft': 'default', 'posted': 'success'}}"/> + </span> + </div> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_move_form" model="ir.ui.view"> + <field name="name">account.move.form</field> + <field name="model">account.move</field> + <field name="arch" type="xml"> + <form string="Account Entry"> + <header> + <!-- Post --> + <button name="action_post" string="Post" class="oe_highlight" + type="object" groups="account.group_account_invoice" + attrs="{'invisible': ['|', '|', ('state', '!=', 'draft'), ('auto_post', '=', True), ('move_type', '!=', 'entry')]}"/> + <button name="action_post" string="Confirm" class="oe_highlight" + type="object" groups="account.group_account_invoice" + attrs="{'invisible': ['|', '|', ('state', '!=', 'draft'), ('auto_post', '=', True), ('move_type', '=', 'entry')]}"/> + <!-- Send (only invoices) --> + <button name="action_invoice_sent" + type="object" + string="Send & Print" + attrs="{'invisible':['|', '|', ('state', '!=', 'posted'), ('is_move_sent', '=', True), ('move_type', 'not in', ('out_invoice', 'out_refund'))]}" + class="oe_highlight"/> + <button name="action_invoice_sent" + type="object" + string="Send & Print" + attrs="{'invisible':['|', '|', ('state', '!=', 'posted'), ('is_move_sent', '=', False), ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund'))]}"/> + <!-- Register Payment (only invoices / receipts) --> + <button name="action_register_payment" id="account_invoice_payment_btn" + type="object" class="oe_highlight" + attrs="{'invisible': ['|', '|', ('state', '!=', 'posted'), ('payment_state', 'not in', ('not_paid', 'partial')), ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}" + context="{'dont_redirect_to_payments': True}" + string="Register Payment" + groups="account.group_account_invoice"/> + <!-- Preview (only customer invoices) --> + <button name="preview_invoice" type="object" string="Preview" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/> + <!-- Reverse --> + <button name="%(action_view_account_move_reversal)d" string="Reverse Entry" + type="action" groups="account.group_account_invoice" + attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), '|', ('state', '!=', 'posted'), ('payment_state', '=', 'reversed')]}"/> + <button name="action_reverse" string='Add Credit Note' + type='object' groups="account.group_account_invoice" + attrs="{'invisible': ['|', ('move_type', 'not in', ('out_invoice', 'in_invoice')), ('state', '!=', 'posted')]}"/> + <!-- Cancel --> + <button name="button_cancel" string="Cancel Entry" type="object" groups="account.group_account_invoice" + attrs="{'invisible' : ['|', ('id', '=', False), ('state', '!=', 'draft')]}"/> + <button name="button_draft" string="Reset to Draft" type="object" groups="account.group_account_invoice" + attrs="{'invisible' : [('show_reset_to_draft_button', '=', False)]}"/> + <field name="state" widget="statusbar" statusbar_visible="draft,posted"/> + </header> + <!-- Invoice outstanding credits --> + <div groups="account.group_account_invoice,account.group_account_readonly" + class="alert alert-warning" role="alert" style="margin-bottom:0px;" + attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('tax_lock_date_message', '=', False)]}"> + <field name="tax_lock_date_message" nolabel="1"/> + </div> + <div groups="account.group_account_invoice,account.group_account_readonly" + class="alert alert-info" role="alert" style="margin-bottom:0px;" + attrs="{'invisible': ['|', '|', ('move_type', 'not in', ('out_invoice', 'out_refund')), ('invoice_has_outstanding', '=', False), ('payment_state', 'not in', ('not_paid', 'partial'))]}"> + You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding payments</a></bold> for this customer. You can allocate them to mark this invoice as paid. + </div> + <div groups="account.group_account_invoice,account.group_account_readonly" + class="alert alert-info" role="alert" style="margin-bottom:0px;" + attrs="{'invisible': ['|', '|', ('move_type', 'not in', ('in_invoice', 'in_refund')), ('invoice_has_outstanding', '=', False), ('payment_state', 'not in', ('not_paid', 'partial'))]}"> + You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding debits</a></bold> for this vendor. You can allocate them to mark this bill as paid. + </div> + <div class="alert alert-info" role="alert" style="margin-bottom:0px;" + attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('auto_post', '=', False)]}"> + This move is configured to be posted automatically at the accounting date: <field name="date" readonly="1"/>. + </div> + <sheet> + <div name="button_box" class="oe_button_box"> + <button name="open_reconcile_view" + class="oe_stat_button" + icon="fa-bars" + type="object" + attrs="{'invisible': ['|', '|', ('move_type', '!=', 'entry'), ('id', '=', False), ('has_reconciled_entries', '=', False)]}" + string="Reconciled Entries"> + </button> + </div> + + <!-- Payment status for invoices / receipts --> + <widget name="web_ribbon" title="Paid" + attrs="{'invisible': ['|', ('payment_state', '!=', 'paid'), ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> + <widget name="web_ribbon" title="In Payment" + attrs="{'invisible': ['|', ('payment_state', '!=', 'in_payment'), ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> + <widget name="web_ribbon" title="Partial" + attrs="{'invisible': ['|', ('payment_state', '!=', 'partial'), ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> + <widget name="web_ribbon" title="Reversed" + bg_color="bg-danger" + attrs="{'invisible': [('payment_state', '!=', 'reversed')]}"/> + <widget name="web_ribbon" text="Invoicing App Legacy" + bg_color="bg-info" + attrs="{'invisible': [('payment_state', '!=', 'invoicing_legacy')]}" + tooltip="This entry has been generated through the Invoicing app, before installing Accounting. It has been disabled by the 'Invoicing Switch Threshold Date' setting so that it does not impact your accounting."/> + + <!-- Invisible fields --> + <field name="id" invisible="1"/> + <field name="show_name_warning" invisible="1"/> + <field name="posted_before" invisible="1"/> + <field name="move_type" invisible="1"/> + <field name="payment_state" invisible="1" force_save="1"/> + <field name="invoice_filter_type_domain" invisible="1"/> + <field name="suitable_journal_ids" invisible="1"/> + <field name="company_currency_id" invisible="1"/> + <field name="commercial_partner_id" invisible="1"/> + <field name="bank_partner_id" invisible="1"/> + <field name="display_qr_code" invisible="1"/> + <field name="show_reset_to_draft_button" invisible="1"/> + + <field name="invoice_has_outstanding" invisible="1"/> + <field name="is_move_sent" invisible="1"/> + <field name="invoice_has_matching_suspense_amount" invisible="1"/> + <field name="has_reconciled_entries" invisible="1"/> + <field name="restrict_mode_hash_table" invisible="1"/> + <field name="country_code" invisible="1"/> + + <div class="oe_title"> + <!-- Invoice draft header --> + <span class="o_form_label"><field name="move_type" attrs="{'invisible': [('move_type', '=', 'entry')]}" readonly="1" nolabel="1"/></span> + <h1> + <span attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('name', '!=', '/')]}">Draft</span> + </h1> + + <!-- Number --> + <span class="text-warning" attrs="{'invisible': [('show_name_warning', '=', False)]}">The current highest number is <field name="highest_name"/>. You might want to put a higher number here.</span> + <h1 class="mt0" attrs="{'invisible':[('name', '=', '/'), ('posted_before', '=', False)]}"> + <field name="name" attrs="{'readonly': [('state', '!=', 'draft')]}" placeholder="JRNL/2016/00001"/> + </h1> + + </div> + <group> + <group id="header_left_group"> + <div class="o_td_label"> + <label for="partner_id" string="Customer" style="font-weight:bold;" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"/> + <label for="partner_id" string="Vendor" style="font-weight:bold;" + attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund', 'in_receipt'))]}"/> + </div> + <field name="partner_id" widget="res_partner_many2one" nolabel="1" + context="{ + 'res_partner_search_mode': (context.get('default_move_type', 'entry') in ('out_invoice', 'out_refund', 'out_receipt') and 'customer') or (context.get('default_move_type', 'entry') in ('in_invoice', 'in_refund', 'in_receipt') and 'supplier') or False, + 'show_address': 1, 'default_is_company': True, 'show_vat': True}" + options='{"always_reload": True, "no_quick_create": True}' + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> + <label for="ref" string="Bill Reference" + attrs="{'invisible':[('move_type', 'not in', ('in_invoice', 'in_receipt', 'in_refund'))]}" /> + <field name="ref" nolabel="1" attrs="{'invisible':[('move_type', 'not in', ('in_invoice', 'in_receipt', 'in_refund'))]}" /> + <field name="ref" attrs="{'invisible':[('move_type', 'in', ('in_invoice', 'in_receipt', 'in_refund', 'out_invoice', 'out_refund'))]}"/> + <field name="payment_reference" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))], 'readonly': [('state', '!=', 'draft')]}"/> + <field name="partner_bank_id" + context="{'default_partner_id': bank_partner_id}" + domain="[('partner_id', '=', bank_partner_id)]" + attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund', 'in_receipt'))], 'readonly': [('state', '!=', 'draft')]}"/> + <label name="invoice_vendor_bill_id_label" for="invoice_vendor_bill_id" string="Auto-Complete" class="oe_edit_only" + attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('move_type', '!=', 'in_invoice')]}"/> + <field name="invoice_vendor_bill_id" nolabel="1" class="oe_edit_only" + attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('move_type', '!=', 'in_invoice')]}" + domain="[('company_id', '=', company_id), ('partner_id','child_of', [partner_id]), ('move_type','=','in_invoice')]" + placeholder="Select an old vendor bill" + options="{'no_create': True}" context="{'show_total_amount': True}"/> + </group> + <group id="header_right_group"> + <!-- Invoice date (only invoices / receipts) --> + <div class="o_td_label"> + <label for="invoice_date" string="Invoice Date" style="font-weight:bold;" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"/> + <label for="invoice_date" string="Bill Date" style="font-weight:bold;" + attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund', 'in_receipt'))]}"/> + </div> + <field name="invoice_date" nolabel="1" options="{'datepicker': {'warn_future': true}}" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> + + <field name="date" string="Accounting Date" + attrs="{ + 'invisible': [('move_type', 'in', ('out_invoice', 'out_refund', 'out_receipt'))], + 'readonly': [('state', '!=', 'draft')], + }"/> + + <!-- Invoice payment terms (only invoices) + due date (only invoices / receipts) --> + <label for="invoice_payment_term_id" string="Due Date" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> + <div class="d-flex" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"> + <field name="invoice_date_due" force_save="1" + placeholder="Date" + attrs="{'invisible': [('invoice_payment_term_id', '!=', False)]}"/> + <span class="o_form_label mx-3 oe_edit_only" + attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('invoice_payment_term_id', '!=', False)]}"> or </span> + <field name="invoice_payment_term_id" + placeholder="Terms"/> + </div> + + <label for="journal_id" + groups="account.group_account_readonly" + invisible="context.get('default_journal_id') and context.get('move_type', 'entry') != 'entry'"/> + <div name="journal_div" class="d-flex" invisible="context.get('default_journal_id') and context.get('move_type', 'entry') != 'entry'"> + <field name="journal_id" + groups="account.group_account_readonly" + options="{'no_create': True}" + attrs="{'readonly': [('posted_before', '=', True)]}"/> + <span class="oe_inline o_form_label mx-3 oe_read_only" + groups="base.group_multi_currency"> in </span> + <!-- Bigger margin on the left because in edit mode the external link button covers the text --> + <span class="oe_inline o_form_label mr-3 ml-5 oe_edit_only" + groups="base.group_multi_currency"> in </span> + <field name="currency_id" + groups="base.group_multi_currency" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + </div> + </group> + </group> + <notebook> + <page id="invoice_tab" + string="Invoice Lines" + attrs="{'invisible': [('move_type', '=', 'entry')]}"> + <field name="invoice_line_ids" + widget="section_and_note_one2many" + mode="tree,kanban" + context="{'default_move_type': context.get('default_move_type'), 'journal_id': journal_id, 'default_partner_id': commercial_partner_id, 'default_currency_id': currency_id or company_currency_id}"> + <tree editable="bottom" string="Journal Items" default_order="sequence, date desc, move_name desc, id"> + <control> + <create name="add_line_control" string="Add a line"/> + <create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/> + <create name="add_note_control" string="Add a note" context="{'default_display_type': 'line_note'}"/> + </control> + + <!-- Displayed fields --> + <field name="sequence" widget="handle"/> + <field name="move_name" invisible="1"/> + <field name="product_id" + optional="show" + domain=" + context.get('default_move_type') in ('out_invoice', 'out_refund', 'out_receipt') + and [('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)] + or [('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)] + "/> + <field name="name" widget="section_and_note_text" attrs="{'required': [('parent.move_type', 'not in', ('in_invoice', 'in_refund','in_receipt'))]}"/> + <field name="account_id" + groups="account.group_account_readonly" + options="{'no_create': True}" + domain="[('deprecated', '=', False), ('user_type_id.type', 'not in', ('receivable', 'payable')), ('company_id', '=', parent.company_id), ('is_off_balance', '=', False)]" + attrs="{'required': [('display_type', '=', False)]}"/> + <field name="analytic_account_id" + domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" + groups="analytic.group_analytic_accounting" + optional="show"/> + <field name="analytic_tag_ids" + domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" + groups="analytic.group_analytic_tags" + optional="show" + widget="many2many_tags"/> + <field name="quantity"/> + <field name="product_uom_category_id" invisible="1"/> + <field name="product_uom_id" string="UoM" groups="uom.group_uom" optional="show"/> + <field name="price_unit" string="Price"/> + <field name="discount" string="Disc.%" optional="hide"/> + <field name="tax_ids" widget="many2many_tags" + domain="[('type_tax_use', '=?', parent.invoice_filter_type_domain), ('company_id', '=', parent.company_id)]" + context="{'append_type_to_tax_name': not parent.invoice_filter_type_domain}" + options="{'no_create': True}" + optional="show"/> + <field name="price_subtotal" + string="Subtotal" + groups="account.group_show_line_subtotals_tax_excluded"/> + <field name="price_total" + string="Total" + groups="account.group_show_line_subtotals_tax_included"/> + + <!-- Others fields --> + <field name="partner_id" invisible="1"/> + <field name="amount_currency" invisible="1"/> + <field name="currency_id" invisible="1"/> + <field name="debit" invisible="1"/> + <field name="credit" invisible="1"/> + <field name="date" invisible="1"/> + <field name="date_maturity" invisible="1"/> + + <field name="tax_line_id" invisible="1"/> + <field name="tax_repartition_line_id" invisible="1"/> + <field name="tax_tag_ids" invisible="1"/> + <field name="tax_base_amount" invisible="1"/> + <field name="tax_exigible" invisible="1"/> + <field name="company_id" invisible="1"/> + <field name="company_currency_id" invisible="1"/> + <field name="recompute_tax_line" invisible="1" force_save="1"/> + <field name="display_type" force_save="1" invisible="1"/> + <field name="is_rounding_line" invisible="1"/> + <field name="exclude_from_invoice_tab" invisible="1"/> + <field name="account_internal_type" invisible="1"/> + <field name="account_internal_group" invisible="1"/> + </tree> + <kanban class="o_kanban_mobile"> + <!-- Displayed fields --> + <field name="name"/> + <field name="product_id"/> + <field name="price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/> + <field name="price_total" groups="account.group_show_line_subtotals_tax_included"/> + <field name="quantity"/> + <field name="product_uom_category_id" invisible="1"/> + <field name="product_uom_id" groups="uom.group_uom"/> + <field name="price_unit"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_card oe_kanban_global_click {{ record.display_type.raw_value ? 'o_is_' + record.display_type.raw_value : '' }}"> + <t t-if="!record.display_type.raw_value"> + <div class="row"> + <div class="col-2"> + <img t-att-src="kanban_image('product.product', 'image_128', record.product_id.raw_value)" t-att-title="record.product_id.value" t-att-alt="record.product_id.value" style="max-width: 100%;"/> + </div> + <div class="col-10"> + <strong> + <span> + <t t-esc="record.product_id.value"/> + </span> + </strong> + <div class="text-muted"> + Quantity: + <t t-esc="record.quantity.value"/> + <t t-esc="record.product_uom_id.value"/> + </div> + <div class="text-muted"> + Unit Price: + <t t-esc="record.price_unit.value"/> + </div> + <strong> + <span class="float-right text-right"> + <t t-esc="record.price_subtotal.value" groups="account.group_show_line_subtotals_tax_excluded"/> + <t t-esc="record.price_total.value" groups="account.group_show_line_subtotals_tax_included"/> + </span> + </strong> + </div> + </div> + </t> + <t t-if="record.display_type.raw_value === 'line_section' || record.display_type.raw_value === 'line_note'"> + <div class="row"> + <div class="col-12"> + <span> + <t t-esc="record.name.value"/> + </span> + </div> + </div> + </t> + </div> + </t> + </templates> + + <!-- Others fields --> + <field name="partner_id" invisible="1"/> + <field name="amount_currency" invisible="1"/> + <field name="currency_id" invisible="1"/> + <field name="debit" invisible="1"/> + <field name="credit" invisible="1"/> + <field name="date" invisible="1"/> + <field name="date_maturity" invisible="1"/> + + <field name="tax_line_id" invisible="1"/> + <field name="tax_repartition_line_id" invisible="1"/> + <field name="tax_tag_ids" invisible="1"/> + <field name="tax_base_amount" invisible="1"/> + <field name="tax_exigible" invisible="1"/> + <field name="company_id" invisible="1"/> + <field name="company_currency_id" invisible="1"/> + <field name="recompute_tax_line" invisible="1" force_save="1"/> + <field name="display_type" force_save="1" invisible="1"/> + <field name="is_rounding_line" invisible="1"/> + <field name="exclude_from_invoice_tab" invisible="1"/> + <field name="account_internal_type" invisible="1"/> + <field name="account_internal_group" invisible="1"/> + </kanban> + <form> + <sheet> + <field name="product_uom_category_id" invisible="1"/> + <field name="display_type" invisible="1"/> + <field name="parent_state" invisible="1"/> + <group> + <field name="partner_id" invisible="1"/> + <field name="company_id" invisible="1"/> + <field name="product_id" widget="many2one_barcode"/> + <field name="quantity"/> + <field name="product_uom_id" groups="uom.group_uom"/> + <field name="price_unit"/> + <field name="discount" groups="product.group_discount_per_so_line"/> + <field name="currency_id" invisible="1"/> + </group> + <group> + <field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/> + <field name="account_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" readonly="1"/> + <field name="tax_ids" widget="many2many_tags"/> + <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/> + </group> + <label for="name" string="Description" attrs="{'invisible': [('display_type', '!=', False)]}"/> + <label for="name" string="Section" attrs="{'invisible': [('display_type', '!=', 'line_section')]}"/> + <label for="name" string="Note" attrs="{'invisible': [('display_type', '!=', 'line_note')]}"/> + <field name="name" widget="text"/> + </sheet> + </form> + </field> + + <!-- Totals (only invoices / receipts) --> + <group class="oe_subtotal_footer oe_right" + attrs="{'invisible': ['|', ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')), + ('payment_state' ,'=', 'invoicing_legacy')]}"> + <field name="amount_tax" invisible="1"/> + <field name="amount_untaxed" attrs="{'invisible': [('amount_tax', '=', 0)]}"/> + <field name="amount_by_group" widget="tax-group-custom-field" nolabel="1" colspan="2" attrs="{'invisible': [('amount_tax', '=', 0)]}"/> + <field name="amount_total" attrs="{'invisible': [('amount_tax', '!=', 0)]}"/> + <field name="amount_total" class="oe_subtotal_footer_separator" attrs="{'invisible': [('amount_tax', '=', 0)]}"/> + <field name="invoice_payments_widget" colspan="2" nolabel="1" widget="payment"/> + <field name="amount_residual" class="oe_subtotal_footer_separator" attrs="{'invisible': [('state', '=', 'draft')]}"/> + </group> + <field name="narration" placeholder="Terms and Conditions" class="oe_inline" nolabel="1"/> + + <field name="invoice_outstanding_credits_debits_widget" + class="oe_invoice_outstanding_credits_debits" + colspan="2" nolabel="1" widget="payment" + attrs="{'invisible': ['|', ('state', '!=', 'posted'), ('move_type', 'in', ('out_receipt', 'in_receipt'))]}"/> + </page> + <page id="aml_tab" string="Journal Items" groups="account.group_account_readonly"> + <div class="alert alert-info text-center mb-0" role="alert" attrs="{'invisible': ['|', ('payment_state', '!=', 'invoicing_legacy'), ('move_type', '=', 'entry')]}"> + <span>This entry has been generated through the Invoicing app, before installing Accounting. Its balance has been imported separately.</span> + </div> + <field name="line_ids" + context="{'default_move_type': context.get('default_move_type'), 'line_ids': line_ids, 'journal_id': journal_id, 'default_partner_id': commercial_partner_id, 'default_currency_id': currency_id or company_currency_id}" + attrs="{'invisible': [('payment_state', '=', 'invoicing_legacy'), ('move_type', '!=', 'entry')]}"> + <tree editable="bottom" string="Journal Items" decoration-muted="display_type in ('line_section', 'line_note')" default_order="sequence, date desc, move_name desc, id"> + <!-- Displayed fields --> + <field name="account_id" + attrs="{ + 'required': [('display_type', 'not in', ('line_section', 'line_note'))], + 'invisible': [('display_type', 'in', ('line_section', 'line_note'))], + }" + domain="[('deprecated', '=', False), ('company_id', '=', parent.company_id)]" /> + <field name="partner_id" + domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]" + attrs="{'column_invisible': [('parent.move_type', '!=', 'entry')]}"/> + <field name="name" widget="section_and_note_text" optional="show"/> + <field name="analytic_account_id" + optional="hide" + domain="['|', ('company_id', '=', parent.company_id), ('company_id', '=', False)]" + groups="analytic.group_analytic_accounting" + attrs="{'invisible': [('display_type', 'in', ('line_section', 'line_note'))]}"/> + <field name="analytic_tag_ids" + optional="show" + groups="analytic.group_analytic_tags" + widget="many2many_tags" + attrs="{'invisible': [('display_type', 'in', ('line_section', 'line_note'))]}"/> + <field name="date_maturity" + optional="hide" + invisible="context.get('view_no_maturity')" + attrs="{'invisible': [('display_type', 'in', ('line_section', 'line_note'))]}"/> + <field name="amount_currency" + groups="base.group_multi_currency" + optional="hide"/> + <field name="currency_id" options="{'no_create': True}" + groups="base.group_multi_currency" + attrs="{'column_invisible': [('parent.move_type', '!=', 'entry')]}"/> + <field name="tax_ids" widget="many2many_tags" + optional="hide" + domain="[('type_tax_use', '=?', parent.invoice_filter_type_domain)]" + context="{'append_type_to_tax_name': not parent.invoice_filter_type_domain}" + options="{'no_create': True}" + force_save="1" + attrs="{'readonly': [ + '|', '|', + ('display_type', 'in', ('line_section', 'line_note')), + ('tax_line_id', '!=', False), + '&', + ('parent.move_type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')), + ('account_internal_type', 'in', ('receivable', 'payable')), + ]}"/> + <field name="debit" + sum="Total Debit" + attrs="{'invisible': [('display_type', 'in', ('line_section', 'line_note'))]}"/> + <field name="credit" + sum="Total Credit" + attrs="{'invisible': [('display_type', 'in', ('line_section', 'line_note'))]}"/> + <field name="tax_fiscal_country_id" invisible="1"/> + <field name="tax_tag_ids" widget="many2many_tags" string="Tax Grids" optional="show" domain="[('country_id', '=', tax_fiscal_country_id), ('applicability', '=', 'taxes')]"/> + + <!-- Buttons --> + <button name="action_automatic_entry" + type="object" + icon="fa-calendar" + string="Cut-Off" + aria-label="Change Period" + class="float-right" + attrs="{'invisible': [('account_internal_group', 'not in', ('income', 'expense'))], 'column_invisible': ['|', ('parent.move_type', '=', 'entry'), ('parent.state', '!=', 'posted')]}" + context="{'hide_automatic_options': 1, 'default_action': 'change_period'}"/> + + <!-- Others fields --> + <field name="payment_id" invisible="1"/> + + <field name="product_id" invisible="1"/> + <field name="quantity" invisible="1"/> + <field name="product_uom_category_id" invisible="1"/> + <field name="product_uom_id" invisible="1"/> + <field name="price_unit" invisible="1"/> + <field name="discount" invisible="1"/> + <field name="price_subtotal" invisible="1"/> + <field name="price_total" invisible="1"/> + + <field name="sequence" invisible="1"/> + <field name="move_name" invisible="1"/> + <field name="date" invisible="1"/> + <field name="tax_line_id" invisible="1"/> + <field name="tax_group_id" invisible="1"/> + <field name="tax_repartition_line_id" invisible="1" force_save="1"/> + <field name="tax_base_amount" invisible="1" force_save="1"/> + <field name="tax_exigible" invisible="1" force_save="1"/> + <field name="company_id" invisible="1"/> + <field name="company_currency_id" invisible="1"/> + <field name="recompute_tax_line" invisible="1" force_save="1"/> + <field name="display_type" force_save="1" invisible="1"/> + <field name="is_rounding_line" invisible="1"/> + <field name="exclude_from_invoice_tab" invisible="1"/> + <field name="account_internal_type" invisible="1"/> + <field name="account_internal_group" invisible="1"/> + </tree> + <!-- Form view to cover mobile use --> + <form> + <group> + <field name="tax_line_id" invisible="1"/> + <field name="account_id" domain="[('company_id', '=', parent.company_id), ('deprecated', '=', False)]"/> + <field name="partner_id" domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/> + <field name="name"/> + <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/> + <field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/> + <field name="amount_currency" groups="base.group_multi_currency"/> + <field name="company_currency_id" invisible="1"/> + <field name="company_id" invisible="1"/> + <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> + <field name="debit" sum="Total Debit"/> + <field name="credit" sum="Total Credit"/> + <field name="tax_ids" string="Taxes Applied" widget="many2many_tags" options="{'no_create': True}"/> + <field name="date_maturity" required="0" invisible="context.get('view_no_maturity', False)"/> + <field name="recompute_tax_line" invisible="1" readonly="1"/> + </group> + </form> + </field> + </page> + <page id="other_tab" string="Other Info" name="other_info" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund'))]}"> + <group id="other_tab_group"> + <group string="Invoice" + name="sale_info_group" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"> + <label for="ref" string="Customer Reference" /> + <field name="ref" nolabel="1"/> + <field name="user_id" invisible="1" force_save="1"/> + <field name="invoice_user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/> + <field name="invoice_origin" string="Source Document" force_save="1" invisible="1"/> + <field name="partner_bank_id" + context="{'default_partner_id': bank_partner_id}" + domain="[('partner_id', '=', bank_partner_id)]" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + <field name="qr_code_method" + attrs="{'invisible': [('display_qr_code', '=', False)]}"/> + </group> + <group string="Accounting" + name="accounting_info_group" + attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund'))]}"> + <field name="company_id" groups="base.group_multi_company"/> + <field name="invoice_incoterm_id"/> + <field name="fiscal_position_id"/> + <field name="invoice_cash_rounding_id" groups="account.group_cash_rounding"/> + <field name="invoice_source_email" + widget="email" + attrs="{'invisible': ['|', ('move_type', 'not in', ('in_invoice', 'in_refund')), ('invoice_source_email', '=', False)]}"/> + <field name="auto_post" + attrs="{'readonly': ['|',('reversed_entry_id', '!=', False),('state','!=','draft')]}"/> + <field name="to_check"/> + </group> + </group> + </page> + <page id="other_tab_entry" string="Other Info" name="other_info" + attrs="{'invisible': [('move_type', '!=', 'entry')]}"> + <group id="other_tab_entry_group"> + <group name="misc_group"> + <field name="auto_post" + attrs="{'invisible': [('move_type', '!=', 'entry')], 'readonly': ['|',('reversed_entry_id', '!=', False),('state','!=','draft')]}"/> + <field name="reversed_entry_id" + attrs="{'invisible': [('move_type', '!=', 'entry')]}"/> + <field name="to_check" + attrs="{'invisible': [('move_type', '!=', 'entry')]}" /> + </group> + <group> + <field name="company_id" groups="base.group_multi_company" required="1"/> + </group> + </group> + <!-- Internal note --> + <field name="narration" placeholder="Add an internal note..." nolabel="1" height="50"/> + </page> + </notebook> + </sheet> + <!-- Attachment preview --> + <div class="o_attachment_preview" + attrs="{'invisible': ['|', + ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), + ('state', '!=', 'draft')]}" /> + <!-- Chatter --> + <div class="oe_chatter"> + <field name="message_follower_ids" groups="base.group_user"/> + <field name="activity_ids"/> + <field name="message_ids"/> + </div> + </form> + </field> + </record> + + <record id="view_account_move_filter" model="ir.ui.view"> + <field name="name">account.move.select</field> + <field name="model">account.move</field> + <field name="arch" type="xml"> + <search string="Search Move"> + <field name="name" string="Journal Entry" filter_domain="['|', '|', ('name', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self)]"/> + <field name="date"/> + <field name="partner_id"/> + <field name="journal_id"/> + <filter string="Unposted" name="unposted" domain="[('state', '=', 'draft')]" help="Unposted Journal Entries"/> + <filter string="Posted" name="posted" domain="[('state', '=', 'posted')]" help="Posted Journal Entries"/> + <separator/> + <filter string="Reversed" name="reversed" domain="[('payment_state', '=', 'reversed')]"/> + <separator/> + <filter string="To Check" name="to_check" domain="[('to_check', '=', True)]"/> + <separator/> + <filter string="Sales" name="sales" domain="[('journal_id.type', '=', 'sale')]" context="{'default_journal_type': 'sale'}"/> + <filter string="Purchases" name="purchases" domain="[('journal_id.type', '=', 'purchase')]" context="{'default_journal_type': 'purchase'}"/> + <filter string="Bank" name="bankoperations" domain="[('journal_id.type', '=', 'bank')]" context="{'default_journal_type': 'bank'}"/> + <filter string="Cash" name="cashoperations" domain="[('journal_id.type', '=', 'cash')]" context="{'default_journal_type': 'cash'}"/> + <filter string="Miscellaneous" name="misc_filter" domain="[('journal_id.type', '=', 'general')]" context="{'default_journal_type': 'general'}"/> + <separator/> + <filter string="Date" name="date" date="date"/> + <separator/> + <group expand="0" string="Group By"> + <filter string="Partner" name="partner" domain="[]" context="{'group_by': 'partner_id'}"/> + <filter string="Journal" name="journal" domain="[]" context="{'group_by': 'journal_id'}"/> + <filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/> + <filter string="Date" name="by_date" domain="[]" context="{'group_by': 'date'}" help="Journal Entries by Date"/> + <filter string="Company" name="by_company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/> + </group> + </search> + </field> + </record> + + <record id="view_account_invoice_filter" model="ir.ui.view"> + <field name="name">account.invoice.select</field> + <field name="model">account.move</field> + <field name="arch" type="xml"> + <search string="Search Invoice"> + <field name="name" string="Invoice" + filter_domain="[ + '|', '|' , '|', '|', + ('name', 'ilike', self), ('invoice_origin', 'ilike', self), + ('ref', 'ilike', self), ('payment_reference', 'ilike', self), + ('partner_id', 'child_of', self)]"/> + <field name="journal_id"/> + <field name="partner_id" operator="child_of"/> + <field name="invoice_user_id" string="Salesperson" domain="[('share', '=', False)]"/> + <field name="date" string="Period"/> + <filter domain="[('invoice_user_id', '=', uid)]" name="myinvoices" help="My Invoices"/> + <separator/> + <filter name="draft" string="Draft" domain="[('state','=','draft')]"/> + <filter name="posted" string="Posted" domain="[('state', '=', 'posted')]"/> + <filter name="cancel" string="Cancelled" domain="[('state', '=', 'cancel')]"/> + <separator/> + <filter string="To Check" name="to_check" domain="[('to_check', '=', True)]"/> + <separator/> + <filter name="in_payment" string="In Payment" domain="[('payment_state', '=', 'in_payment'), ('state', '=', 'posted')]"/> + <filter name="partial" string="Partially Paid" domain="[('payment_state', '=', 'partial'), ('state', '=', 'posted')]"/> + <filter name="paid" string="Paid" domain="[('payment_state', '=', 'paid'), ('state', '=', 'posted')]"/> + <filter name="unpaid" string="Not Paid" domain="[('payment_state', '=', 'not_paid'), ('state', '=', 'posted')]"/> + <filter name="reversed" string="Reversed" domain="[('payment_state', '=', 'reversed'), ('state', '=', 'posted')]"/> + <filter name="late" string="Overdue" domain="['&', ('invoice_date_due', '<', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'posted'), ('payment_state', 'in', ('not_paid', 'partial'))]" help="Overdue invoices, maturity date passed"/> + <separator/> + <filter name="invoice_date" string="Invoice Date" date="invoice_date"/> + <filter name="due_date" string="Due Date" date="invoice_date_due"/> + <separator/> + <filter invisible="1" string="Late Activities" name="activities_overdue" + domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]" + help="Show all records which has next action date is before today"/> + <filter invisible="1" string="Today Activities" name="activities_today" + domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/> + <filter invisible="1" string="Future Activities" name="activities_upcoming_all" + domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/> + <group expand="0" string="Group By"> + <filter string="Salesperson" name="salesperson" context="{'group_by':'invoice_user_id'}"/> + <filter name="status" string="Status" context="{'group_by':'state'}"/> + <separator/> + <filter string="Invoice Date" name="invoicedate" context="{'group_by': 'invoice_date'}"/> + <filter string="Due Date" name="duedate" context="{'group_by': 'invoice_date_due'}"/> + </group> + </search> + </field> + </record> + + <!-- ACTIONS --> + + <!-- account.move.line (Journal Items) --> + + <record id="action_move_line_select" model="ir.actions.act_window"> + <field name="name">Journal Items</field> + <field name="res_model">account.move.line</field> + <field name="context">{'search_default_account_id': [active_id]}</field> + </record> + + <record id="action_automatic_entry" model="ir.actions.server"> + <field name="name">Automatic Entries</field> + <field name="model_id" ref="account.model_account_move_line"/> + <field name="groups_id" eval="[(4, ref('account.group_account_user'))]"/> + <field name="binding_model_id" ref="account.model_account_move_line"/> + <field name="state">code</field> + <field name="code">action = records.action_automatic_entry()</field> + </record> + + <record id="action_account_moves_all_a" model="ir.actions.act_window"> + <field name="context">{'journal_type':'general', 'search_default_group_by_move': 1, 'search_default_posted':1, 'name_groupby':1, 'create':0}</field> + <field name="name">Journal Items</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped"/> + <field name="view_mode">tree,pivot,graph,form,kanban</field> + </record> + + <record id="action_account_moves_journal_sales" model="ir.actions.act_window"> + <field name="context">{'journal_type':'sales', 'search_default_group_by_move': 1, 'search_default_posted':1, 'search_default_sales':1, 'name_groupby':1, 'expand': 1}</field> + <field name="name">Sales</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped_sales_purchases"/> + <field name="view_mode">tree,pivot,graph</field> + </record> + + <record id="action_account_moves_journal_purchase" model="ir.actions.act_window"> + <field name="context">{'journal_type':'purchase', 'search_default_group_by_move': 1, 'search_default_posted':1, 'search_default_purchases':1, 'name_groupby':1, 'expand': 1}</field> + <field name="name">Purchases</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped_sales_purchases"/> + <field name="view_mode">tree,pivot,graph</field> + </record> + + <record id="action_account_moves_journal_bank_cash" model="ir.actions.act_window"> + <field name="context">{'journal_type':'bank', 'search_default_group_by_move': 1, 'search_default_posted':1, 'search_default_bank':1, 'search_default_cash':1, 'name_groupby':1, 'expand': 1}</field> + <field name="name">Bank and Cash</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped_bank_cash"/> + <field name="view_mode">tree,pivot,graph</field> + </record> + + <record id="action_account_moves_journal_misc" model="ir.actions.act_window"> + <field name="context">{'journal_type':'general', 'search_default_group_by_move': 1, 'search_default_posted':1, 'search_default_misc_filter':1, 'name_groupby':1, 'expand': 1}</field> + <field name="name">Miscellaneous</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped_misc"/> + <field name="view_mode">tree,pivot,graph</field> + </record> + + <record id="action_account_moves_ledger_general" model="ir.actions.act_window"> + <field name="context">{'journal_type':'general', 'search_default_group_by_account': 1, 'search_default_posted':1}</field> + <field name="name">General Ledger</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped_general"/> + <field name="search_view_id" ref="view_account_move_line_filter_with_root_selection"/> + <field name="view_mode">tree,pivot,graph</field> + </record> + + <record id="action_account_moves_ledger_partner" model="ir.actions.act_window"> + <field name="context">{'journal_type':'general', 'search_default_group_by_partner': 1, 'search_default_posted':1, 'search_default_payable':1, 'search_default_receivable':1, 'search_default_unreconciled':1}</field> + <field name="name">Partner Ledger</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="view_id" ref="view_move_line_tree_grouped_partner"/> + <field name="search_view_id" ref="view_account_move_line_filter"/> + <field name="view_mode">tree,pivot,graph</field> + </record> + + <record id="action_account_moves_all_tree" model="ir.actions.act_window"> + <field name="name">Journal Items</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note'))]</field> + <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id, 'search_default_posted':1}</field> + <field name="view_id" ref="view_move_line_tree"/> + </record> + + <record id="action_account_moves_all" model="ir.actions.act_window"> + <field name="context">{'journal_type':'general', 'search_default_posted':1}</field> + <field name="name">Journal Items</field> + <field name="res_model">account.move.line</field> + <field name="domain">[('display_type', 'not in', ('line_section', 'line_note')), ('move_id.state', '!=', 'cancel')]</field> + <field name="view_id" ref="view_move_line_tree"/> + <field name="view_mode">tree,pivot,graph,form,kanban</field> + </record> + + <!-- account.move (Journal Entry) --> + + <record id="action_move_journal_line" model="ir.actions.act_window"> + <field name="name">Journal Entries</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_move_tree"/> + <field name="search_view_id" ref="view_account_move_filter"/> + <field name="context">{'default_move_type': 'entry', 'search_default_misc_filter':1, 'view_no_maturity': True}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a journal entry + </p><p> + A journal entry consists of several journal items, each of + which is either a debit or a credit transaction. + </p> + </field> + </record> + + <record id="action_move_out_invoice_type" model="ir.actions.act_window"> + <field name="name">Invoices</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_out_invoice_tree"/> + <field name="search_view_id" ref="view_account_invoice_filter"/> + <field name="domain">[('move_type', '=', 'out_invoice')]</field> + <field name="context">{'default_move_type': 'out_invoice'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a customer invoice + </p><p> + Create invoices, register payments and keep track of the discussions with your customers. + </p> + </field> + </record> + + <record id="action_move_out_refund_type" model="ir.actions.act_window"> + <field name="name">Credit Notes</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_invoice_tree"/> + <field name="search_view_id" ref="view_account_invoice_filter"/> + <field name="domain">[('move_type', '=', 'out_refund')]</field> + <field name="context">{'default_move_type': 'out_refund'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a credit note + </p><p> + Note that the easiest way to create a credit note is to do it directly + from the customer invoice. + </p> + </field> + </record> + + <record id="action_move_in_invoice_type" model="ir.actions.act_window"> + <field name="name">Bills</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_in_invoice_tree"/> + <field name="search_view_id" ref="view_account_invoice_filter"/> + <field name="domain">[('move_type', '=', 'in_invoice')]</field> + <field name="context">{'default_move_type': 'in_invoice'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a vendor bill + </p><p> + Create invoices, register payments and keep track of the discussions with your vendors. + </p> + </field> + </record> + + <record id="action_move_in_refund_type" model="ir.actions.act_window"> + <field name="name">Refunds</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_in_invoice_tree"/> + <field name="search_view_id" ref="view_account_invoice_filter"/> + <field name="domain">[('move_type', '=', 'in_refund')]</field> + <field name="context">{'default_move_type': 'in_refund'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a vendor credit note + </p><p> + Note that the easiest way to create a vendor credit note it to do it directly from the vendor bill. + </p> + </field> + </record> + + <record id="action_move_out_receipt_type" model="ir.actions.act_window"> + <field name="name">Receipts</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_invoice_tree"/> + <field name="search_view_id" ref="view_account_invoice_filter"/> + <field name="domain">[('move_type', '=', 'out_receipt')]</field> + <field name="context">{'default_move_type': 'out_receipt'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new sales receipt + </p><p> + When the sale receipt is confirmed, you can record the customer + payment related to this sales receipt. + </p> + </field> + </record> + + <record id="action_move_in_receipt_type" model="ir.actions.act_window"> + <field name="name">Receipts</field> + <field name="res_model">account.move</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="view_in_invoice_tree"/> + <field name="search_view_id" ref="view_account_invoice_filter"/> + <field name="domain">[('move_type', '=', 'in_receipt')]</field> + <field name="context">{'default_move_type': 'in_receipt'}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Register a new purchase receipt + </p><p> + When the purchase receipt is confirmed, you can record the + vendor payment related to this purchase receipt. + </p> + </field> + </record> + + <record id="action_move_line_form" model="ir.actions.act_window"> + <field name="name">Entries</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">account.move</field> + <field name="view_id" ref="view_move_tree"/> + <field name="search_view_id" ref="view_account_move_filter"/> + </record> + + <record model="ir.actions.server" id="action_move_switch_invoice_to_credit_note"> + <field name="name">Switch into refund/credit note</field> + <field name="model_id" ref="account.model_account_move"/> + <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/> + <field name="binding_model_id" ref="account.model_account_move" /> + <field name="state">code</field> + <field name="binding_view_types">form</field> + <field name="code"> +if records: + action = records.action_switch_invoice_into_refund_credit_note() + </field> + </record> + + <record model="ir.actions.server" id="action_check_hash_integrity"> + <field name="name">Data Inalterability Check</field> + <field name="model_id" ref="account.model_res_company"/> + <field name="type">ir.actions.server</field> + <field name="state">code</field> + <field name="code"> + action = env.company._action_check_hash_integrity() + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_onboarding_templates.xml b/addons/account/views/account_onboarding_templates.xml new file mode 100644 index 00000000..67bd9481 --- /dev/null +++ b/addons/account/views/account_onboarding_templates.xml @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <!-- ONBOARDING STEPS --> + <template id="onboarding_invoice_layout_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">Invoice Layout</t> + <t t-set="description">Customize the look of your invoices.</t> + <t t-set="done_icon" t-value="'fa-star'" /> + <t t-set="btn_text">Customize</t> + <t t-set="done_text">Looks great!</t> + <t t-set="method" t-value="'action_open_base_document_layout'" /> + <t t-set="model" t-value="'base.document.layout'" /> + <t t-set="state" t-value="state.get('account_onboarding_invoice_layout_state')" /> + </t> + </template> + <template id="onboarding_create_invoice_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">Create Invoice</t> + <t t-set="description"> + Create your first invoice. + </t> + <t t-set="btn_text">Create</t> + <t t-set="done_text">First invoice sent!</t> + <t t-set="method" t-value="'action_open_account_onboarding_create_invoice'" /> + <t t-set="model" t-value="'res.company'" /> + <t t-set="state" t-value="state.get('account_onboarding_create_invoice_state')" /> + </t> + </template> + <template id="onboarding_bank_account_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">Bank Account</t> + <t t-set="description">Setup your bank account to sync bank feeds.</t> + <t t-set="btn_text">Add a bank</t> + <t t-set="done_text">Step Completed!</t> + <t t-set="method" t-value="'setting_init_bank_account_action'" /> + <t t-set="model" t-value="'res.company'" /> + <t t-set="state" t-value="state.get('account_setup_bank_data_state')" /> + </t> + </template> + <template id="onboarding_fiscal_year_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">Accounting Periods</t> + <t t-set="description">Define your fiscal years & tax returns periodicity.</t> + <t t-set="btn_text">Configure</t> + <t t-set="done_text">Step Completed!</t> + <t t-set="method" t-value="'setting_init_fiscal_year_action'" /> + <t t-set="model" t-value="'res.company'" /> + <t t-set="state" t-value="state.get('account_setup_fy_data_state')" /> + </t> + </template> + <template id="onboarding_chart_of_account_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">Chart of Accounts</t> + <t t-set="description">Setup your chart of accounts and record initial balances.</t> + <t t-set="btn_text">Review</t> + <t t-set="done_text">Chart of account set.</t> + <t t-set="method" t-value="'setting_chart_of_accounts_action'" /> + <t t-set="model" t-value="'res.company'" /> + <t t-set="state" t-value="state.get('account_setup_coa_state')" /> + </t> + </template> + <template id="dashboard_onboarding_bill_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">First Bill</t> + <t t-set="description">Digitalize your vendor bills with OCR and Artificial Intelligence.</t> + <t t-set="btn_text">Let's start!</t> + <t t-set="done_text">All done!</t> + <t t-set="method" t-value="'setting_upload_bill_wizard'"/> + <t t-set="model" t-value="'account.move'"/> + <t t-set="state" t-value="state.get('account_setup_bill_state')"/> + </t> + </template> + <!-- ONBOARDING PANELS --> + <template id="account_invoice_onboarding_panel" name="account.invoice.onboarding.panel"> + <t t-call="base.onboarding_container"> + <t t-set="classes" t-value="'o_onboarding_blue'"/> + <t t-set="bg_image" t-value="'/account/static/src/img/account_invoice_onboarding_bg.jpg'"/> + <t t-set="close_method" t-value="'action_close_account_invoice_onboarding'"/> + <t t-set="close_model" t-value="'res.company'"/> + <t t-set="text_completed">Congratulations! You are all set.</t> + + <t t-call="base.onboarding_company_step" name="company_step" /> + <t t-call="account.onboarding_invoice_layout_step" name="invoice_layout_step" /> + <t t-call="account.onboarding_create_invoice_step" name="create_invoice_step" /> + </t> + </template> + <template id="account_dashboard_onboarding_panel" name="account.dashboard.onboarding.panel"> + <t t-call="base.onboarding_container"> + <t t-set="classes" t-value="'o_onboarding_orange'"/> + <t t-set="bg_image" t-value="'/account/static/src/img/account_dashboard_onboarding_bg.jpg'"/> + <t t-set="close_method" t-value="'action_close_account_dashboard_onboarding'"/> + <t t-set="close_model" t-value="'res.company'"/> + + <t t-call="account.dashboard_onboarding_bill_step" name="company_step" /> + <t t-call="account.onboarding_bank_account_step" name="bank_account_step" /> + <t t-call="account.onboarding_fiscal_year_step" name="fiscal_year_step" /> + <t t-call="account.onboarding_chart_of_account_step" name="chart_of_account_step" /> + </t> + </template> + <!-- SAMPLE INVOICE EMAIL --> + <record id="action_open_account_onboarding_create_invoice" model="ir.actions.act_window"> + <field name="name">Create first invoice</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">account.move</field> + <field name="view_mode">form</field> + <field name="view_id" ref="account.view_move_form" /> + <field name="context">{'default_move_type': 'out_invoice'}</field> + </record> + <!-- SALE TAX --> + <template id="onboarding_sale_tax_step"> + <t t-call="base.onboarding_step"> + <t t-set="title">Taxes</t> + <t t-set="description">Choose a default sales tax for your products.</t> + <t t-set="btn_text">Set taxes</t> + <t t-set="done_text">Step Completed!</t> + <t t-set="method" t-value="'action_open_account_onboarding_sale_tax'" /> + <t t-set="model" t-value="'res.company'" /> + <t t-set="state" t-value="state.get('account_onboarding_sale_tax_state')" /> + </t> + </template> + <record id="account_invoice_onboarding_sale_tax_form" model="ir.ui.view"> + <field name="name">account.invoice.layout.onboarding.form</field> + <field name="model">res.company</field> + <field name="mode">primary</field> + <field name="priority">1000</field> + <field name="arch" type="xml"> + <form> + <div class="mb16">Choose a default sales tax for your products.</div> + <label for="account_sale_tax_id" string="Sales Tax"/> + <field name="account_sale_tax_id" /> + <footer> + <button string="Apply" class="btn btn-primary" type="object" name="action_save_onboarding_sale_tax" /> + <button string="Cancel" class="btn-secondary" special="cancel" /> + </footer> + </form> + </field> + </record> + <record id="action_open_account_onboarding_sale_tax" model="ir.actions.act_window"> + <field name="name">Sales tax</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">res.company</field> + <field name="view_mode">form</field> + <field name="view_id" ref="account_invoice_onboarding_sale_tax_form" /> + <field name="target">new</field> + </record> +</odoo> diff --git a/addons/account/views/account_payment_term_views.xml b/addons/account/views/account_payment_term_views.xml new file mode 100644 index 00000000..2cc6fe9a --- /dev/null +++ b/addons/account/views/account_payment_term_views.xml @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_payment_term_line_tree" model="ir.ui.view"> + <field name="name">account.payment.term.line.tree</field> + <field name="model">account.payment.term.line</field> + <field name="arch" type="xml"> + <tree string="Payment Terms"> + <field name="sequence" widget="handle"/> + <field name="value" string="Due Type"/> + <field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/> + <field name="days"/> + <field name="option" string=""/> + <field name="day_of_the_month" string="Day of the month"/> + </tree> + </field> + </record> + + <record id="view_payment_term_line_form" model="ir.ui.view"> + <field name="name">account.payment.term.line.form</field> + <field name="model">account.payment.term.line</field> + <field name="arch" type="xml"> + <form string="Payment Terms"> + <h2>Term Type</h2> + <group> + <group> + <field name="value" widget="radio"/> + </group> + + <group> + <div attrs="{'invisible':[('value','=', 'balance')]}" class="o_row"> + <label for="value_amount" attrs="{'invisible':[('value','=', 'balance')]}"/> + <field name="value_amount" class="oe_inline"/> + <span class="o_form_label oe_inline" attrs="{'invisible':[('value','!=','percent')]}">%</span> + </div> + </group> + </group> + + <field name="sequence" invisible="1"/> + + <h2>Due Date Computation</h2> + <div colspan="2"> + <label for="days" string="Due" attrs="{'invisible': [('option','!=', 'day_after_invoice_date')]}"/> + <label for="days" string="Due the" attrs="{'invisible': [('option','=', 'day_after_invoice_date')]}"/> + <field name="days" class="oe_inline"/> + <label for="option" string=""/> <!--Empty label to force space between elements--> + <field name="option" class="oe_inline"/> + </div> + <div colspan="2" attrs="{'invisible': [('option','!=', 'day_after_invoice_date')]}"> + <label for="day_of_the_month" string="On the"/> + <field name="day_of_the_month" class="oe_inline"/> + <span class="o_form_label">of the month</span> + </div> + </form> + </field> + </record> + + <record id="view_payment_term_search" model="ir.ui.view"> + <field name="name">account.payment.term.search</field> + <field name="model">account.payment.term</field> + <field name="arch" type="xml"> + <search string="Payment Terms"> + <field name="name" string="Payment Terms"/> + <field name="active"/> + <separator/> + <filter name="archived" string="Archived" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + <record id="view_payment_term_tree" model="ir.ui.view"> + <field name="name">account.payment.term.tree</field> + <field name="model">account.payment.term</field> + <field name="arch" type="xml"> + <tree string="Payment Terms"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="company_id" groups="base.group_multi_company"/> + </tree> + </field> + </record> + + <record id="view_payment_term_form" model="ir.ui.view"> + <field name="name">account.payment.term.form</field> + <field name="model">account.payment.term</field> + <field name="arch" type="xml"> + <form string="Payment Terms"> + <sheet> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <group> + <group> + <field name="active" invisible="1"/> + <field name="name"/> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + </group> + </group> + <label for="note"/> + <field name="note" placeholder="Payment term explanation for the customer..."/> + <separator string="Terms"/> + <p class="text-muted"> + The last line's computation type should be "Balance" to ensure that the whole amount will be allocated. + </p> + <field name="line_ids"/> + </sheet> + </form> + </field> + </record> + + <record id="view_account_payment_term_kanban" model="ir.ui.view"> + <field name="name">account.payment.term.kanban</field> + <field name="model">account.payment.term</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile"> + <field name="name"/> + <field name="note"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_global_click"> + <div><strong class="o_kanban_record_title"><t t-esc="record.name.value"/></strong></div> + <div t-if="record.note.value"><t t-esc="record.note.value"/></div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="action_payment_term_form" model="ir.actions.act_window"> + <field name="name">Payment Terms</field> + <field name="res_model">account.payment.term</field> + <field name="view_mode">tree,kanban,form</field> + <field name="search_view_id" ref="view_payment_term_search"/> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml new file mode 100644 index 00000000..9d1c2422 --- /dev/null +++ b/addons/account/views/account_payment_view.xml @@ -0,0 +1,371 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <!-- VIEWS --> + + <record id="view_account_payment_tree" model="ir.ui.view"> + <field name="name">account.payment.tree</field> + <field name="model">account.payment</field> + <field name="arch" type="xml"> + <tree edit="false" sample="1"> + <header> + <button name="action_post" type="object" string="Confirm"/> + </header> + <field name="date"/> + <field name="name"/> + <field name="journal_id"/> + <field name="payment_method_id"/> + <field name="partner_id" string="Customer"/> + <field name="company_id" groups="base.group_multi_company"/> + <field name="amount" sum="Amount"/> + <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/> + <field name="currency_id" groups="base.group_multi_currency"/> + </tree> + </field> + </record> + + <record id="view_account_supplier_payment_tree" model="ir.ui.view"> + <field name="name">account.supplier.payment.tree</field> + <field name="model">account.payment</field> + <field name="inherit_id" ref="account.view_account_payment_tree"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <field name="partner_id" position="attributes"> + <attribute name="string">Vendor</attribute> + </field> + </field> + </record> + + <record id="view_account_payment_kanban" model="ir.ui.view"> + <field name="name">account.payment.kanban</field> + <field name="model">account.payment</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile" create="0" group_create="0" sample="1"> + <field name="name"/> + <field name="partner_id"/> + <field name="date"/> + <field name="state"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_global_click"> + <div class="row mb4"> + <div class="col-6"> + <strong><span><field name="name"/></span></strong> + </div> + <div class="col-6 text-right"> + <strong><i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/> <t t-esc="record.date.value"/></strong> + </div> + </div> + <div class="row"> + <div class="col-12"> + <span><field name="partner_id"/></span> + </div> + </div> + <div class="row"> + <div class="col-6"> + <field name="amount" widget='monetary'/> + <field name="currency_id" invisible="1"/> + </div> + <div class="col-6"> + <span class="float-right"> + <field name="state" widget="label_selection" options="{'classes': {'draft': 'secondary', 'sent': 'success'}}"/> + </span> + </div> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_account_payment_search" model="ir.ui.view"> + <field name="name">account.payment.search</field> + <field name="model">account.payment</field> + <field name="arch" type="xml"> + <search string="Payments"> + <field name="name" string="Payment" + filter_domain="['|', '|', ('name', 'ilike', self), ('partner_id', 'ilike', self), ('ref', 'ilike', self)]"/> + <field name="partner_id" string="Customer/Vendor"/> + <field name="journal_id"/> + <field name="is_internal_transfer"/> + <separator/> + <filter string="Customer Payments" + name="inbound_filter" + domain="[('partner_type', '=', 'customer'), ('is_internal_transfer', '=', False)]"/> + <filter string="Vendor Payments" + name="outbound_filter" + domain="[('partner_type', '=', 'supplier'), ('is_internal_transfer', '=', False)]"/> + <filter string="Transfers" name="transfers_filter" domain="[('is_internal_transfer', '=', True)]"/> + <separator/> + <filter string="Draft" name="state_draft" domain="[('state', '=', 'draft')]"/> + <filter string="Posted" name="state_posted" domain="[('state', '=', 'posted')]"/> + <separator/> + <filter string="Sent" name="state_sent" domain="[('is_move_sent', '=', True)]"/> + <filter string="Bank Matched" name="matched" domain="[('is_matched', '=', True)]"/> + <filter string="Reconciled" name="reconciled" domain="[('is_reconciled', '=', True)]"/> + <separator/> + <filter string="Payment Date" name="date" date="date"/> + <separator/> + <field name="company_id" groups="base.group_multi_company"/> + <filter string="Customer/Vendor" name="partner" domain="[]" context="{'group_by': 'partner_id'}"/> + <filter string="Journal" name="journal" domain="[]" context="{'group_by': 'journal_id'}"/> + <filter string="Payment Method" name="paymentmethod" domain="[]" context="{'group_by': 'payment_method_id'}"/> + <filter string="Status" name="state" domain="[]" context="{'group_by': 'state'}"/> + <filter string="Payment Date" name="groupby_date" domain="[]" context="{'group_by': 'date'}"/> + <filter string="Currency" name="currency" domain="[]" context="{'group_by': 'currency_id'}" groups="base.group_multi_currency"/> + <filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/> + <separator/> + <filter invisible="1" string="Late Activities" name="activities_overdue" + domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]" + help="Show all records which has next action date is before today"/> + <filter invisible="1" string="Today Activities" name="activities_today" + domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/> + <filter invisible="1" string="Future Activities" name="activities_upcoming_all" + domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/> + </search> + </field> + </record> + + <record id="view_account_payment_form" model="ir.ui.view"> + <field name="name">account.payment.form</field> + <field name="model">account.payment</field> + <field name="arch" type="xml"> + <form string="Register Payment"> + <header> + <button name="action_post" string="Confirm" type="object" class="oe_highlight" + attrs="{'invisible': [('state', '!=', 'draft')]}"/> + <button name="action_draft" string="Reset To Draft" type="object" class="btn btn-secondary" + attrs="{'invisible': [('state', 'not in', ('posted', 'cancel'))]}" + groups="account.group_account_invoice"/> + <button name="action_cancel" string="Cancel" type="object" + attrs="{'invisible': [('state', '!=', 'draft')]}"/> + <button name="mark_as_sent" string="Mark as Sent" type="object" + attrs="{'invisible': ['|', '|', ('state', '!=', 'posted'), ('is_move_sent', '=', True), ('payment_method_code', '!=', 'manual')]}"/> + <button name="unmark_as_sent" string="Unmark as Sent" type="object" + attrs="{'invisible': ['|', '|', ('state', '!=', 'posted'), ('is_move_sent', '=', False), ('payment_method_code', '!=', 'manual')]}"/> + <field name="state" widget="statusbar" statusbar_visible="draft,posted"/> + </header> + + <sheet> + <!-- Invisible fields --> + <field name="id" invisible="1"/> + <field name="is_move_sent" invisible="1"/> + <field name="is_reconciled" invisible="1"/> + <field name="is_matched" invisible="1"/> + <field name="payment_method_code" invisible="1"/> + <field name="show_partner_bank_account" invisible="1"/> + <field name="require_partner_bank_account" invisible="1"/> + <field name="hide_payment_method" invisible="1"/> + <field name="available_payment_method_ids" invisible="1"/> + <field name="suitable_journal_ids" invisible="1"/> + <field name="country_code" invisible="1"/> + + <div class="oe_button_box" name="button_box"> + <!-- Invoice stat button --> + <button name="button_open_invoices" type="object" + class="oe_stat_button" icon="fa-bars" + attrs="{'invisible': [('reconciled_invoices_count','=', 0)]}"> + <field name="reconciled_invoices_count"/> + <span attrs="{'invisible': [('reconciled_invoices_count','>', 1)]}">Invoice</span> + <span attrs="{'invisible': [('reconciled_invoices_count','<=', 1)]}">Invoices</span> + </button> + + <!-- Bill stat button --> + <button name="button_open_bills" type="object" + class="oe_stat_button" icon="fa-bars" + attrs="{'invisible': [('reconciled_bills_count','=', 0)]}"> + <field name="reconciled_bills_count"/> + <span attrs="{'invisible': [('reconciled_bills_count','>', 1)]}">Bill</span> + <span attrs="{'invisible': [('reconciled_bills_count','<=', 1)]}">Bills</span> + </button> + + <!-- Statement stat button --> + <button name="button_open_statements" type="object" + class="oe_stat_button" icon="fa-bars" + attrs="{'invisible': [('reconciled_statements_count','=', 0)]}"> + <field name="reconciled_statements_count"/> + <span attrs="{'invisible': [('reconciled_statements_count','>', 1)]}">Statement</span> + <span attrs="{'invisible': [('reconciled_statements_count','<=', 1)]}">Statements</span> + </button> + </div> + + <widget name="web_ribbon" text="Invoicing App Legacy" + bg_color="bg-info" + attrs="{'invisible': [('state', '!=', 'invoicing_legacy')]}" + tooltip="This payment has been generated through the Invoicing app, before installing Accounting. It has been disabled by the 'Invoicing Switch Threshold Date' setting so that it does not impact your accounting." + /> + + <div class="oe_title" attrs="{'invisible': [('state', '=', 'draft')]}"> + <h1><field name="name" attrs="{'readonly': [('state', '!=', 'draft')]}"/></h1> + </div> + + <group> + <group name="group1"> + <field name="payment_type" widget="radio" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + <field name="partner_type" widget="selection" + attrs="{'readonly': [('state', '!=', 'draft')], 'invisible': [('is_internal_transfer', '=', True)]}"/> + <field name="partner_id" context="{'default_is_company': True}" + attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('is_internal_transfer', '=', True)]}"/> + <field name="destination_account_id" + options="{'no_create': True}" required="1" + attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('is_internal_transfer', '=', True)]}"/> + <field name="is_internal_transfer" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + <field name="company_id" groups="base.group_multi_company"/> + </group> + <group name="group2"> + <field name="journal_id" + widget="selection" + domain="[('type', 'in', ('bank', 'cash'))]" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + <field name="payment_method_id" widget="radio" + required="1" + attrs="{'readonly': [('state', '!=', 'draft')], 'invisible': [('hide_payment_method', '=', True)]}"/> + <field name="partner_bank_id" context="{'default_partner_id': partner_id}" + attrs="{'invisible': [('show_partner_bank_account', '=', False)], 'required': [('require_partner_bank_account', '=', True)], 'readonly': [('state', '!=', 'draft')]}"/> + + <!-- /!\ Required due to the _inherits but must not be required when saving a new + record. Using 'required': [('id', '!=', False)] is not working due to the groups set on + the field. + --> + <field name="move_id" + required="0" + attrs="{'invisible': [('id', '=', False)]}" + groups="account.group_account_readonly"/> + </group> + <group name="group3"> + <label for="amount"/> + <div name="amount_div" class="o_row"> + <field name="amount" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + <field name="currency_id" + options="{'no_create': True, 'no_open': True}" + required="1" + attrs="{'readonly': [('state', '!=', 'draft')]}" + groups="base.group_multi_currency"/> + </div> + <field name="date" + attrs="{'readonly': [('state', '!=', 'draft')]}"/> + <field name="ref" string="Memo"/> + </group> + + <group> + <field name="qr_code" invisible="1"/> + <div attrs="{'invisible': [('qr_code', '=', False)]}" colspan="2" class="text-center"> + <field name="qr_code" widget="html"/> + </div> + </group> + </group> + </sheet> + <div class="o_attachment_preview"/> + <div class="oe_chatter"> + <field name="message_follower_ids" groups="base.group_user"/> + <field name="activity_ids"/> + <field name="message_ids"/> + </div> + </form> + </field> + </record> + + <record id="view_account_payment_graph" model="ir.ui.view"> + <field name="name">account.payment.graph</field> + <field name="model">account.payment</field> + <field name="arch" type="xml"> + <graph string="Invoices" type="bar" stacked="1" sample="1"> + <field name="payment_type"/> + <field name="journal_id"/> + <field name="amount" type="measure"/> + </graph> + </field> + </record> + + <!-- ACTIONS --> + + <record id="action_account_payments" model="ir.actions.act_window"> + <field name="name">Payments</field> + <field name="res_model">account.payment</field> + <field name="view_mode">tree,kanban,form,graph</field> + <field name="context">{ + 'default_payment_type': 'inbound', + 'default_partner_type': 'customer', + 'search_default_inbound_filter': 1, + 'default_move_journal_types': ('bank', 'cash'), + }</field> + <field name="view_id" ref="view_account_payment_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Register a payment + </p><p> + Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities. + </p> + </field> + </record> + + <record id="action_account_payments_payable" model="ir.actions.act_window"> + <field name="name">Payments</field> + <field name="res_model">account.payment</field> + <field name="view_mode">tree,kanban,form,graph</field> + <field name="context">{ + 'default_payment_type': 'outbound', + 'default_partner_type': 'supplier', + 'search_default_outbound_filter': 1, + 'default_move_journal_types': ('bank', 'cash'), + }</field> + <field name="view_id" ref="view_account_supplier_payment_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Register a payment + </p><p> + Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities. + </p> + </field> + </record> + + <record id="action_account_payments_transfer" model="ir.actions.act_window"> + <field name="name">Internal Transfers</field> + <field name="res_model">account.payment</field> + <field name="view_mode">tree,kanban,form,graph</field> + <field name="context">{'default_payment_type': 'outbound', 'search_default_transfers_filter': 1}</field> + <field name="domain">[]</field> + <field name="view_id" ref="view_account_supplier_payment_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Register a payment + </p><p> + Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities. + </p> + </field> + </record> + + <record id="action_account_invoice_from_list" model="ir.actions.server"> + <field name="name">Register Payment</field> + <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/> + <field name="model_id" ref="account.model_account_move"/> + <field name="binding_model_id" ref="account.model_account_move"/> + <field name="binding_view_types">list</field> + <field name="state">code</field> + <field name="code"> + if records: + action = records.action_register_payment() + </field> + </record> + + <!-- Action confirm_payments for multi --> + <record id="action_account_confirm_payments" model="ir.actions.server"> + <field name="name">Post Payments</field> + <field name="type">ir.actions.server</field> + <field name="state">code</field> + <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/> + <field name="model_id" ref="account.model_account_payment"/> + <field name="binding_model_id" ref="account.model_account_payment"/> + <field name="binding_view_types">list</field> + <field name="code"> + records.action_post() + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml new file mode 100644 index 00000000..04d4af64 --- /dev/null +++ b/addons/account/views/account_portal_templates.xml @@ -0,0 +1,175 @@ +<odoo> + <template id="portal_my_home_menu_invoice" name="Portal layout : invoice menu entries" inherit_id="portal.portal_breadcrumbs" priority="30"> + <xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside"> + <li t-if="page_name == 'invoice'" t-attf-class="breadcrumb-item #{'active ' if not invoice else ''}"> + <a t-if="invoice" t-attf-href="/my/invoices?{{ keep_query() }}">Invoices & Bills</a> + <t t-else="">Invoices & Bills</t> + </li> + <li t-if="invoice" class="breadcrumb-item active"> + <t t-esc="invoice.name" t-if="invoice.name != '/'"/> + <t t-else=""><em>Draft Invoice</em></t> + </li> + </xpath> + </template> + + <template id="portal_my_home_invoice" name="Show Invoices & Bills" inherit_id="portal.portal_my_home" customize_show="True" priority="30"> + <xpath expr="//div[hasclass('o_portal_docs')]" position="inside"> + <t t-call="portal.portal_docs_entry"> + <t t-set="title">Invoices & Bills</t> + <t t-set="url" t-value="'/my/invoices'"/> + <t t-set="placeholder_count" t-value="'invoice_count'"/> + </t> + </xpath> + </template> + + <template id="portal_my_invoices" name="My Invoices and Payments"> + <t t-call="portal.portal_layout"> + <t t-set="breadcrumbs_searchbar" t-value="True"/> + + <t t-call="portal.portal_searchbar"> + <t t-set="title">Invoices</t> + </t> + <t t-if="not invoices"> + <p>There are currently no invoices and payments for your account.</p> + </t> + <t t-if="invoices" t-call="portal.portal_table"> + <thead> + <tr class="active"> + <th>Invoice #</th> + <th>Invoice Date</th> + <th class='d-none d-md-table-cell'>Due Date</th> + <th/> + <th class="text-right">Amount Due</th> + </tr> + </thead> + <tbody> + <t t-foreach="invoices" t-as="invoice"> + <tr> + <td> + <a t-att-href="invoice.get_portal_url()" t-att-title="invoice.name"> + <t t-esc="invoice.name" t-if="invoice.name != '/'"/> + <em t-else="">Draft Invoice</em> + </a> + </td> + <td><span t-field="invoice.invoice_date"/></td> + <td class='d-none d-md-table-cell'><span t-field="invoice.invoice_date_due"/></td> + <td class="tx_status"> + <t t-if="invoice.state == 'posted' and invoice.payment_state not in ('in_payment', 'paid', 'reversed')"> + <span class="badge badge-pill badge-info"><i class="fa fa-fw fa-clock-o" aria-label="Opened" title="Opened" role="img"></i><span class="d-none d-md-inline"> Waiting for Payment</span></span> + </t> + <t t-if="invoice.state == 'posted' and invoice.payment_state in ('paid', 'in_payment')"> + <span class="badge badge-pill badge-success"><i class="fa fa-fw fa-check" aria-label="Paid" title="Paid" role="img"></i><span class="d-none d-md-inline"> Paid</span></span> + </t> + <t t-if="invoice.state == 'posted' and invoice.payment_state == 'reversed'"> + <span class="badge badge-pill badge-success"><i class="fa fa-fw fa-check" aria-label="Reversed" title="Reversed" role="img"></i><span class="d-none d-md-inline"> Reversed</span></span> + </t> + <t t-if="invoice.state == 'cancel'"> + <span class="badge badge-pill badge-warning"><i class="fa fa-fw fa-remove" aria-label="Cancelled" title="Cancelled" role="img"></i><span class="d-none d-md-inline"> Cancelled</span></span> + </t> + </td> + <td class="text-right"><span t-esc="-invoice.amount_residual if invoice.move_type == 'out_refund' else invoice.amount_residual" t-options='{"widget": "monetary", "display_currency": invoice.currency_id}'/></td> + </tr> + </t> + </tbody> + </t> + </t> + </template> + + <template id="portal_invoice_page" name="Invoice Portal Template" inherit_id="portal.portal_sidebar" primary="True"> + <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside"> + <t t-set="o_portal_fullwidth_alert" groups="sales_team.group_sale_salesman,account.group_account_invoice,account.group_account_readonly"> + <t t-call="portal.portal_back_in_edit_mode"> + <t t-set="backend_url" t-value="'/web#model=%s&id=%s&action=%s&view_type=form' % (invoice._name, invoice.id, invoice.env.ref('account.action_move_out_invoice_type').id)"/> + </t> + </t> + + <div class="row mt16 o_portal_invoice_sidebar"> + <!-- Sidebar --> + <t t-call="portal.portal_record_sidebar"> + <t t-set="classes" t-value="'col-lg-auto d-print-none'"/> + <t t-set="title"> + <h2 class="mb-0"> + <b t-if="invoice.amount_residual > 0" t-field="invoice.amount_residual"/> + <b t-else="1" t-field="invoice.amount_total"/> + </h2> + <div class="small" t-if="invoice.payment_state not in ('paid', 'in_payment') and invoice.move_type == 'out_invoice'"><i class="fa fa-clock-o"/><span class="o_portal_sidebar_timeago ml4" t-att-datetime="invoice.invoice_date_due"/></div> + </t> + + <t t-set="entries"> + <ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column"> + <li class="list-group-item flex-grow-1"> + <div class="o_download_pdf btn-toolbar flex-sm-nowrap"> + <div class="btn-group flex-grow-1 mr-1 mb-1"> + <a class="btn btn-secondary btn-block o_download_btn" t-att-href="invoice.get_portal_url(report_type='pdf', download=True)" title="Download"><i class="fa fa-download"/> Download</a> + </div> + <div class="btn-group flex-grow-1 mb-1"> + <a class="btn btn-secondary btn-block o_print_btn o_portal_invoice_print" t-att-href="invoice.get_portal_url(report_type='pdf')" id="print_invoice_report" title="Print" target="_blank"><i class="fa fa-print"/> Print</a> + </div> + </div> + </li> + <li t-if="invoice.invoice_user_id" class="list-group-item flex-grow-1"> + <div class="small mb-1"><strong class="text-muted"> + <t t-if="invoice.move_type == 'out_invoice'"> + Salesperson + </t> + <t t-if="invoice.move_type == 'in_invoice'"> + Purchase Representative + </t> + </strong></div> + <div class="row"> + <div class="col flex-grow-0 pr-2"> + <img t-if="invoice.invoice_user_id.image_1024" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(invoice.invoice_user_id.image_1024)" alt="Contact"/> + <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact"/> + </div> + <div class="col pl-0"> + <span t-field="invoice.invoice_user_id" t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True}'/> + <a href="#discussion" class="small"><i class="fa fa-fw fa-comments"/><b>Send message</b></a> + </div> + </div> + </li> + </ul> + </t> + </t> + + <!-- Page Content --> + <div id="invoice_content" class="col-12 col-lg"> + <t t-if="error or warning" t-call="account.portal_invoice_error"/> + <t t-if="success and (not error and not warning)" t-call="account.portal_invoice_success"/> + + <div class="o_portal_html_view shadow p-3"> + <div class="o_portal_html_loader text-center"> + <i class="fa fa-circle-o-notch fa-spin fa-2x fa-fw text-black-50"></i> + </div> + <iframe id="invoice_html" class="mt8 mb8" width="100%" height="100%" frameborder="0" scrolling="no" t-att-src="invoice.get_portal_url(report_type='html')"/> + </div> + <!-- chatter --> + <div id="invoice_communication" class="mt-4"> + <h2>History</h2> + <t t-call="portal.message_thread"> + <t t-set="object" t-value="invoice"/> + </t> + </div> + </div> + </div> + </xpath> + </template> + + <template id="portal_invoice_error" name="Invoice error/warning display"> + <div class="row mr16"> + <div t-attf-class="'col-lg-12 mr16 ml16 alert alert-dismissable' #{'alert-danger' if error else 'alert-warning'}" role="alert"> + <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a> + <t t-if="error == 'generic'" name="generic"> + There was an error processing this page. + </t> + </div> + </div> + </template> + + <template id="portal_invoice_success" name="Invoice success display"> + <div class="row mr16"> + <div class="col-lg-12 mr16 ml16 alert alert-dismissable alert-success" role="status"> + <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a> + </div> + </div> + </template> +</odoo> diff --git a/addons/account/views/account_reconcile_model_views.xml b/addons/account/views/account_reconcile_model_views.xml new file mode 100644 index 00000000..ae7883fc --- /dev/null +++ b/addons/account/views/account_reconcile_model_views.xml @@ -0,0 +1,241 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_account_reconcile_model_line_form" model="ir.ui.view"> + <field name="name">account.reconcile.model.line.form</field> + <field name="model">account.reconcile.model.line</field> + <field name="arch" type="xml"> + <form> + <field name="model_id" invisible="1"/> + <field name="match_total_amount" invisible="1"/> + <field name="match_total_amount_param" invisible="1"/> + <field name="rule_type" invisible="1"/> + <group> + <group> + <field name="account_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" + attrs="{'required': ['|', ('rule_type', '!=', 'invoice_matching'), '&', '&', ('rule_type', '=', 'invoice_matching'), ('match_total_amount', '=', True), ('match_total_amount_param', '!=', 100.0)]}"/> + <field name="amount_type"/> + <field name="tax_ids" + domain="[('company_id', '=', company_id)]" + options="{'no_create': True}" + context="{'append_type_to_tax_name': True}" + widget="many2many_tags"/> + <field name="show_force_tax_included" invisible="1"/> + <field name="force_tax_included" + attrs="{'invisible': [('show_force_tax_included', '=', False)]}" force_save="1"/> + <field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" groups="analytic.group_analytic_accounting"/> + <field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/> + <field name="company_id" invisible="1"/> + </group> + <group> + <field name="label"/> + <label for="amount_string"/> + <div> + <field name="amount_string" class="oe_inline"/> + <span class="o_form_label oe_inline" attrs="{'invisible':[('amount_type','!=','percentage')]}">%</span> + </div> + </group> + </group> + </form> + </field> + </record> + + <record id="view_account_reconcile_model_tree" model="ir.ui.view"> + <field name="name">account.reconcile.model.tree</field> + <field name="model">account.reconcile.model</field> + <field name="arch" type="xml"> + <tree string="Bank Reconciliation Move Presets"> + <field name="sequence" widget="handle" /> + <field name="name"/> + <field name="rule_type"/> + <field name="auto_reconcile"/> + </tree> + </field> + </record> + + <record id="view_account_reconcile_model_form" model="ir.ui.view"> + <field name="name">account.reconcile.model.form</field> + <field name="model">account.reconcile.model</field> + <field name="arch" type="xml"> + <form string="Operation Templates"> + <field name="active" invisible="1"/> + <sheet> + <div class="oe_button_box" name="button_box"> + <button type="object" name="action_reconcile_stat" + class="oe_stat_button" icon="fa-book"> + <field name="number_entries" string="Journal Entries" widget="statinfo"/> + </button> + </div> + <div class="oe_title"> + <label for="name" class="oe_edit_only"/> + <h1><field name="name" placeholder="e.g. Bank Fees"/></h1> + </div> + <group> + <group> + <field name="rule_type" widget="radio"/> + <field name="company_id" groups="base.group_multi_company"/> + </group> + <group> + <field name="auto_reconcile" attrs="{'invisible': [('rule_type', '=', 'writeoff_button')]}"/> + <field name="to_check" attrs="{'invisible': [('rule_type', '!=', 'writeoff_button')]}"/> + <field name="past_months_limit" attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"/> + <field name="matching_order" attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"/> + </group> + </group> + <group string="Conditions on Bank Statement Line"> + <group> + <field name="match_journal_ids" + options="{'no_create': True}" + widget="many2many_tags"/> + <field name="match_nature" widget="radio" + attrs="{'invisible': [('rule_type', '=', 'writeoff_button')]}"/> + </group> + <group attrs="{'invisible': [('rule_type', '=', 'writeoff_button')]}"> + <label for="match_amount"/> + <div> + <field name="match_amount" style="width: 30% !important" class="oe_inline"/> + <span class="o_form_label" style="width: 2% !important"> </span> <!-- Make a little space. --> + <field name="match_amount_min" style="width: 30% !important;" class="oe_inline" + attrs="{'invisible': [('match_amount', 'in', (False, 'lower'))], 'required': [('match_amount', '!=', False)]}"/> + <span class="o_form_label" + attrs="{'invisible': [('match_amount', '!=', 'between')]}">and</span> + <field name="match_amount_max" style="width: 30% !important;" class="oe_inline" + attrs="{'invisible': [('match_amount', 'in', (False, 'greater'))], 'required': [('match_amount', '=', 'between')]}"/> + </div> + <label for="match_label"/> + <div> + <field name="match_label" style="width: 30% !important" class="oe_inline"/> + <span class="o_form_label" style="width: 2% !important"> </span> <!-- Make a little space. --> + <field name="match_label_param" style="width: 68% !important;" class="oe_inline" + attrs="{'invisible': [('match_label', '=', False)], 'required': [('match_label', '!=', False)]}"/> + </div> + <label for="match_note"/> + <div> + <field name="match_note" style="width: 30% !important" class="oe_inline"/> + <span class="o_form_label" style="width: 2% !important"> </span> <!-- Make a little space. --> + <field name="match_note_param" style="width: 68% !important;" class="oe_inline" + attrs="{'invisible': [('match_note', '=', False)], 'required': [('match_note', '!=', False)]}"/> + </div> + <label for="match_transaction_type"/> + <div> + <field name="match_transaction_type" style="width: 30% !important" class="oe_inline"/> + <span class="o_form_label" style="width: 2% !important"> </span> <!-- Make a little space. --> + <field name="match_transaction_type_param" style="width: 68% !important;" class="oe_inline" + attrs="{'invisible': [('match_transaction_type', '=', False)], 'required': [('match_transaction_type', '!=', False)]}"/> + </div> + <field name="match_same_currency" attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"/> + + <label for="match_total_amount" attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"/> + <div attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"> + <field name="match_total_amount" class="oe_inline"/> + <field name="match_total_amount_param" class="oe_inline" + attrs="{'invisible': [('match_total_amount', '=', False)]}"/> + <span class="o_form_label oe_inline" + attrs="{'invisible': [('match_total_amount', '=', False)]}">%</span> + <div class="text-muted" attrs="{'invisible': [('match_total_amount', '=', False)]}"> + This parameter will be bypassed in case of a statement line communication matching exactly existing entries + </div> + </div> + </group> + <group attrs="{'invisible': [('rule_type', '=', 'writeoff_button')]}"> + <field name="match_partner" + attrs="{'invisible': [('rule_type', '!=', 'writeoff_suggestion')]}"/> + <field name="match_partner" + string="Partner Is Set & Matches" + attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"/> + <label for="match_partner_ids" class="ml16" + attrs="{'invisible': [('match_partner', '=', False)]}"/> + <field name="match_partner_ids" nolabel="1" + widget="many2many_tags" + attrs="{'invisible': [('match_partner', '=', False)]}"/> + <label for="match_partner_category_ids" class="ml16" + attrs="{'invisible': [('match_partner', '=', False)]}"/> + <field name="match_partner_category_ids" nolabel="1" + widget="many2many_tags" + attrs="{'invisible': [('match_partner', '=', False)]}"/> + </group> + <group attrs="{'invisible': [('rule_type', '!=', 'invoice_matching')]}"> + <label for="match_text_location_label" string="Match Invoice/bill with"/> + <div> + <span class="o_form_label" style="width: 2% !important"> </span> + <label for="match_text_location_label" string="Label"/> + <field name="match_text_location_label"/> + <span class="o_form_label" style="width: 2% !important"> </span> + <label for="match_text_location_note" string="Note"/> + <field name="match_text_location_note"/> + <span class="o_form_label" style="width: 2% !important"> </span> + <label for="match_text_location_reference" string="Reference"/> + <field name="match_text_location_reference"/> + </div> + </group> + </group> + <group string="Counterpart Values" + attrs="{'invisible': [('rule_type', '=', 'invoice_matching'), '|', ('match_total_amount', '=', False), '&', ('match_total_amount', '=', True), ('match_total_amount_param', '=', 100.0)]}"> + <group> + <field name="show_decimal_separator" invisible="1"/> + <field name="decimal_separator" attrs="{'invisible': [('show_decimal_separator', '=', False)]}" groups="base.group_no_one"/> + </group> + <field name="line_ids" default="{'default_model_id': self, 'default_company_id': self.company_id}" nolabel="1"> + <tree editable="bottom"> + <field name="account_id"/> + <field name="amount_type"/> + <field name="journal_id" attrs="{'column_invisible': [('parent.rule_type', '!=', 'writeoff_button')]}"/> + <field name="amount_string"/> + <field name="tax_ids" widget="many2many_tags"/> + <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/> + <field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/> + <field name="show_force_tax_included" invisible="1"/> + <field name="force_tax_included" attrs="{'invisible': [('show_force_tax_included', '=', False)]}" widget="boolean_toggle"/> + <field name="company_id" invisible="1"/> + <field name="label"/> + </tree> + </field> + </group> + + <group string="Partner Mapping" attrs="{'invisible': [('rule_type', 'not in', ('invoice_matching', 'writeoff_suggestion'))]}"> + <field name="partner_mapping_line_ids" nolabel="1"> + <tree editable="bottom"> + <field name="payment_ref_regex" attrs="{'required': [('narration_regex', '=', False)]}"/> + <field name="narration_regex" attrs="{'required': [('payment_ref_regex', '=', False)]}"/> + <field name="partner_id"/> + </tree> + </field> + </group> + + </sheet> + </form> + </field> + </record> + + <record id="view_account_reconcile_model_search" model="ir.ui.view"> + <field name="name">account.reconcile.model.search</field> + <field name="model">account.reconcile.model</field> + <field name="arch" type="xml"> + <search string="Bank Reconciliation Move preset"> + <filter string="With tax" name="withtax" domain="[('line_ids.tax_ids', '!=', False)]"/> + <filter string="Auto Reconcile" name="auto_reconcile" domain="[('auto_reconcile', '=', True)]"/> + <field name="rule_type"/> + <separator/> + <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + <record id="action_account_reconcile_model" model="ir.actions.act_window"> + <field name="name">Reconciliation Models</field> + <field name="res_model">account.reconcile.model</field> + <field name="view_mode">tree,form</field> + <field name="search_view_id" ref="view_account_reconcile_model_search"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new reconciliation model + </p><p> + Those can be used to quickly create a journal items when reconciling + a bank statement or an account. + </p> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_report.xml b/addons/account/views/account_report.xml new file mode 100644 index 00000000..2443829a --- /dev/null +++ b/addons/account/views/account_report.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <!-- QWeb Reports --> + <record id="account_invoices" model="ir.actions.report"> + <field name="name">Invoices</field> + <field name="model">account.move</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_invoice_with_payments</field> + <field name="report_file">account.report_invoice_with_payments</field> + <field name="print_report_name">(object._get_report_base_filename())</field> + <field name="attachment">(object.state == 'posted') and ((object.name or 'INV').replace('/','_')+'.pdf')</field> + <field name="binding_model_id" ref="model_account_move"/> + <field name="binding_type">report</field> + <field name="groups_id" eval="[(4, ref('account.group_account_invoice')), + (4, ref('account.group_account_readonly'))]"/> + </record> + + <record id="action_account_original_vendor_bill" model="ir.actions.report"> + <field name="name">Original Bills</field> + <field name="model">account.move</field> + <field name="binding_model_id" ref="model_account_move"/> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_original_vendor_bill</field> + <field name="report_file">account.report_original_vendor_bill</field> + <field name="attachment">'original_vendor_bill.pdf'</field> + <field name="attachment_use">True</field> + <field name="binding_view_types">list</field> + </record> + + <record id="account_invoices_without_payment" model="ir.actions.report"> + <field name="name">Invoices without Payment</field> + <field name="model">account.move</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_invoice</field> + <field name="report_file">account.report_invoice</field> + <field name="print_report_name">(object._get_report_base_filename())</field> + <field name="attachment">(object.state == 'posted') and ((object.name or 'INV').replace('/','_')+'.pdf')</field> + <field name="binding_model_id" ref="model_account_move"/> + <field name="binding_type">report</field> + </record> + + <record id="action_report_journal" model="ir.actions.report"> + <field name="name">Journals Audit</field> + <field name="model">account.common.journal.report</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_journal</field> + <field name="report_file">account.report_journal</field> + <field name="binding_model_id" ref="model_account_common_journal_report"/> + <field name="binding_type">report</field> + </record> + + <record id="action_report_payment_receipt" model="ir.actions.report"> + <field name="name">Payment Receipt</field> + <field name="model">account.payment</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_payment_receipt</field> + <field name="report_file">account.report_payment_receipt</field> + <field name="binding_model_id" ref="model_account_payment"/> + <field name="binding_type">report</field> + </record> + + <record id="action_report_account_statement" model="ir.actions.report"> + <field name="name">Statement</field> + <field name="model">account.bank.statement</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_statement</field> + <field name="report_file">account.report_statement</field> + <field name="binding_model_id" ref="model_account_bank_statement"/> + <field name="binding_type">report</field> + </record> + + <record id="action_report_account_hash_integrity" model="ir.actions.report"> + <field name="name">Hash integrity result PDF</field> + <field name="model">res.company</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">account.report_hash_integrity</field> + <field name="report_file">account.report_hash_integrity</field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_tax_report_views.xml b/addons/account/views/account_tax_report_views.xml new file mode 100644 index 00000000..26737629 --- /dev/null +++ b/addons/account/views/account_tax_report_views.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="account_tax_report_tree" model="ir.ui.view"> + <field name="name">account.tax.report.tree</field> + <field name="model">account.tax.report</field> + <field name="arch" type="xml"> + <tree> + <field name="name"/> + <field name="country_id"/> + </tree> + </field> + </record> + + <record id="account_tax_report_line_tree" model="ir.ui.view"> + <field name="name">account.tax.report.line.tree</field> + <field name="model">account.tax.report.line</field> + <field name="arch" type="xml"> + <tree create="1" delete="1"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="tag_name"/> + <field name="code"/> + <field name="formula"/> + </tree> + </field> + </record> + + <record id="account_tax_report_form" model="ir.ui.view"> + <field name="name">account.tax.report.form</field> + <field name="model">account.tax.report</field> + <field name="arch" type="xml"> + <form> + <sheet> + <group> + <group> + <field name="name"/> + </group> + <group> + <field name="country_id"/> + </group> + </group> + + <field name="id" invisible="1"/> + <field name="root_line_ids" context="{'default_report_id': id}"/> + </sheet> + </form> + </field> + </record> + + <record id="account_tax_report_line_form" model="ir.ui.view"> + <field name="name">account.tax.report.line.form</field> + <field name="model">account.tax.report.line</field> + <field name="arch" type="xml"> + <form> + <sheet> + <group> + <group> + <field name="sequence" invisible="1"/> + <field name="name"/> + <field name="tag_name"/> + </group> + <group> + <field name="report_id" invisible="1"/> + <field name="parent_id" readonly="1"/> + <field name="code"/> + </group> + </group> + <group> + <field name="formula"/> + </group> + <group string="Sublines"> + <field name="children_line_ids" context="{'default_report_id': report_id}"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="account_tax_report_search" model="ir.ui.view"> + <field name="name">account.tax.report.search</field> + <field name="model">account.tax.report</field> + <field name="arch" type="xml"> + <search> + <group expand="0" string="Group By"> + <field name="name"/> + <field name="country_id"/> + </group> + </search> + </field> + </record> + + <record id="action_configure_tax_report" model="ir.actions.act_window"> + <field name="name">Tax Reports</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">account.tax.report</field> + <field name="view_mode">tree,form</field> + <field name="view_id" ref="account_tax_report_tree"/> + </record> + + </data> +</odoo> diff --git a/addons/account/views/account_tax_views.xml b/addons/account/views/account_tax_views.xml new file mode 100644 index 00000000..26862d82 --- /dev/null +++ b/addons/account/views/account_tax_views.xml @@ -0,0 +1,208 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_tax_tree" model="ir.ui.view"> + <field name="name">account.tax.tree</field> + <field name="model">account.tax</field> + <field name="arch" type="xml"> + <tree string="Account Tax" decoration-muted="not active"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="type_tax_use"/> + <field name="tax_scope"/> + <field name="description"/> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + <field name="active" widget="boolean_toggle"/> + </tree> + </field> + </record> + + <record id="tax_repartition_line_tree" model="ir.ui.view"> + <field name="name">account.tax.repartition.line.tree</field> + <field name="model">account.tax.repartition.line</field> + <field name="arch" type="xml"> + <tree editable="bottom" create="1" delete="1"> + <field name="sequence" widget="handle"/> + <field name="factor_percent" attrs="{'invisible': [('repartition_type', '=', 'base')]}"/> + <field name="repartition_type"/> + <field name="account_id" attrs="{'invisible': [('repartition_type', '=', 'base')]}" options="{'no_create': True}"/> + <field name="tag_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('applicability', '=', 'taxes'), ('country_id', '=', tax_fiscal_country_id)]"/> + <field name="use_in_tax_closing" + optional="hidden" + attrs="{'invisible': [('repartition_type', '=', 'base')]}"/> + <field name="tax_fiscal_country_id" invisible="1"/> + <field name="company_id" invisible="1"/> + </tree> + </field> + </record> + + <record id="account_tax_view_tree" model="ir.ui.view"> + <field name="name">account.invoice.line.tax.search</field> + <field name="model">account.tax</field> + <field name="arch" type="xml"> + <tree string="Account Tax"> + <field name="display_name" string="name"/> + <field name="description"/> + </tree> + </field> + </record> + + <record id="view_tax_kanban" model="ir.ui.view"> + <field name="name">account.tax.kanban</field> + <field name="model">account.tax</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile"> + <field name="name"/> + <field name="type_tax_use"/> + <field name="tax_scope"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_card oe_kanban_global_click"> + <div class="row mb4"> + <div class="col-6"> + <strong><span><t t-esc="record.name.value"/></span></strong> + </div> + <div class="col-6 text-right"> + <span class="badge badge-pill"><t t-esc="record.type_tax_use.value"/></span> + <span class="badge badge-pill"><t t-esc="record.tax_scope.value"/></span> + </div> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_account_tax_search" model="ir.ui.view"> + <field name="name">account.tax.search</field> + <field name="model">account.tax</field> + <field name="arch" type="xml"> + <search string="Search Taxes"> + <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/> + <field name="company_id" groups="base.group_multi_company"/> + <filter string="Sale" name="sale" domain="[('type_tax_use','=','sale')]" /> + <filter string="Purchase" name="purchase" domain="[('type_tax_use','=','purchase')]" /> + <separator/> + <filter string="Services" name="service" domain="[('tax_scope','=','service')]" /> + <filter string="Goods" name="goods" domain="[('tax_scope','=','consu')]" /> + <separator/> + <filter name="active" string="Active" domain="[('active','=',True)]" help="Show active taxes"/> + <filter name="inactive" string="Inactive" domain="[('active','=',False)]" help="Show inactive taxes"/> + <group string="Group By"> + <filter string="Company" name="company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/> + <filter string="Tax Type" name="taxapp" domain="[]" context="{'group_by':'type_tax_use'}"/> + <filter string="Tax Scope" name="taxapp" domain="[]" context="{'group_by':'tax_scope'}"/> + </group> + </search> + </field> + </record> + + <record id="account_tax_view_search" model="ir.ui.view"> + <field name="name">account.tax.search.filters</field> + <field name="model">account.tax</field> + <field name="arch" type="xml"> + <search string="Search Taxes"> + <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/> + <field name="company_id" groups="base.group_multi_company"/> + </search> + </field> + </record> + + <record id="view_tax_form" model="ir.ui.view"> + <field name="name">account.tax.form</field> + <field name="model">account.tax</field> + <field name="arch" type="xml"> + <form string="Account Tax"> + <sheet> + <group> + <group> + <field name="name"/> + <field name="amount_type"/> + <field name="active" widget="boolean_toggle"/> + </group> + <group> + <field name="type_tax_use"/> + <field name="tax_scope"/> + <label for="amount" attrs="{'invisible':[('amount_type','not in', ('fixed', 'percent', 'division'))]}"/> + <div attrs="{'invisible':[('amount_type','not in', ('fixed', 'percent', 'division'))]}"> + <field name="amount" class="oe_inline"/> + <span class="o_form_label oe_inline" attrs="{'invisible':[('amount_type','=','fixed')]}">%</span> + </div> + </group> + </group> + <notebook> + <page string="Definition" name="definition"> + <div attrs="{'invisible': [('amount_type', '=', 'group')]}"> + <field name="tax_fiscal_country_id" invisible="1"/> + <field name="country_code" invisible="1"/> + <group string="Distribution for Invoices"> + <field name="invoice_repartition_line_ids" nolabel="1" context="{'default_company_id': company_id}"/> + </group> + <group string="Distribution for Credit Notes"> + <field name="refund_repartition_line_ids" nolabel="1" context="{'default_company_id': company_id}"/> + </group> + </div> + <field name="children_tax_ids" attrs="{'invisible':['|', ('amount_type','!=','group'), ('type_tax_use','=','none')]}" domain="[('type_tax_use','in',('none',type_tax_use)), ('amount_type','!=','group')]"> + <tree string="Children Taxes"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="amount_type"/> + <field name="amount"/> + </tree> + </field> + </page> + <page string="Advanced Options" name="advanced_options"> + <group> + <group> + <field name="description" attrs="{'invisible':[('amount_type','=', 'group')]}"/> + <field name="tax_group_id"/> + <field name="analytic" attrs="{'invisible':[('amount_type','=', 'group')]}" groups="analytic.group_analytic_accounting" /> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + </group> + <group name="advanced_booleans"> + <field name="price_include" attrs="{'invisible':[('amount_type','=', 'group')]}" /> + <field name="include_base_amount" attrs="{'invisible':[('amount_type','=', 'group')]}" /> + <field name="hide_tax_exigibility" invisible="1"/> + <field name="tax_exigibility" widget="radio" attrs="{'invisible':['|', ('amount_type','=', 'group'), ('hide_tax_exigibility', '=', False)]}" groups="account.group_account_readonly"/> + <field name="cash_basis_transition_account_id" options="{'no_create': True}" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}" groups="account.group_account_readonly"/> + </group> + </group> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + + <record id="action_tax_form" model="ir.actions.act_window"> + <field name="name">Taxes</field> + <field name="res_model">account.tax</field> + <field name="view_mode">tree,kanban,form</field> + <field name="domain" eval="False"/> <!-- Force empty --> + <field name="context">{'search_default_sale': True, 'search_default_purchase': True, 'active_test': False}</field> + <field name="view_id" ref="view_tax_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new tax + </p> + </field> + </record> + + <record id="view_tax_group_tree" model="ir.ui.view"> + <field name="name">account.tax.group.tree</field> + <field name="model">account.tax.group</field> + <field name="arch" type="xml"> + <tree string="Account Tax Group" editable="bottom" create="false"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="property_tax_payable_account_id"/> + <field name="property_tax_receivable_account_id"/> + <field name="property_advance_tax_payment_account_id"/> + </tree> + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/digest_views.xml b/addons/account/views/digest_views.xml new file mode 100644 index 00000000..7398744d --- /dev/null +++ b/addons/account/views/digest_views.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <record id="digest_digest_view_form" model="ir.ui.view"> + <field name="name">digest.digest.view.form.inherit.account.account</field> + <field name="model">digest.digest</field> + <field name="inherit_id" ref="digest.digest_digest_view_form"/> + <field name="arch" type="xml"> + <xpath expr="//group[@name='kpi_general']" position="after"> + <group name="kpi_account" string="Invoicing" groups="account.group_account_manager"> + <field name="kpi_account_total_revenue"/> + </group> + </xpath> + </field> + </record> +</odoo> diff --git a/addons/account/views/partner_view.xml b/addons/account/views/partner_view.xml new file mode 100644 index 00000000..b232c4e9 --- /dev/null +++ b/addons/account/views/partner_view.xml @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <record id="view_account_position_form" model="ir.ui.view"> + <field name="name">account.fiscal.position.form</field> + <field name="model">account.fiscal.position</field> + <field name="arch" type="xml"> + <form string="Fiscal Position"> + <sheet> + <div class="oe_button_box" name="button_box"/> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <group> + <group> + <field name="active" invisible="1"/> + <field name="name"/> + <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> + </group> + <group> + <field name="auto_apply"/> + <field name="states_count" invisible="1"/> + <field name="vat_required" attrs="{'invisible': [('auto_apply', '!=', True)]}"/> + <field name="country_group_id" attrs="{'invisible': [('auto_apply', '!=', True)]}"/> + <field name="country_id" attrs="{'invisible': [('auto_apply', '!=', True)]}"/> + <field name="state_ids" widget="many2many_tags" domain="[('country_id', '=', country_id)]" + attrs="{'invisible': ['|', '|', ('auto_apply', '!=', True), ('country_id', '=', False), ('states_count', '=', 0)]}"/> + <label for="zip_from" string="Zip Range" + attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}"/> + <div attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}"> + <span> From </span> + <field name="zip_from" class="oe_inline"/> + <div class="oe_edit_only"/> + <span> To </span> + <field name="zip_to" class="oe_inline"/> + </div> + </group> + </group> + <notebook> + <page name="tax_mapping" string="Tax Mapping"> + <group> + <field name="tax_ids" widget="one2many" nolabel="1" context="{'append_type_to_tax_name': True}"> + <tree name="tax_map_tree" string="Tax Mapping" editable="bottom"> + <field name="tax_src_id" domain="[('type_tax_use', '!=', 'none'), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" context="{'append_type_to_tax_name': True}"/> + <field name="tax_dest_id" domain="[('type_tax_use', '!=', 'none'), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" context="{'append_type_to_tax_name': True}"/> + </tree> + <form name="tax_map_form" string="Tax Mapping"> + <group> + <field name="tax_src_id" domain="[('type_tax_use', '!=', 'none')]" context="{'append_type_to_tax_name': True}"/> + <field name="tax_dest_id" domain="[('type_tax_use', '!=', 'none')]" context="{'append_type_to_tax_name': True}"/> + </group> + </form> + </field> + </group> + </page> + <page name="account_mapping" string="Account Mapping" groups="account.group_account_readonly"> + <group> + <field name="account_ids" widget="one2many" nolabel="1"> + <tree string="Account Mapping" editable="bottom"> + <field name="account_src_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/> + <field name="account_dest_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/> + </tree> + <form string="Account Mapping"> + <field name="account_src_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/> + <field name="account_dest_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/> + </form> + </field> + </group> + </page> + </notebook> + <field name="note" placeholder="Legal Notes..."/> + </sheet> + </form> + </field> + </record> + <record id="view_account_position_filter" model="ir.ui.view"> + <field name="name">account.fiscal.position.filter</field> + <field name="model">account.fiscal.position</field> + <field name="arch" type="xml"> + <search string="Search Fiscal Positions"> + <field name="name" string="Fiscal Position"/> + <filter name="active" string="Archived" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + <record id="view_account_position_tree" model="ir.ui.view"> + <field name="name">account.fiscal.position.tree</field> + <field name="model">account.fiscal.position</field> + <field name="arch" type="xml"> + <tree string="Fiscal Position"> + <field name="sequence" widget="handle"/> + <field name="name"/> + <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/> + </tree> + </field> + </record> + + <record model="ir.ui.view" id="partner_view_buttons"> + <field name="name">partner.view.buttons</field> + <field name="model">res.partner</field> + <field name="inherit_id" ref="base.view_partner_form" /> + <field name="priority" eval="11"/> + <field name="groups_id" eval="[(4, ref('account.group_account_invoice')), (4, ref('account.group_account_readonly'))]"/> + <field name="arch" type="xml"> + <div name="button_box" position="inside"> + <button type="object" class="oe_stat_button" icon="fa-pencil-square-o" name="action_view_partner_invoices" + context="{'default_partner_id': active_id}"> + <div class="o_form_field o_stat_info"> + <span class="o_stat_value"> + <field name="currency_id" invisible="1"/> + <field name="total_invoiced" widget='monetary' options="{'currency_field': 'currency_id'}"/> + </span> + <span class="o_stat_text">Invoiced</span> + </div> + </button> + </div> + + <page name="internal_notes" position="inside"> + <group colspan="2" col="2" groups="account.group_warning_account"> + <separator string="Warning on the Invoice" colspan="4"/> + <field name="invoice_warn" nolabel="1" /> + <field name="invoice_warn_msg" colspan="3" nolabel="1" + attrs="{'required':[('invoice_warn', '!=', False), ('invoice_warn','!=','no-message')],'readonly':[('invoice_warn','=','no-message')]}"/> + </group> + </page> + </field> + </record> + + <record id="action_account_fiscal_position_form" model="ir.actions.act_window"> + <field name="name">Fiscal Positions</field> + <field name="res_model">account.fiscal.position</field> + <field name="view_mode">tree,kanban,form</field> + <field name="search_view_id" ref="view_account_position_filter"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new fiscal position + </p> + </field> + </record> + + <!-- + Partners Extension + --> + + <record id="view_partner_property_form" model="ir.ui.view"> + <field name="name">res.partner.property.form.inherit</field> + <field name="model">res.partner</field> + <field name="priority">2</field> + <field name="inherit_id" ref="base.view_partner_form"/> + <field name="groups_id" eval="[(5,)]"/> + <field name="arch" type="xml"> + <page name="sales_purchases" position="after"> + <page string="Invoicing" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice,account.group_account_readonly"> + <group> + <group string="Bank Accounts" name="banks" groups="account.group_account_invoice,account.group_account_readonly"> + <field name="bank_ids" nolabel="1"> + <tree editable="bottom"> + <field name="sequence" widget="handle"/> + <field name="bank_id"/> + <field name="acc_number"/> + <field name="acc_holder_name" invisible="1"/> + </tree> + </field> + <button type="action" class="btn-link" + name="%(base.action_res_partner_bank_account_form)d" + context="{'search_default_partner_id': active_id, 'default_partner_id': active_id, 'form_view_ref': 'account.view_company_partner_bank_form'}" + string="View accounts detail" + colspan="2" + /> + </group> + <group string="Accounting Entries" name="accounting_entries" groups="account.group_account_readonly"> + <field name="currency_id" invisible="1"/> + <field name="property_account_receivable_id"/> + <field name="property_account_payable_id"/> + </group> + </group> + </page> + <page string="Invoicing" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}" groups="account.group_account_invoice,account.group_account_readonly"> + <div> + <p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p> + </div> + </page> + </page> + <xpath expr="//group[@name='misc']" position="before"> + <group string="Fiscal Information" name="fiscal_information" priority="5" groups="account.group_account_invoice,account.group_account_readonly"> + <field name="property_account_position_id" options="{'no_create': True, 'no_open': True}"/> + </group> + </xpath> + <group name="sale" position="inside"> + <field string="Payment Terms" name="property_payment_term_id" widget="selection" groups="account.group_account_invoice,account.group_account_readonly"/> + </group> + <group name="purchase" position="inside"> + <field string="Payment Terms" name="property_supplier_payment_term_id" widget="selection" groups="account.group_account_invoice,account.group_account_readonly"/> + </group> + </field> + </record> + + <record id="res_partner_view_search" model="ir.ui.view"> + <field name="name">res.partner.search.inherit</field> + <field name="model">res.partner</field> + <field name="inherit_id" ref="base.view_res_partner_filter"/> + <field name="arch" type="xml"> + <xpath expr="//filter[@name='inactive']" position="before"> + <filter string="Customer Invoices" name="customer" domain="[('customer_rank','>', 0)]"/> + <filter string="Vendor Bills" name="supplier" domain="[('supplier_rank','>', 0)]"/> + <separator/> + </xpath> + </field> + </record> + + <record id="res_partner_action_customer" model="ir.actions.act_window"> + <field name="name">Customers</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">res.partner</field> + <field name="view_mode">kanban,tree,form</field> + <field name="context">{'search_default_customer': 1,'res_partner_search_mode': 'customer', 'default_is_company': True, 'default_customer_rank': 1}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new customer in your address book + </p><p> + Odoo helps you easily track all activities related to a customer. + </p> + </field> + </record> + + <record id="res_partner_action_supplier" model="ir.actions.act_window"> + <field name="name">Vendors</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">res.partner</field> + <field name="view_mode">kanban,tree,form</field> + <field name="context">{'search_default_supplier': 1,'res_partner_search_mode': 'supplier', 'default_is_company': True, 'default_supplier_rank': 1}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new supplier in your address book + </p><p> + Odoo helps you easily track all activities related to a supplier. + </p> + </field> + </record> + </data> +</odoo> diff --git a/addons/account/views/product_view.xml b/addons/account/views/product_view.xml new file mode 100644 index 00000000..db4a4aa7 --- /dev/null +++ b/addons/account/views/product_view.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="product_template_view_tree" model="ir.ui.view"> + <field name="name">product.template.tree</field> + <field name="model">product.template</field> + <field name="arch" type="xml"> + <tree string="Products" sample="1"> + <field name="default_code"/> + <field name="name"/> + <field name="lst_price"/> + <field name="taxes_id" widget="many2many_tags"/> + <field name="supplier_taxes_id" widget="many2many_tags"/> + <field name="activity_exception_decoration" widget="activity_exception"/> + </tree> + </field> + </record> + + <record id="product_product_action_sellable" model="ir.actions.act_window"> + <field name="name">Products</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">product.template</field> + <field name="view_mode">kanban,tree,form,activity</field> + <field name="context">{'search_default_filter_to_sell': 1}</field> + <field name="view_id" ref="product_template_view_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new sellable product + </p> + </field> + </record> + + <record id="product_product_action_purchasable" model="ir.actions.act_window"> + <field name="name">Products</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">product.template</field> + <field name="view_mode">kanban,tree,form,activity</field> + <field name="context">{'search_default_filter_to_purchase': 1}</field> + <field name="view_id" ref="product_template_view_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new purchasable product + </p> + </field> + </record> + + <record id="product_template_form_view" model="ir.ui.view"> + <field name="name">product.template.form.inherit</field> + <field name="model">product.template</field> + <field name="priority">5</field> + <field name="inherit_id" ref="product.product_template_form_view"/> + <field name="arch" type="xml"> + <xpath expr="//page[@name='purchase']" position="attributes"> + <attribute name="invisible">0</attribute> + </xpath> + <page name="inventory" position="after"> + <page string="Accounting" name="invoicing" groups="account.group_account_readonly"> + <group name="properties"> + <group string="Receivables"> + <field name="property_account_income_id" + groups="account.group_account_readonly"/> + </group> + <group string="Payables" name="payables"> + <field name="property_account_expense_id" + groups="account.group_account_readonly"/> + </group> + </group> + <group name="accounting"/> + </page> + </page> + <xpath expr="//div[@name='pricing']" position="after"> + <field name="taxes_id" widget="many2many_tags" context="{'default_type_tax_use':'sale', 'search_default_sale': 1, 'search_default_service': type == 'service', 'search_default_goods': type == 'consu'}"/> + </xpath> + <group name="bill" position="inside"> + <field name="supplier_taxes_id" widget="many2many_tags" context="{'default_type_tax_use':'purchase', 'search_default_purchase': 1, 'search_default_service': type == 'service', 'search_default_goods': type == 'consu'}"/> + </group> + </field> + </record> + + <record id="view_category_property_form" model="ir.ui.view"> + <field name="name">product.category.property.form.inherit</field> + <field name="model">product.category</field> + <field name="inherit_id" ref="product.product_category_form_view"/> + <field name="arch" type="xml"> + <group name="first" position="after"> + <group name="account_property" > + <group string="Account Properties" groups="account.group_account_readonly"> + <field name="property_account_income_categ_id"/> + <field name="property_account_expense_categ_id"/> + </group> + </group> + </group> + </field> + </record> + </data> +</odoo> diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml new file mode 100644 index 00000000..319d985a --- /dev/null +++ b/addons/account/views/report_invoice.xml @@ -0,0 +1,244 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <template id="report_invoice_document"> + <t t-call="web.external_layout"> + <t t-set="o" t-value="o.with_context(lang=lang)" /> + <t t-set="address"> + <address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' /> + <div t-if="o.partner_id.vat" class="mt16"> + <t t-if="o.company_id.country_id.vat_label" t-esc="o.company_id.country_id.vat_label" id="inv_tax_id_label"/> + <t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/></div> + </t> + <div class="page"> + <h2> + <span t-if="o.move_type == 'out_invoice' and o.state == 'posted'">Invoice</span> + <span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span> + <span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span> + <span t-if="o.move_type == 'out_refund'">Credit Note</span> + <span t-if="o.move_type == 'in_refund'">Vendor Credit Note</span> + <span t-if="o.move_type == 'in_invoice'">Vendor Bill</span> + <span t-if="o.name != '/'" t-field="o.name"/> + </h2> + + <div id="informations" class="row mt32 mb32"> + <div class="col-auto col-3 mw-100 mb-2" t-if="o.invoice_date" name="invoice_date"> + <strong>Invoice Date:</strong> + <p class="m-0" t-field="o.invoice_date"/> + </div> + <div class="col-auto col-3 mw-100 mb-2" t-if="o.invoice_date_due and o.move_type == 'out_invoice' and o.state == 'posted'" name="due_date"> + <strong>Due Date:</strong> + <p class="m-0" t-field="o.invoice_date_due"/> + </div> + <div class="col-auto col-3 mw-100 mb-2" t-if="o.invoice_origin" name="origin"> + <strong>Source:</strong> + <p class="m-0" t-field="o.invoice_origin"/> + </div> + <div class="col-auto col-3 mw-100 mb-2" t-if="o.partner_id.ref" name="customer_code"> + <strong>Customer Code:</strong> + <p class="m-0" t-field="o.partner_id.ref"/> + </div> + <div class="col-auto col-3 mw-100 mb-2" t-if="o.ref" name="reference"> + <strong>Reference:</strong> + <p class="m-0" t-field="o.ref"/> + </div> + </div> + + <t t-set="display_discount" t-value="any(l.discount for l in o.invoice_line_ids)"/> + + <table class="table table-sm o_main_table" name="invoice_line_table"> + <thead> + <tr> + <th name="th_description" class="text-left"><span>Description</span></th> + <th name="th_quantity" class="text-right"><span>Quantity</span></th> + <th name="th_priceunit" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Unit Price</span></th> + <th name="th_price_unit" t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"> + <span>Disc.%</span> + </th> + <th name="th_taxes" t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Taxes</span></th> + <th name="th_subtotal" class="text-right"> + <span groups="account.group_show_line_subtotals_tax_excluded">Amount</span> + <span groups="account.group_show_line_subtotals_tax_included">Total Price</span> + </th> + </tr> + </thead> + <tbody class="invoice_tbody"> + <t t-set="current_subtotal" t-value="0"/> + <t t-set="lines" t-value="o.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"/> + + <t t-foreach="lines" t-as="line"> + <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/> + <t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/> + + <tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''"> + <t t-if="not line.display_type" name="account_invoice_line_accountable"> + <td name="account_invoice_line_name"><span t-field="line.name" t-options="{'widget': 'text'}"/></td> + <td class="text-right"> + <span t-field="line.quantity"/> + <span t-field="line.product_uom_id" groups="uom.group_uom"/> + </td> + <td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"> + <span class="text-nowrap" t-field="line.price_unit"/> + </td> + <td t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"> + <span class="text-nowrap" t-field="line.discount"/> + </td> + <td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"> + <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))" id="line_tax_ids"/> + </td> + <td class="text-right o_price_total"> + <span class="text-nowrap" t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/> + <span class="text-nowrap" t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/> + </td> + </t> + <t t-if="line.display_type == 'line_section'"> + <td colspan="99"> + <span t-field="line.name" t-options="{'widget': 'text'}"/> + </td> + <t t-set="current_section" t-value="line"/> + <t t-set="current_subtotal" t-value="0"/> + </t> + <t t-if="line.display_type == 'line_note'"> + <td colspan="99"> + <span t-field="line.name" t-options="{'widget': 'text'}"/> + </td> + </t> + </tr> + + <t t-if="current_section and (line_last or lines[line_index+1].display_type == 'line_section')"> + <tr class="is-subtotal text-right"> + <td colspan="99"> + <strong class="mr16">Subtotal</strong> + <span + t-esc="current_subtotal" + t-options='{"widget": "monetary", "display_currency": o.currency_id}' + /> + </td> + </tr> + </t> + </t> + </tbody> + </table> + + <div class="clearfix"> + <div id="total" class="row"> + <div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ml-auto"> + <table class="table table-sm" style="page-break-inside: avoid;"> + <tr class="border-black o_subtotal" style=""> + <td><strong>Subtotal</strong></td> + <td class="text-right"> + <span t-field="o.amount_untaxed"/> + </td> + </tr> + <t t-foreach="o.amount_by_group" t-as="amount_by_group"> + <tr style=""> + <t t-if="len(o.line_ids.filtered(lambda line: line.tax_line_id)) in [0, 1] and o.amount_untaxed == amount_by_group[2]"> + <td><span class="text-nowrap" t-esc="amount_by_group[0]"/></td> + <td class="text-right o_price_total"> + <span class="text-nowrap" t-esc="amount_by_group[3]" /> + </td> + </t> + <t t-else=""> + <td> + <span t-esc="amount_by_group[0]"/> + <span class="text-nowrap"> on + <t t-esc="amount_by_group[4]"/> + </span> + </td> + <td class="text-right o_price_total"> + <span class="text-nowrap" t-esc="amount_by_group[3]"/> + </td> + </t> + </tr> + </t> + <tr class="border-black o_total"> + <td><strong>Total</strong></td> + <td class="text-right"> + <span class="text-nowrap" t-field="o.amount_total"/> + </td> + </tr> + <t t-if="print_with_payments"> + <t t-if="o.payment_state != 'invoicing_legacy'"> + <t t-set="payments_vals" t-value="o.sudo()._get_reconciled_info_JSON_values()"/> + <t t-foreach="payments_vals" t-as="payment_vals"> + <tr> + <td> + <i class="oe_form_field text-right oe_payment_label">Paid on <t t-esc="payment_vals['date']" t-options='{"widget": "date"}'/></i> + </td> + <td class="text-right"> + <span t-esc="payment_vals['amount']" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> + </td> + </tr> + </t> + <t t-if="len(payments_vals) > 0"> + <tr class="border-black"> + <td><strong>Amount Due</strong></td> + <td class="text-right"> + <span t-field="o.amount_residual"/> + </td> + </tr> + </t> + </t> + </t> + </table> + </div> + </div> + </div> + <p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference" name="payment_communication"> + Please use the following communication for your payment : <b><span t-field="o.payment_reference"/></b> + </p> + <p t-if="o.invoice_payment_term_id" name="payment_term"> + <span t-field="o.invoice_payment_term_id.note"/> + </p> + <p t-if="o.narration" name="comment"> + <span t-field="o.narration"/> + </p> + <p t-if="o.fiscal_position_id.note" name="note"> + <span t-field="o.fiscal_position_id.note"/> + </p> + <p t-if="o.invoice_incoterm_id" name="incoterm"> + <strong>Incoterm: </strong><span t-field="o.invoice_incoterm_id.code"/> - <span t-field="o.invoice_incoterm_id.name"/> + </p> + <div id="qrcode" t-if="o.display_qr_code"> + <p t-if="qr_code_urls.get(o.id)"> + <strong class="text-center">Scan me with your banking app.</strong><br/><br/> + <img class="border border-dark rounded" t-att-src="qr_code_urls[o.id]"/> + </p> + </div> + </div> + </t> + </template> + + <template id="report_invoice"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="o"> + <t t-set="lang" t-value="o.invoice_user_id.sudo().lang if o.move_type in ('in_invoice', 'in_refund') else o.partner_id.lang"/> + <t t-if="o._get_name_invoice_report() == 'account.report_invoice_document'" + t-call="account.report_invoice_document" t-lang="lang"/> + </t> + </t> + </template> + + <template id="report_invoice_with_payments"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="o"> + <t t-set="lang" t-value="o.invoice_user_id.sudo().lang if o.move_type in ('in_invoice', 'in_refund') else o.partner_id.lang"/> + <t t-set="print_with_payments" t-value="True"/> + <t t-if="o._get_name_invoice_report() == 'account.report_invoice_document'" + t-call="account.report_invoice_document" t-lang="lang"/> + </t> + </t> + </template> + + <!--We need to create the following empty report template for the action report + "action_account_original_vendor_bill" to work. The action is merging the + original vendor bill(s) that were used to create the vendor bill(s) into one PDF. --> + <template id="report_original_vendor_bill"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="o"> + <div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')"></div> + </t> + </t> + </template> + </data> +</odoo> diff --git a/addons/account/views/report_journal.xml b/addons/account/views/report_journal.xml new file mode 100644 index 00000000..87365071 --- /dev/null +++ b/addons/account/views/report_journal.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> +<template id="report_journal"> + <t t-call="web.html_container"> + <t t-set="data_report_margin_top" t-value="12"/> + <t t-set="data_report_header_spacing" t-value="9"/> + <t t-set="data_report_dpi" t-value="110"/> + <t t-foreach="docs" t-as="o"> + <t t-call="web.internal_layout"> + <div class="page"> + <h2><t t-esc="o.name"/> Journal</h2> + + <div class="row mt32"> + <div class="col-3"> + <strong>Company:</strong> + <p t-esc="(company_id or res_company).name"/> + </div> + <div class="col-3"> + <strong>Journal:</strong> + <p t-esc="o.name"/> + </div> + <div class="col-3"> + <strong>Entries Sorted By:</strong> + <p t-if="data['form'].get('sort_selection') == 'move_name'">Journal Entry Number</p> + <p t-if="data['form'].get('sort_selection') == 'date'">Date</p> + </div> + <div class="col-3"> + <strong>Target Moves:</strong> + <p t-if="data['form']['target_move'] == 'all'">All Entries</p> + <p t-if="data['form']['target_move'] == 'posted'">All Posted Entries</p> + </div> + </div> + + <table class="table table-sm"> + <thead> + <tr> + <th>Move</th> + <th>Date</th> + <th>Account</th> + <th>Partner</th> + <th>Label</th> + <th>Debit</th> + <th>Credit</th> + <th t-if="data['form']['amount_currency']">Currency</th> + </tr> + </thead> + <tbody> + <tr t-foreach="lines[o.id]" t-as="aml"> + <td><span t-esc="aml.move_id.name != '/' and aml.move_id.name or ('*'+str(aml.move_id.id))"/></td> + <td><span t-field="aml.date"/></td> + <td><span t-field="aml.account_id.code"/></td> + <td><span t-esc="aml.sudo().partner_id and aml.sudo().partner_id.name and aml.sudo().partner_id.name[:23] or ''"/></td> + <td><span t-esc="aml.name and aml.name[:35]"/></td> + <td><span t-esc="aml.debit" t-options="{'widget': 'monetary', 'display_currency': (company_id or res_company).currency_id}"/></td> + <td><span t-esc="aml.credit" t-options="{'widget': 'monetary', 'display_currency': (company_id or res_company).currency_id}"/></td> + <td t-if="data['form']['amount_currency'] and aml.amount_currency"> + <span t-esc="aml.amount_currency" t-options="{'widget': 'monetary', 'display_currency': aml.currency_id}"/> + </td> + </tr> + </tbody> + </table> + + <div class="row justify-content-end"> + <div class="col-4"> + <table class="table table-sm"> + <tr> + <td><strong>Total</strong></td> + <td><span t-esc="sum_debit(data, o)" t-options="{'widget': 'monetary', 'display_currency': (company_id or res_company).currency_id}"/></td> + <td><span t-esc="sum_credit(data, o)" t-options="{'widget': 'monetary', 'display_currency': (company_id or res_company).currency_id}"/></td> + </tr> + </table> + </div> + </div> + + <div class="row"> + <div class="col-4"> + <table class="table table-sm"> + <thead> + <tr><th colspan="3">Tax Declaration</th></tr> + <tr> + <th>Name</th> + <th>Base Amount</th> + <th>Tax Amount</th> + </tr> + </thead> + <tbody> + <t t-set="taxes" t-value="get_taxes(data, o)"/> + <tr t-foreach="taxes" t-as="tax"> + <td><span t-esc="tax.name"/></td> + <td><span t-esc="taxes[tax]['base_amount']" t-options="{'widget': 'monetary', 'display_currency': (company_id or res_company).currency_id}"/></td> + <td><span t-esc="taxes[tax]['tax_amount']" t-options="{'widget': 'monetary', 'display_currency': (company_id or res_company).currency_id}"/></td> + </tr> + </tbody> + </table> + </div> + </div> + + </div> + </t> + </t> + </t> +</template> +</odoo> diff --git a/addons/account/views/report_payment_receipt_templates.xml b/addons/account/views/report_payment_receipt_templates.xml new file mode 100644 index 00000000..ef218e71 --- /dev/null +++ b/addons/account/views/report_payment_receipt_templates.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="report_payment_receipt_document"> + <t t-call="web.external_layout"> + <t t-set="o" t-value="o.with_context(lang=lang)"/> + <div class="page"> + <h3><strong>Payment Receipt: <span t-field="o.name"/></strong></h3> + <div class="row mt64"> + <div class="col-6" t-if="o.date"> + <strong>Payment Date: </strong> <span t-field="o.date"/> + </div> + </div> + <div class="row"> + <div class="col-6" t-if="o.partner_type"> + <t t-if="o.partner_type == 'customer'"> + <strong>Customer: </strong> + </t> + <t t-if="o.partner_type == 'supplier'"> + <strong>Vendor: </strong> + </t><span t-field="o.partner_id"/> + </div> + <div class="col-6" t-if="o.payment_method_id"> + <strong>Payment Method: </strong><span t-field="o.payment_method_id.name"/> + </div> + </div> + <div class="row mb64"> + <div class="col-6" t-if="o.amount"> + <strong>Payment Amount: </strong><span t-field="o.amount" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/> + </div> + <div class="col-6" t-if="o.ref"> + <strong>Memo: </strong><span t-field="o.ref"/> + </div> + </div> + <table class="table table-sm"> + <thead> + <tr> + <th><span>Invoice Date</span></th> + <th><span>Invoice Number</span></th> + <th><span>Reference</span></th> + <th class="text-right"><span>Original Amount</span></th> + <th class="text-right"><span>Amount Paid</span></th> + <th class="text-right"><span>Balance</span></th> + </tr> + </thead> + <tbody> + <tr t-foreach="o.move_id._get_reconciled_invoices_partials()" t-as="rec"> + <t t-set="amount" t-value="rec[1]"/> + <t t-set="inv" t-value="rec[2].move_id"/> + <t t-if="inv.move_type != 'entry'"> + <td><span t-field="inv.invoice_date"/></td> + <td><span t-field="inv.name"/></td> + <td><span t-field="inv.ref"/></td> + <td class="text-right"><span t-field="inv.amount_total"/></td> + <td class="text-right"><span t-esc="amount" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td> + <td class="text-right"><span t-field="inv.amount_residual"/></td> + </t> + </tr> + </tbody> + </table> + </div> + </t> + </template> + + <template id="report_payment_receipt"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="o"> + <t t-set="lang" t-value="o.partner_id.lang or o.company_id.partner_id.lang"/> + <t t-call="account.report_payment_receipt_document" t-lang="lang"/> + </t> + </t> + </template> +</odoo> diff --git a/addons/account/views/report_statement.xml b/addons/account/views/report_statement.xml new file mode 100644 index 00000000..39503d5d --- /dev/null +++ b/addons/account/views/report_statement.xml @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <template id="report_statement"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="o"> + <t t-call="web.internal_layout"> + <div class="page"> + <div class="border border-top-0 border-right-0 border-left-0 border-info"> + <div class="row"> + <div class="col-12"> + <h4 class="text-right w-100"> + <strong> + <span t-if="o.journal_id.type == 'bank'">Bank Statement</span> + <span t-else="">Cash Statement</span> + </strong> + </h4> + </div> + </div> + </div> + + <div class="pt-2 pb-2"> + <div class="row"> + <div class="col-12"> + <h5> + <strong> + <span t-field="o.journal_id"/> + <t t-if="o.journal_id.bank_account_id"> - + <span t-field="o.journal_id.bank_account_id"/> + </t> + <t t-if="o.journal_id.code"> - + <span t-field="o.journal_id.code"/> + </t> + </strong> + </h5> + </div> + </div> + <div class="row"> + <div class="col-12"> + <h5> + <strong> + <t t-if="o.name"> + <span t-field="o.name"/> + - </t> + <span t-field="o.date"/> + </strong> + </h5> + </div> + </div> + </div> + + <table class="table table-lg m-0 table-borderless border border-right-0 border-left-0 border-info"> + <tbody> + <tr> + <td class="pt-2 pb-2 pl-0 pr-0"> + <table class="table table-borderless m-0"> + <tr> + <td class="p-0 w-25"> + <strong>Starting Balance</strong> + </td> + <td class="p-0"> + <strong> + <span t-esc="o.line_ids and o.line_ids.sorted(lambda line: line.date)[0].date" t-options='{"widget": "date"}'/> + </strong> + </td> + <td class="text-right p-0"> + <strong> + <span t-field="o.balance_start"/> + </strong> + </td> + </tr> + <tr> + <td class="p-0 w-25"> + <strong>Ending Balance</strong> + </td> + <td class="p-0"> + <strong> + <span t-esc="o.line_ids and o.line_ids.sorted(lambda line: line.date)[-1].date" t-options='{"widget": "date"}'/> + </strong> + </td> + <td class="text-right p-0"> + <strong> + <span t-field="o.balance_end_real"/> + </strong> + </td> + </tr> + </table> + </td> + </tr> + </tbody> + </table> + + <table class="table table-borderless m-0"> + <tbody> + <tr t-foreach="o.line_ids" t-as="line" class="pb-2"> + <td class="pl-0 pr-0"> + <table class="table table-borderless"> + <tr> + <td class="p-0 w-25"> + <span class="d-block font-weight-bold" t-field="line.date"/> + </td> + <td class="p-0"> + <span class="d-block font-weight-bold" t-if="line.partner_id" t-field="line.partner_id"/> + <span class="d-block" t-if="line.partner_bank_id" t-field="line.partner_bank_id"/> + <span class="d-block" t-if="line.payment_ref" t-field="line.payment_ref"/> + <span class="d-block" t-if="line.narration" t-field="line.narration"/> + </td> + <td class="text-right p-0"> + <span class="d-block font-weight-bold" t-field="line.amount"/> + </td> + </tr> + </table> + </td> + </tr> + </tbody> + </table> + </div> + </t> + </t> + </t> + </template> + </data> +</odoo>
\ No newline at end of file diff --git a/addons/account/views/res_company_views.xml b/addons/account/views/res_company_views.xml new file mode 100644 index 00000000..04edc4bc --- /dev/null +++ b/addons/account/views/res_company_views.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="view_company_form" model="ir.ui.view"> + <field name="name">res.company.form.inherit.account</field> + <field name="model">res.company</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='country_id']" position="after"> + <field name="country_code" invisible="1"/> + </xpath> + </field> + </record> +</odoo> diff --git a/addons/account/views/res_config_settings_views.xml b/addons/account/views/res_config_settings_views.xml new file mode 100644 index 00000000..bffbeaad --- /dev/null +++ b/addons/account/views/res_config_settings_views.xml @@ -0,0 +1,598 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <record id="open_account_charts_modules" model="ir.actions.act_window"> + <field name="name">Chart Templates</field> + <field name="res_model">ir.module.module</field> + <field name="view_mode">kanban,tree,form</field> + <field name="context" eval="{ + 'search_default_category_id': ref('base.module_category_accounting_localizations_account_charts'), + 'searchpanel_default_category_id': ref('base.module_category_accounting_localizations_account_charts'), + }"/> + <field name="search_view_id" ref="base.view_module_filter"/> + </record> + + <record id="res_config_settings_view_form" model="ir.ui.view"> + <field name="name">res.config.settings.view.form.inherit.account</field> + <field name="model">res.config.settings</field> + <field name="priority" eval="40"/> + <field name="inherit_id" ref="base.res_config_settings_view_form"/> + <field name="arch" type="xml"> + <xpath expr="//div[hasclass('settings')]" position="inside"> + <field name="country_code" invisible="1"/> + <div class="app_settings_block" data-string="Invoicing" string="Invoicing" data-key="account" groups="account.group_account_manager"> + <field name="has_chart_of_accounts" invisible="1"/> + <field name="has_accounting_entries" invisible="1"/> + <h2 attrs="{'invisible': [('has_accounting_entries','!=',False)]}">Fiscal Localization</h2> + <div class="row mt16 o_settings_container" name="fiscal_localization_setting_container"> + <div class="col-12 col-lg-6 o_setting_box" attrs="{'invisible': [('has_accounting_entries','!=',False)]}"> + <div class="o_setting_left_pane"/> + <div class="o_setting_right_pane"> + <span class="o_form_label">Fiscal Localization</span> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Taxes, fiscal positions, chart of accounts & legal statements for your country + </div> + <div class="content-group"> + <div class="row mt16"> + <label for="chart_template_id" string="Package" class="col-lg-3 o_light_label"/> + <field name="chart_template_id" widget="selection"/> + </div> + <div class="mt8"> + <button name="%(account.open_account_charts_modules)d" icon="fa-arrow-right" type="action" string="Install More Packages" discard="0" class="btn-link"/> + </div> + </div> + </div> + </div> + </div> + <h2>Taxes</h2> + <div class="row mt16 o_settings_container" name="default_taxes_setting_container"> + <div class="col-12 col-lg-6 o_setting_box" + id="default_taxes" + title="These taxes are set in any new product created."> + <div class="o_setting_left_pane"/> + <div class="o_setting_right_pane"> + <span class="o_form_label">Default Taxes</span> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Default taxes applied to local transactions + </div> + <div class="content-group"> + <div class="row mt16"> + <label string="Sales Tax" for="sale_tax_id" class="col-lg-3 o_light_label"/> + <field name="sale_tax_id" domain="[('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company_id)]"/> + </div> + <div class="row"> + <label string="Purchase Tax" for="purchase_tax_id" class="col-lg-3 o_light_label"/> + <field name="purchase_tax_id" domain="[('type_tax_use', 'in', ('purchase', 'all')), ('company_id', '=', company_id)]"/> + </div> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="rounding_method" title="A rounding per line is advised if your prices are tax-included. That way, the sum of line subtotals equals the total with taxes."> + <div class="o_setting_left_pane"/> + <div class="o_setting_right_pane"> + <span class="o_form_label">Rounding Method</span> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + How total tax amount is computed in orders and invoices + </div> + <div class="content-group"> + <field name="tax_calculation_rounding_method" class="o_light_label mt16" widget="radio"/> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="taxcloud_settings"> + <div class="o_setting_left_pane"> + <field name="module_account_taxcloud" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" name="account_taxcloud_right_pane"> + <label for="module_account_taxcloud" string="TaxCloud"/> + <div class="text-muted"> + Compute tax rates based on U.S. ZIP codes + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="eu_service" title="If you sell goods and services to customers in a foreign EU country, you must charge VAT based on the delivery address. This rule applies regardless of where you are located."> + <div class="o_setting_left_pane"> + <field name="module_l10n_eu_service"/> + </div> + <div class="o_setting_right_pane" name="l10n_eu_service_right_pane"> + <label for="module_l10n_eu_service"/> + <a href="https://www.odoo.com/documentation/14.0/applications/finance/accounting/taxation/taxes/eu_distance_selling.html" title="Documentation" class="o_doc_link" target="_blank"></a> + <div class="text-muted"> + Apply VAT of the EU country to which goods and services are delivered. + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="tax_exigibility" + title="Select this if the taxes should use cash basis, which will create an entry for such taxes on a given account during reconciliation." + groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="tax_exigibility"/> + </div> + <div class="o_setting_right_pane"> + <label for="tax_exigibility"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Allow to configure taxes using cash basis + </div> + <div class="content-group" attrs="{'invisible': [('tax_exigibility', '=', False)]}"> + <div class="row mt16"> + <label for="tax_cash_basis_journal_id" class="col-lg-3 o_light_label"/> + <field name="tax_cash_basis_journal_id"/> + </div> + <div class="row mt16"> + <label for="account_cash_basis_base_account_id" class="col-lg-3 o_light_label"/> + <field name="account_cash_basis_base_account_id"/> + </div> + </div> + </div> + </div> + </div> + <h2>Currencies</h2> + <div class="row mt16 o_settings_container" name="main_currency_setting_container"> + <div class="col-12 col-lg-6 o_setting_box" id="main_currency"> + <div class="o_setting_left_pane"/> + <div class="o_setting_right_pane"> + <span class="o_form_label">Main Currency</span> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Main currency of your company + </div> + <div class="content-group"> + <div class="row mt16"> + <label for="currency_id" class="col-lg-3 o_light_label"/> + <field name="currency_id" options="{'no_create_edit': True, 'no_open': True}" context="{'active_test': False}"/> + </div> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="record_transactions"> + <div class="o_setting_left_pane"> + <field name="group_multi_currency"/> + </div> + <div class="o_setting_right_pane"> + <label string="Multi-Currencies" for="group_multi_currency"/> + <div class="text-muted"> + Record transactions in foreign currencies + </div> + <div class="content-group" attrs="{'invisible': [('group_multi_currency', '=', False)]}"> + <div class="mt8"> + <button name="%(base.action_currency_all_form)d" icon="fa-arrow-right" type="action" string="Activate Other Currencies" class="btn-link"/> + </div> + <div class="mt16"> + <b>Post Exchange difference entries in:</b> + </div> + <div class="row mt8"> + <label for="currency_exchange_journal_id" class="col-lg-3 o_light_label" string="Journal" /> + <field name="currency_exchange_journal_id"/> + </div> + <div class="row mt8"> + <label for="income_currency_exchange_account_id" class="col-lg-3 o_light_label"/> + <field name="income_currency_exchange_account_id"/> + </div> + <div class="row mt8"> + <label for="expense_currency_exchange_account_id" class="col-lg-3 o_light_label"/> + <field name="expense_currency_exchange_account_id"/> + </div> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="update_exchange_rates" + attrs="{'invisible': [('group_multi_currency', '=', False)]}"> + <div class="o_setting_left_pane"> + <field name="module_currency_rate_live" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_currency_rate_live"/> + <div class="text-muted" id="update_currency_live"> + Update exchange rates automatically + </div> + </div> + </div> + </div> + <h2>Customer Invoices</h2> + <div class="row mt16 o_settings_container" id="invoicing_settings"> + <div class="col-12 col-lg-6 o_setting_box" id="default_setting_options"> + <div class="o_setting_left_pane"> + </div> + <div class="o_setting_right_pane"> + <span class="o_form_label">Default Sending Options</span> + <div class="text-muted"> + Those options will be selected by default when clicking "Send & Print" on invoices + </div> + <div class="mt16"> + <div class="content-group" id="send_default"> + <div class="row"> + <field name="invoice_is_print" class="col-lg-1 ml16"/> + <label for="invoice_is_print"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/> + </div> + <div class="row"> + <field name="invoice_is_email" class="col-lg-1 ml16"/> + <label for="invoice_is_email"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/> + </div> + </div> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="send_invoices_followups"> + <div class="o_setting_left_pane"> + <field name="module_snailmail_account"/> + </div> + <div class="o_setting_right_pane" id="snailmail_settings"> + <label for="module_snailmail_account"/> + <div class="text-muted"> + Send invoices and payment follow-ups by post + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="line_subtotals"> + <div class="o_setting_left_pane"> + </div> + <div class="o_setting_right_pane"> + <label for="show_line_subtotals_tax_selection"/> + <div class="text-muted"> + Line subtotals tax display + </div> + <div class="mt16"> + <field name="show_line_subtotals_tax_selection" class="o_light_label" widget="radio"/> + <field name="group_show_line_subtotals_tax_excluded" invisible="1"/> + <field name="group_show_line_subtotals_tax_included" invisible="1"/> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="use_invoice_terms"> + <div class="o_setting_left_pane"> + <field name="use_invoice_terms"/> + </div> + <div class="o_setting_right_pane"> + <label for="use_invoice_terms"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Show standard terms & conditions on invoices/orders + </div> + <div class="content-group" attrs="{'invisible': [('use_invoice_terms','=',False)]}"> + <div class="mt16"> + <field name="invoice_terms" placeholder="Insert your terms & conditions here..."/> + </div> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="get_invoice_warnings"> + <div class="o_setting_left_pane"> + <field name="group_warning_account"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_warning_account" string="Warnings"/> + <div class="text-muted"> + Get warnings when invoicing specific customers + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="smallest_coinage_currency"> + <div class="o_setting_left_pane"> + <field name="group_cash_rounding"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_cash_rounding"/> + <div class="text-muted"> + Define the smallest coinage of the currency used to pay by cash + </div> + <div class="mt8"> + <button name="%(account.rounding_list_action)d" icon="fa-arrow-right" + type="action" string="Cash Roundings" class="btn-link" + attrs="{'invisible': [('group_cash_rounding', '=', False)]}"/> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="intrastat_statistics"> + <div class="o_setting_left_pane"> + <field name="module_account_intrastat" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" name="intrastat_right_pane"> + <label for="module_account_intrastat"/> + <div class="text-muted"> + Collect information and produce statistics on the trade in goods in Europe with intrastat + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="default_incoterm"> + <div class="o_setting_left_pane"/> + <div class="o_setting_right_pane"> + <span class="o_form_label">Default Incoterm</span> + <div class="text-muted"> + Default Incoterm of your company + </div> + <div class="text-muted"> + <field name="incoterm_id"/> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="show_sale_receipts"> + <div class="o_setting_left_pane"> + <field name="group_show_sale_receipts" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" name="show_sale_receipts_right_pane"> + <label for="group_show_sale_receipts"/> + <div class="text-muted"> + Active to create sale receipt + </div> + </div> + </div> + </div> + <h2>Customer Payments</h2> + <div class="row mt16 o_settings_container" id="pay_invoice_online_setting_container"> + <div class="col-12 col-lg-6 o_setting_box"> + <div class="o_setting_left_pane"> + <field name="module_account_payment"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_payment"/> + <div class="text-muted"> + Let your customers pay their invoices online + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="account_batch_payment" + groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="module_account_batch_payment" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_batch_payment" string="Batch Payments"/> + <div class="text-muted"> + Group payments into a single batch to ease the reconciliation process + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="collect_customer_payment" + title="If you check this box, you will be able to collect payments using SEPA Direct Debit mandates."> + <div class="o_setting_left_pane"> + <field name="module_account_sepa_direct_debit" class="oe_inline" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" name="sepa_direct_debit_right_pane"> + <label string="SEPA Direct Debit (SDD)" for="module_account_sepa_direct_debit"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Collect customer payments in one-click using Euro SEPA Service + </div> + <div class="content-group" attrs="{'invisible': [('module_account_sepa_direct_debit', '=', False)]}"> + <div class="text-warning mt16 mb4"> + Save this page and come back here to set up the feature. + </div> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" + id="qr_code_invoices" + title="Add a QR-code to your invoices so that your customers can pay instantly with their mobile banking application."> + <div class="o_setting_left_pane"> + <field name="qr_code" class="oe_inline"/> + </div> + <div class="o_setting_right_pane" name="qr_code_right_pane"> + <label string="QR Codes" for="qr_code"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Add a payment QR-code to your invoices + </div> + </div> + </div> + </div> + <h2>Vendor Bills</h2> + <div class="row mt16 o_settings_container" id="account_vendor_bills"> + <div class="col-12 col-lg-6 o_setting_box" id="account_ocr_settings"> + <div class="o_setting_left_pane"> + <field name="module_account_invoice_extract" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" id="digitalizeocr"> + <label for="module_account_invoice_extract"/> + <div class="text-muted"> + Digitalize your scanned or PDF vendor bills with OCR and Artificial Intelligence + </div> + <div id="msg_invoice_extract" class="content-group" attrs="{'invisible': [('module_account_invoice_extract', '=', False)]}"> + <div class="text-warning mt16 mb4"> + Save this page and come back here to set up the feature. + </div> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="show_purchase_receipts"> + <div class="o_setting_left_pane"> + <field name="group_show_purchase_receipts" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" name="show_purchase_receipts_right_pane"> + <label for="group_show_purchase_receipts"/> + <div class="text-muted"> + Activate to create purchase receipt + </div> + </div> + </div> + </div> + <h2>Vendor Payments</h2> + <div class="row mt16 o_settings_container" id="print_vendor_checks_setting_container"> + <div class="col-12 col-lg-6 o_setting_box" id="print_checks" groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="module_account_check_printing" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label string="Checks" for="module_account_check_printing"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted" id="print_bills_payment"> + Print checks to pay your vendors + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="sepa_payments" + title="If you check this box, you will be able to register your payment using SEPA."> + <div class="o_setting_left_pane"> + <field name="module_account_sepa" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" name="sepa_right_pane"> + <label for="module_account_sepa"/> + <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/> + <div class="text-muted"> + Pay your bills in one-click using Euro SEPA Service + </div> + </div> + </div> + </div> + + <t groups="account.group_account_user"> + <h2>Bank & Cash</h2> + <div class="row mt16 o_settings_container" id="bank_cash"> + <div class="col-12 col-lg-6 o_setting_box" + id="account_yodlee" + title="Get your bank statements automatically imported every 4 hours, or in one-click, using Yodlee and Plaid services. Once installed, set “Bank Feeds” to “Bank Synchronization” in bank account settings. Then, click “Configure” on the online account to enter your bank credentials."> + <div class="o_setting_left_pane"> + <field name="module_account_yodlee" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_yodlee" string="Automatic Import"/> + <div class="text-muted"> + Import your bank statements automatically + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="import_bank_statements_csv" + title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard."> + <div class="o_setting_left_pane"> + <field name="module_account_bank_statement_import_csv" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_bank_statement_import_csv" string="CSV Import"/> + <div class="text-muted"> + Import your bank statements in CSV + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard."> + <div class="o_setting_left_pane"> + <field name="module_account_bank_statement_import_qif" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_bank_statement_import_qif" string="QIF Import"/> + <div class="text-muted"> + Import your bank statements in QIF + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard."> + <div class="o_setting_left_pane"> + <field name="module_account_bank_statement_import_ofx" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_bank_statement_import_ofx" string="OFX Import"/> + <div class="text-muted"> + Import your bank statements in OFX + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="import_bank_statement_camt" + title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard."> + <div class="o_setting_left_pane"> + <field name="module_account_bank_statement_import_camt" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_bank_statement_import_camt" string="CAMT Import"/> + <div class="text-muted"> + Import your bank statements in CAMT.053 + </div> + </div> + </div> + </div> + </t> + <t groups="account.group_account_user"> + <h2>Fiscal Periods</h2> + <div class="row mt16 o_settings_container" id="accounting_reports"> + <div class="col-12 col-lg-6 o_setting_box" id="fiscalyear" invisible="1" groups="account.group_account_user"/> + <div class="col-12 col-lg-6 o_setting_box" id="dynamic_report" invisible="1" groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="module_account_reports" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_reports"/> + <div class="text-muted" id="account_reports"> + Navigate easily through reports and see what is behind the numbers + </div> + </div> + </div> + </div> + </t> + <h2>Analytics</h2> + <div class="row mt16 o_settings_container" id="analytic"> + <div class="col-12 col-lg-6 o_setting_box" + id="track_costs_revenues" + title="Allows you to use the analytic accounting." + groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="group_analytic_accounting"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_analytic_accounting"/> + <div class="text-muted"> + Track costs & revenues by project, department, etc + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" + id="tag_analytic_entries" + groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="group_analytic_tags"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_analytic_tags"/> + <div class="text-muted"> + Allows to tag analytic entries and to manage analytic distributions + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="account_budget" title="This allows accountants to manage analytic and crossovered budgets. Once the master budgets and the budgets are defined, the project managers can set the planned amount on each analytic account." groups="account.group_account_user"> + <div class="o_setting_left_pane"> + <field name="module_account_budget" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane" id="budget_management"> + <label for="module_account_budget"/> + <div class="text-muted"> + Use budgets to compare actual with expected revenues and costs + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="monitor_product_margins"> + <div class="o_setting_left_pane"> + <field name="module_product_margin"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_product_margin" string="Margin Analysis"/> + <div class="text-muted"> + Monitor your product margins from invoices + </div> + </div> + </div> + </div> + </div> + </xpath> + </field> + </record> + + <record id="action_account_config" model="ir.actions.act_window"> + <field name="name">Settings</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">res.config.settings</field> + <field name="view_mode">form</field> + <field name="target">inline</field> + <field name="context">{'module' : 'account', 'bin_size': False}</field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/res_currency.xml b/addons/account/views/res_currency.xml new file mode 100644 index 00000000..96535806 --- /dev/null +++ b/addons/account/views/res_currency.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="res_currency_form_inherit" model="ir.ui.view"> + <field name="name">res.currency.form.inherit</field> + <field name="model">res.currency</field> + <field name="inherit_id" ref="base.view_currency_form"/> + <field name="arch" type="xml"> + <xpath expr="//sheet" position="before"> + <field name="display_rounding_warning" invisible="1"/> + <div class="alert alert-warning" role="alert" attrs="{'invisible': [('display_rounding_warning', '=', False)]}"> + <strong>This currency has already been used to generate accounting entries.</strong> <br/> + Changing its rounding factor now will not change the rounding made on previous entries; possibly causing an inconsistency with the new ones. + </div> + </xpath> + </field> + </record> + + </data> +</odoo>
\ No newline at end of file diff --git a/addons/account/views/res_partner_bank_views.xml b/addons/account/views/res_partner_bank_views.xml new file mode 100644 index 00000000..0db2de8b --- /dev/null +++ b/addons/account/views/res_partner_bank_views.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="view_company_partner_bank_form" model="ir.ui.view"> + <field name="name">company.res.partner.bank.form</field> + <field name="model">res.partner.bank</field> + <field name="inherit_id" ref="base.view_partner_bank_form"/> + <field name="mode">primary</field> + <field name="priority">20</field> + <field name="arch" type="xml"> + <xpath expr="//field[@name='partner_id']" position="attributes"> + <attribute name="invisible">1</attribute> + </xpath> + </field> + </record> + + <record id="action_new_bank_setting" model="ir.actions.server"> + <field name="name">Add a Bank Account</field> + <field name="model_id" ref="model_res_company"/> + <field name="state">code</field> + <field name="code"> +action = model.setting_init_bank_account_action() + </field> + </record> + + </data> +</odoo> diff --git a/addons/account/views/tax_adjustments.xml b/addons/account/views/tax_adjustments.xml new file mode 100644 index 00000000..e1c8f41e --- /dev/null +++ b/addons/account/views/tax_adjustments.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="tax_adjustments_form" model="ir.actions.act_window"> + <field name="name">Tax Adjustments</field> + <field name="res_model">tax.adjustments.wizard</field> + <field name="view_mode">form</field> + <field name="target">new</field> + </record> +</odoo> |
