Compare commits
1 Commits
16.0-ci
...
16.0-bank-
Author | SHA1 | Date | |
---|---|---|---|
|
dbbb84a61b |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Account Usability Misc',
|
||||
'version': '16.0.2.0.0',
|
||||
'version': '16.0.2.0.1',
|
||||
'description': 'account usability misc : improve account usability in v16',
|
||||
'summary': 'Various chantes to improve the usability of Account application',
|
||||
'author': 'Elabore',
|
||||
@@ -8,7 +8,9 @@
|
||||
'license': 'AGPL-3',
|
||||
'category': 'Accounting',
|
||||
'depends': [
|
||||
'account','base','account_reconcile_oca',
|
||||
'account',
|
||||
'base',
|
||||
'account_reconcile_oca',
|
||||
'account_statement_base',
|
||||
],
|
||||
'data': [
|
||||
@@ -16,12 +18,11 @@
|
||||
'security/ir.model.access.csv',
|
||||
'views/account_search.xml',
|
||||
'views/account_tree_view.xml',
|
||||
"views/bank_statement_line_views.xml",
|
||||
"views/bank_statement_views.xml",
|
||||
'views/bank_statement_line_views.xml',
|
||||
'views/bank_statement_views.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': False,
|
||||
'assets': {
|
||||
}
|
||||
'assets': {},
|
||||
}
|
||||
|
@@ -1 +1,2 @@
|
||||
from . import account_bank_statement_line
|
||||
from . import account_move_line
|
||||
|
14
account_usability_misc/models/account_move_line.py
Normal file
14
account_usability_misc/models/account_move_line.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = 'account.move.line'
|
||||
|
||||
reconcile_filter = fields.Boolean(
|
||||
string='Reconcile Filter', default=True, compute='_compute_reconcile_filter', store=True
|
||||
)
|
||||
|
||||
@api.depends('date', 'date_maturity')
|
||||
def _compute_reconcile_filter(self):
|
||||
for rec in self:
|
||||
rec.reconcile_filter = rec.date.day % 2 == 0
|
@@ -2,4 +2,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
account.access_account_bank_statement,account.bank.statement,account.model_account_bank_statement,account.group_account_user,1,1,1,0
|
||||
account.access_account_bank_statement_line,account.bank.statement.line,account.model_account_bank_statement_line,account.group_account_user,1,1,1,0
|
||||
access_account_bank_statement,account.bank.statement,account.model_account_bank_statement,group_account_super_user,1,1,1,1
|
||||
access_account_bank_statement_line,account.bank.statement.line,account.model_account_bank_statement_line,group_account_super_user,1,1,1,1
|
||||
access_account_bank_statement_line,account.bank.statement.line,account.model_account_bank_statement_line,group_account_super_user,1,1,1,1
|
||||
access_account_move_line,account.move.line,account.model_account_move_line,group_account_super_user,1,1,1,1
|
|
@@ -17,10 +17,7 @@
|
||||
<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="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>
|
||||
@@ -29,14 +26,35 @@
|
||||
<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_reconcile_filter': True,
|
||||
'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>
|
||||
|
||||
<record id="account_move_line_search_inerit" model="ir.ui.view">
|
||||
<field name="name">account.move.line.list.reconcile.inherit</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account_reconcile_oca.account_move_line_tree_reconcile_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='date']" position="before">
|
||||
<field name="reconcile_filter"></field>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="inherit_account_move_line_search_reconcile_view" model="ir.ui.view">
|
||||
<field name="name">account.move.line.search.reconcile.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">
|
||||
<filter name="sales" position="before">
|
||||
<filter string="reconcile_filter" name="reconcile_filter" domain="[('reconcile_filter', '=', True)]" context="{'default_reconcile_filter': True}" />
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
|
Reference in New Issue
Block a user