-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
======================================== | ||
Netherlands - RGS Accounting - Usability | ||
======================================== | ||
|
||
This module contains usability improvements for RGS accounting that are not fitting | ||
in module l10n_nl_rgs. The idea is to leave l10n_nl_rgs as much generic as possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
{ | ||
'name': 'Netherlands - RGS Accounting - Usability', | ||
"version": "16.0.1.0.0", | ||
'category': 'Accounting/Localizations/Account Charts', | ||
'author': 'Onestein', | ||
'website': 'https://www.onestein.eu', | ||
'depends': [ | ||
'l10n_nl_rgs', | ||
'base_view_inheritance_extension', | ||
], | ||
'data': [ | ||
'views/account_journal_views.xml', | ||
], | ||
'auto_install': True, | ||
'installable': True, | ||
'license': 'LGPL-3', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import account_account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
from odoo import api, fields, models, _ | ||
|
||
|
||
class AccountAccount(models.Model): | ||
_inherit = 'account.account' | ||
|
||
@api.model | ||
def name_search(self, name, args=None, operator="ilike", limit=100): | ||
chart_template = self.env.company.chart_template_id | ||
is_rgs = chart_template == self.env.ref('l10n_nl_rgs.l10nnl_rgs_chart_template') | ||
is_bank = self.env.context.get('domain_account_journal_type') == "bank" | ||
prefix = chart_template.bank_account_code_prefix | ||
if is_rgs and is_bank and prefix and operator == "ilike": | ||
args = args or [] | ||
args = [("code", "=ilike", prefix + "%")] + args | ||
return super().name_search(name, args=args, operator=operator, limit=limit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="view_account_journal_form" model="ir.ui.view"> | ||
<field name="model">account.journal</field> | ||
<field name="inherit_id" ref="account.view_account_journal_form"/> | ||
<field name="arch" type="xml"> | ||
<field name='default_account_id' position="attributes"> | ||
<attribute name="context" operation="update"> | ||
{ | ||
"domain_account_journal_type": type, | ||
} | ||
</attribute> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters