From 2263b97d78d8f26512a0613582f73d33f601ea3a Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sun, 15 Jul 2018 20:22:48 +0200 Subject: [PATCH] Le droit add_facture englobe buy_every_article et use_every_payment --- cotisations/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cotisations/models.py b/cotisations/models.py index 8b2d5430..c35f0220 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -565,7 +565,8 @@ class Article(RevMixin, AclMixin, models.Model): """ return ( self.available_for_everyone - or user.has_perm('cotisations.buy_every_article'), + or user.has_perm('cotisations.buy_every_article') + or user.has_perm('cotisations.add_facture'), _("You cannot buy this Article.") ) @@ -701,7 +702,8 @@ class Paiement(RevMixin, AclMixin, models.Model): """ return ( self.available_for_everyone - or user.has_perm('cotisations.use_every_payment'), + or user.has_perm('cotisations.use_every_payment') + or user.has_perm('cotisations.add_facture'), _("You cannot use this Payment.") )