blob: 23008f13c4f5500cd18d0d4366e418d18e87e6a0 (
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)
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
|