Skip to content

Commit

Permalink
Merge PR #421 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Jan 28, 2025
2 parents 50cba6f + 117425e commit f7fb679
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions fermente_account/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
1 change: 1 addition & 0 deletions fermente_account/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_account
20 changes: 20 additions & 0 deletions fermente_account/models/account_account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2025 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import api, models


class AccountAccount(models.Model):
_inherit = "account.account"

@api.model
def _get_most_frequent_accounts_for_partner(
self,
company_id,
partner_id,
move_type,
filter_never_user_accounts=False,
limit=None,
):
return []
20 changes: 19 additions & 1 deletion fermente_account/views/view_account_journal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_account_journal_form" model="ir.ui.view">
<record id="view_account_journal_tree" model="ir.ui.view">
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_tree"/>
<field name="arch" type="xml">
Expand All @@ -22,4 +22,22 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</field>
</record>

<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="attrs">{
'required': [
('id', '!=', False),
('type', 'in', ('bank', 'cash')),
],
'invisible': [('type', 'in', (False, 'general'))]
}</attribute>
</field>

</field>
</record>

</odoo>

0 comments on commit f7fb679

Please sign in to comment.