You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
1.2 KiB
Python
21 lines
1.2 KiB
Python
8 months ago
|
# -*- coding: utf-8 -*-
|
||
|
from odoo import api, fields, models, _
|
||
|
from odoo.osv import expression
|
||
|
from odoo.exceptions import UserError, ValidationError
|
||
|
from odoo.addons.base.models.res_bank import sanitize_account_number
|
||
|
from odoo.tools import remove_accents
|
||
|
import logging
|
||
|
import re
|
||
|
|
||
|
|
||
|
class AccountJournal(models.Model):
|
||
|
_inherit = "account.journal"
|
||
|
|
||
|
suspense_account_id = fields.Many2one(
|
||
|
comodel_name='account.account', check_company=True, ondelete='restrict', readonly=False, store=True,
|
||
|
compute='_compute_suspense_account_id',
|
||
|
help="Bank statements transactions will be posted on the suspense account until the final reconciliation "
|
||
|
"allowing finding the right account.", string='Suspense Account',
|
||
|
# domain=lambda self: "[('deprecated', '=', False), ('company_id', '=', company_id), ('user_type_id.type', 'not in', ('receivable', 'payable')), ('user_type_id', '=', %s)]" % self.env.ref('account.data_account_type_current_assets').id)
|
||
|
domain=lambda self: "[('deprecated', '=', False), ('company_id', '=', company_id), ('account_type', 'not in', ('receivable', 'payable')), ('account_type', '=', %s)]" % self.env.ref('account_depends.data_account_type_current_assets').id)
|