mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
Merge branch 'fix-permission-does-not-exist-for-base-invoice' into 'dev'
fix: Permission DoesNotExist when accessing BaseInvoice history See merge request re2o/re2o!595
This commit is contained in:
commit
c53be08058
2 changed files with 25 additions and 0 deletions
19
cotisations/migrations/0003_auto_20210124_1105.py
Normal file
19
cotisations/migrations/0003_auto_20210124_1105.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# -*- 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):
|
class BaseInvoice(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
date = models.DateTimeField(auto_now_add=True, verbose_name=_("date"))
|
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
|
# TODO : change prix to price
|
||||||
def prix(self):
|
def prix(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue