blob: 801dad6a7ff19ca0e775a9c7df0f03205980243b (
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('Anda tidak memiliki akses')
self.is_edit = True
def not_edited(self):
if not self.env.user.is_admin_reconcile:
raise UserError('Anda tidak memiliki akses')
self.is_edit = False
|