[IMP]account_usability_misc:add default filter by journal type on account move line list in reconcile view
This commit is contained in:
@@ -13,9 +13,10 @@ Use Odoo normal module installation procedure to install
|
||||
Description
|
||||
===========
|
||||
|
||||
- Hideq Create button in Bank Statement Line view without changing rights
|
||||
- Hide Create button in Bank Statement Line view without changing rights
|
||||
- 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
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
@@ -0,0 +1 @@
|
||||
from . import models
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Account Usability Misc',
|
||||
'version': '16.0.1.2.0',
|
||||
'version': '16.0.1.3.0',
|
||||
'description': 'account usability misc : improve account usability in v16',
|
||||
'summary': 'Various chantes to improve the usability of Account application',
|
||||
'author': 'Elabore',
|
||||
|
1
account_usability_misc/models/__init__.py
Normal file
1
account_usability_misc/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_bank_statement_line
|
14
account_usability_misc/models/account_bank_statement_line.py
Normal file
14
account_usability_misc/models/account_bank_statement_line.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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")
|
||||
|
||||
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
|
||||
else:
|
||||
rec.move_line_journal_type = None
|
@@ -14,5 +14,30 @@
|
||||
</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"></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_bank': move_line_journal_type == 'bank',
|
||||
'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>
|
||||
</odoo>
|
||||
|
Reference in New Issue
Block a user