summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_bank_statement.py
blob: 61e9ca315ec482bb6af44959d5859b5301c721be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from odoo import fields, models, api, _
from odoo.exceptions import AccessError, UserError, ValidationError

class AccountBankStatement(models.Model):
    _inherit = "account.bank.statement"

    is_edit = fields.Boolean(string='Unlock', default=False, tracking=True)

    def is_edited(self):
        if not self.env.user.is_admin_reconcile:
            raise UserError('Yang berhak hanya Mba Tania dan Iqmal Saputra')
        
        self.is_edit = True

    def not_edited(self):
        if not self.env.user.is_admin_reconcile:
            raise UserError('Yang berhak hanya Mba Tania dan Iqmal Saputra')
        
        self.is_edit = False