[MIG] account_usability_misc: Migration to 18.0
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
account_usability_misc
|
||||
======================
|
||||
|
||||
Various chantes to improve the usability of Account application
|
||||
Various changes to improve the usability of Account application
|
||||
|
||||
Installation
|
||||
============
|
||||
@@ -10,13 +10,19 @@ Installation
|
||||
Use Odoo normal module installation procedure to install
|
||||
``account_usability_misc``.
|
||||
|
||||
This module depends on:
|
||||
|
||||
* ``account``
|
||||
* ``base``
|
||||
* ``account_reconcile_oca`` (available in OCA/account-reconcile repository)
|
||||
* ``account_statement_base`` (available in OCA/account-reconcile repository)
|
||||
|
||||
Description
|
||||
===========
|
||||
|
||||
- Removes the right to unlink bank statements and bank statement lines for all users
|
||||
- Changes some french translation
|
||||
- On reconcile view : filter account move lines by defaut with journal type
|
||||
- Hide Create button in Bank Statement tree view
|
||||
- Create a technical group with unlink righ on bank statements and bank statement lines
|
||||
|
||||
Known issues / Roadmap
|
||||
@@ -27,7 +33,7 @@ None yet.
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/bank_statement_line_prevent_creating/issues>`_. In case of
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/account-tools/issues>`_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
@@ -1 +1 @@
|
||||
from . import models
|
||||
from . import models
|
||||
|
||||
@@ -1,26 +1,25 @@
|
||||
# Copyright 2025 Elabore
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Usability Misc',
|
||||
'version': '16.0.2.0.0',
|
||||
'description': 'account usability misc : improve account usability in v16',
|
||||
'summary': 'Various chantes to improve the usability of Account application',
|
||||
'author': 'Elabore',
|
||||
'website': 'https://git.elabore.coop/elabore/account-tools',
|
||||
'license': 'AGPL-3',
|
||||
'category': 'Accounting',
|
||||
'depends': [
|
||||
'account',
|
||||
'base',
|
||||
'account_reconcile_oca',
|
||||
'account_statement_base',
|
||||
"name": "Account Usability Misc",
|
||||
"version": "18.0.1.0.0",
|
||||
"summary": "Various changes to improve the usability of Account application",
|
||||
"author": "Elabore",
|
||||
"website": "https://git.elabore.coop/elabore/account-tools",
|
||||
"license": "AGPL-3",
|
||||
"category": "Accounting",
|
||||
"depends": [
|
||||
"account",
|
||||
"account_reconcile_oca",
|
||||
"account_statement_base",
|
||||
],
|
||||
'data': [
|
||||
'views/account_search.xml',
|
||||
'views/account_tree_view.xml',
|
||||
'views/bank_statement_line_views.xml',
|
||||
'views/bank_statement_views.xml',
|
||||
"data": [
|
||||
"views/account_search.xml",
|
||||
"views/account_tree_view.xml",
|
||||
"views/bank_statement_line_views.xml",
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': False,
|
||||
'assets': {},
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
||||
|
||||
@@ -4,11 +4,17 @@ from odoo import fields, models
|
||||
class AccountBankStatementLine(models.Model):
|
||||
_inherit = "account.bank.statement.line"
|
||||
|
||||
move_line_journal_type = fields.Char(string="Journal Type", compute="_compute_move_line_journal_type")
|
||||
move_line_journal_type = fields.Char(
|
||||
string="Journal Type", compute="_compute_move_line_journal_type"
|
||||
)
|
||||
|
||||
def _compute_move_line_journal_type(self):
|
||||
for rec in self:
|
||||
if self._context.get('default_journal_id'):
|
||||
rec.move_line_journal_type = self.env["account.journal"].browse(self._context.get('default_journal_id')).type
|
||||
if self._context.get("default_journal_id"):
|
||||
rec.move_line_journal_type = (
|
||||
self.env["account.journal"]
|
||||
.browse(self._context.get("default_journal_id"))
|
||||
.type
|
||||
)
|
||||
else:
|
||||
rec.move_line_journal_type = None
|
||||
|
||||
@@ -1,39 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="account_move_line_search_reconcile_view_inherit" model="ir.ui.view">
|
||||
<field name="name">Account move line search reconcile view inherit</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account_reconcile_oca.account_move_line_search_reconcile_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="filter_domain">['|', '|', '|', ('name', 'ilike', self), ('amount_residual', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self)]</attribute>
|
||||
<attribute name="string">Amount/Name/Partner</attribute>
|
||||
</field>
|
||||
</data>
|
||||
<record id="account_move_line_search_reconcile_view_inherit" model="ir.ui.view">
|
||||
<field name="name">Account move line search reconcile view inherit</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_reconcile_oca.account_move_line_search_reconcile_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="attributes">
|
||||
<attribute
|
||||
name="filter_domain"
|
||||
>['|', '|', '|', ('name', 'ilike', self), ('amount_residual', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self)]</attribute>
|
||||
<attribute name="string">Amount/Name/Partner</attribute>
|
||||
</field>
|
||||
</record>
|
||||
<record id="bank_statement_line_form_reconcile_view_inerit" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.reconcile.inherit</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="inherit_id" ref="account_reconcile_oca.bank_statement_line_form_reconcile_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='add_account_move_line_id']" position="before">
|
||||
<field name='move_line_journal_type' invisible="1"></field>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='add_account_move_line_id']" position="attributes">
|
||||
<attribute name="context">{
|
||||
'search_default_cash': move_line_journal_type == 'cash',
|
||||
'search_default_purchases': move_line_journal_type == 'purchases',
|
||||
'search_default_sales': move_line_journal_type == 'sales',
|
||||
'search_default_general': move_line_journal_type == 'general',
|
||||
'search_default_partner_id': partner_id,
|
||||
'tree_view_ref': 'account_reconcile_oca.account_move_line_tree_reconcile_view',
|
||||
'search_view_ref': 'account_reconcile_oca.account_move_line_search_reconcile_view'}</attribute>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
<record id="bank_statement_line_form_reconcile_view_inerit" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.reconcile.inherit</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_reconcile_oca.bank_statement_line_form_reconcile_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='add_account_move_line_id']" position="before">
|
||||
<field name="move_line_journal_type" invisible="1" />
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='add_account_move_line_id']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="context">{
|
||||
'search_default_cash': move_line_journal_type == 'cash',
|
||||
'search_default_purchases': move_line_journal_type == 'purchases',
|
||||
'search_default_sales': move_line_journal_type == 'sales',
|
||||
'search_default_general': move_line_journal_type == 'general',
|
||||
'search_default_partner_id': partner_id,
|
||||
'list_view_ref': 'account_reconcile_oca.account_move_line_tree_reconcile_view',
|
||||
'search_view_ref': 'account_reconcile_oca.account_move_line_search_reconcile_view'}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="account_view_tree_inherit_message_attachment" model="ir.ui.view">
|
||||
<field name="name">account view tree inherit message attachment</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_in_invoice_bill_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="state" position="after">
|
||||
<field name="message_attachment_count"/>
|
||||
</field>
|
||||
</data>
|
||||
<record id="account_view_tree_inherit_message_attachment" model="ir.ui.view">
|
||||
<field name="name">account view tree inherit message attachment</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_in_invoice_bill_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="status_in_payment" position="after">
|
||||
<field name="message_attachment_count" />
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,32 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Hide Create button in line view -->
|
||||
<record
|
||||
id="account_bank_statement_line_tree_inherit_hide_create"
|
||||
model="ir.ui.view"
|
||||
>
|
||||
<field name="name">account.bank.statement.line.tree.inherit.hide.create</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_statement_base.account_bank_statement_line_tree"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="create">false</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Hide Create button in line view -->
|
||||
|
||||
<record id="account_bank_statement_line_tree_inherit_hide_create" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.tree.inherit.hide.create</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="inherit_id" ref="account_statement_base.account_bank_statement_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="create">false</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Hide Create button in kanban view -->
|
||||
|
||||
<record id="account_bank_statement_line_kanban_inherit_hide_create" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.kanban.inherit.hide.create</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="inherit_id" ref="account_reconcile_oca.bank_statement_line_reconcile_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//kanban" position="attributes">
|
||||
<attribute name="create">false</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<!-- Hide Create button in kanban view -->
|
||||
<record
|
||||
id="account_bank_statement_line_kanban_inherit_hide_create"
|
||||
model="ir.ui.view"
|
||||
>
|
||||
<field
|
||||
name="name"
|
||||
>account.bank.statement.line.kanban.inherit.hide.create</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_reconcile_oca.bank_statement_line_reconcile_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//kanban" position="attributes">
|
||||
<attribute name="create">false</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<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="inherit_id" ref="account.view_bank_statement_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<tree position="attributes">
|
||||
<attribute name="create">false</attribute>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user