Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Re2o
re2o
Commits
1a9d3d08
Commit
1a9d3d08
authored
Jan 24, 2021
by
klafyvel
Committed by
Gabriel Detraz
Jan 24, 2021
Browse files
fix: Permission DoesNotExist when accessing BaseInvoice history
See the issue for details. Closes
#317
.
parent
fdb0b0b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
cotisations/migrations/0003_auto_20210124_1105.py
0 → 100644
View file @
1a9d3d08
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-01-24 10:05
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'cotisations'
,
'0002_foreign_keys'
),
]
operations
=
[
migrations
.
AlterModelOptions
(
name
=
'baseinvoice'
,
options
=
{
'permissions'
:
((
'view_baseinvoice'
,
'Can view an base invoice object'
),)},
),
]
cotisations/models.py
View file @
1a9d3d08
...
...
@@ -60,6 +60,12 @@ from cotisations.validators import check_no_balance
class
BaseInvoice
(
RevMixin
,
AclMixin
,
FieldPermissionModelMixin
,
models
.
Model
):
date
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
_
(
"date"
))
class
Meta
:
abstract
=
False
permissions
=
(
(
"view_baseinvoice"
,
_
(
"Can view an base invoice object"
)),
)
# TODO : change prix to price
def
prix
(
self
):
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment