Browse Source
Merge pull request #308 from akretion/12-agree-misc
[FIX] agreement: Missing security rule
pull/312/head
Maxime Chambreuil
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
agreement/models/agreement.py
-
agreement/security/ir.model.access.csv
|
|
@ -16,8 +16,7 @@ class Agreement(models.Model): |
|
|
|
domain=[('parent_id', '=', False)]) |
|
|
|
company_id = fields.Many2one( |
|
|
|
'res.company', string='Company', |
|
|
|
default=lambda self: self.env['res.company']._company_default_get( |
|
|
|
'agreement')) |
|
|
|
default=lambda self: self.env['res.company']._company_default_get()) |
|
|
|
active = fields.Boolean(default=True) |
|
|
|
signature_date = fields.Date() |
|
|
|
start_date = fields.Date() |
|
|
@ -28,7 +27,7 @@ class Agreement(models.Model): |
|
|
|
for agr in self: |
|
|
|
name = agr.name |
|
|
|
if agr.code: |
|
|
|
name = u'[%s] %s' % (agr.code, agr.name) |
|
|
|
name = '[%s] %s' % (agr.code, agr.name) |
|
|
|
res.append((agr.id, name)) |
|
|
|
return res |
|
|
|
|
|
|
|
|
|
@ -1,2 +1,3 @@ |
|
|
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
|
|
|
access_agreement_read,Read access on agreement to Employees,model_agreement,base.group_user,1,0,0,0 |
|
|
|
access_agreement_full,Full access on agreement grp,model_agreement,base.group_no_one,1,1,1,1 |