[ADD] module account_statement_base

This module contains the views of account.bank.statement.line, which
have been removed from the account module in Odoo v16
pull/514/head
Alexis de Lattre 2023-01-18 21:25:36 +01:00
parent 4e51b3c1f2
commit fafb066e58
8 changed files with 176 additions and 0 deletions

View File

@ -0,0 +1 @@
Will be auto-generated from the readme subdir

View File

@ -0,0 +1,17 @@
# Copyright 2023 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Bank Statement Base",
"version": "16.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Base module for Bank Statements",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/account-reconcile",
"depends": ["account"],
"data": ["views/account_bank_statement_line.xml"],
"installable": True,
}

View File

@ -0,0 +1 @@
* Alexis de Lattre <alexis.delattre@akretion.com>

View File

@ -0,0 +1 @@
This is a technical module that adds the views of the **Bank Statement Lines** (since Odoo 16.0, these views are not part of the *account* module any more).

View File

@ -0,0 +1,149 @@
<?xml version="1.0" ?>
<!--
Copyright 2022-2023 CreuBlanca
Copyright 2023 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
Licence LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
-->
<odoo>
<record id="account_bank_statement_line_form" model="ir.ui.view">
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<form>
<group name="main">
<field name="company_id" invisible="1" />
<field name="currency_id" invisible="1" />
<field name="country_code" invisible="1" />
<field name="state" invisible="1" />
<field name="suitable_journal_ids" invisible="1" />
<field name="date" />
<field name="payment_ref" required="1" />
<field name="partner_id" />
<field name="amount" />
<field
name="foreign_currency_id"
domain="[('id', '!=', currency_id)]"
groups="base.group_multi_currency"
/>
<field name="amount_currency" groups="base.group_multi_currency" />
<field name="partner_bank_id" />
<field
name="journal_id"
invisible="context.get('default_journal_id')"
/>
<field name="move_id" />
<field
name="statement_id"
domain="[('journal_id', '=', journal_id)]"
invisible="not context.get('account_bank_statement_line_main_view')"
/>
</group>
<notebook>
<page name="narration" string="Notes">
<field name="narration" nolabel="1" colspan="2" />
</page>
<page name="technical" string="Technical Information">
<group name="tech-fields">
<field name="transaction_type" />
<field name="partner_name" />
<field name="account_number" />
<field name="is_reconciled" />
<field name="payment_ids" widget="many2many_tags" />
</group>
</page>
</notebook>
</form>
</field>
</record>
<record id="account_bank_statement_line_tree" model="ir.ui.view">
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<tree decoration-muted="is_reconciled">
<field name="sequence" widget="handle" />
<field name="date" />
<field name="payment_ref" />
<field name="ref" optional="hide" />
<field name="partner_id" />
<field name="amount" />
<field
name="amount_currency"
optional="hide"
groups="base.group_multi_currency"
/>
<field name="narration" optional="hide" string="Notes" />
<field name="journal_id" optional="hide" />
<field name="partner_bank_id" optional="hide" />
<button
name="action_undo_reconciliation"
type="object"
string="Revert reconciliation"
icon="fa-undo"
attrs="{'invisible': [('is_reconciled', '=', False)]}"
/>
<field name="company_id" invisible="1" />
<field name="is_reconciled" invisible="1" />
<field name="currency_id" invisible="1" />
<field name="foreign_currency_id" invisible="1" />
<field name="country_code" invisible="1" />
<field name="state" invisible="1" />
</tree>
</field>
</record>
<record id="account_bank_statement_line_search" model="ir.ui.view">
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<search>
<field
name="payment_ref"
filter_domain="['|', '|', ('payment_ref', 'ilike', self), ('ref', 'ilike', self), ('narration', 'ilike', self)]"
string="Label, Ref or Notes"
/>
<field name="partner_id" />
<field name="date" />
<field name="journal_id" domain="[('type', 'in', ('bank', 'cash'))]" />
<field name="amount" />
<separator />
<filter
name="reconciled"
string="Reconciled"
domain="[('is_reconciled', '=', True)]"
/>
<filter
name="not_reconciled"
string="Not Reconciled"
domain="[('is_reconciled', '=', False)]"
/>
<separator />
<filter name="date" string="Date" date="date" />
<group name="groupby">
<filter
name="partner_groupby"
string="Partner"
context="{'group_by': 'partner_id'}"
/>
<filter
name="journal_groupby"
string="Journal"
context="{'group_by': 'journal_id'}"
/>
<filter
name="transaction_type_groupby"
string="Transaction Type"
context="{'group_by': 'transaction_type'}"
/>
</group>
</search>
</field>
</record>
<record id="account_bank_statement_line_action" 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="context">{'account_bank_statement_line_main_view': True}</field>
</record>
</odoo>

View File

@ -0,0 +1 @@
../../../../account_statement_base

View File

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)