Commit 1a9d3d08 authored by klafyvel's avatar klafyvel Committed by Gabriel Detraz
Browse files

fix: Permission DoesNotExist when accessing BaseInvoice history

See the issue for details.

Closes #317 .
parent fdb0b0b1
# -*- 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'),)},
),
]
......@@ -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):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment