Bonjour,
J'obtiens un message d'erreur en cliquant sur le rapport 'Compte de gestion pour opérations courantes'.
J'ai un message d'erreur 'UNIQUE constraint failed: accounting_costaccounting.name'. cf copie d'écran en pièce-jointe.
Voici le détail du message :
#### UNIQUE constraint failed: accounting_costaccounting.name ####
c:\lucterios2\Python\lib\site-packages\django\views\generic\base.py in line 88 in dispatch : return handler(request, *args, **kwargs)
c:\lucterios2\Python\lib\site-packages\lucterios\framework\xferbasic.py in line 334 in post : return self.get_post(request, *args, **kwargs)
c:\lucterios2\Python\lib\site-packages\lucterios\framework\xferbasic.py in line 323 in get_post : self.fillresponse(**self._get_params())
c:\lucterios2\Python\lib\site-packages\diacamma\condominium\views_report.py in line 60 in fillresponse : self.fill_body()
c:\lucterios2\Python\lib\site-packages\diacamma\condominium\views_report.py in line 287 in fill_body : set_cost = classloaditem.create_new_cost(year=self.next_year)
c:\lucterios2\Python\lib\site-packages\diacamma\condominium\models.py in line 175 in create_new_cost : last_costaccounting=last_cost, year=year, is_protected=True)
c:\lucterios2\Python\lib\site-packages\django\db\models\manager.py in line 85 in manager_method : return getattr(self.get_queryset(), name)(*args, **kwargs)
c:\lucterios2\Python\lib\site-packages\django\db\models\query.py in line 394 in create : obj.save(force_insert=True, using=self.db)
c:\lucterios2\Python\lib\site-packages\diacamma\accounting\models.py in line 543 in save : res = LucteriosModel.save(self, force_insert=force_insert, force_update=force_update, using=using, update_fields=update_fields)
c:\lucterios2\Python\lib\site-packages\django\db\models\base.py in line 808 in save : force_update=force_update, update_fields=update_fields)
c:\lucterios2\Python\lib\site-packages\django\db\models\base.py in line 838 in save_base : updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
c:\lucterios2\Python\lib\site-packages\django\db\models\base.py in line 924 in _save_table : result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
c:\lucterios2\Python\lib\site-packages\django\db\models\base.py in line 963 in _do_insert : using=using, raw=raw)
c:\lucterios2\Python\lib\site-packages\django\db\models\manager.py in line 85 in manager_method : return getattr(self.get_queryset(), name)(*args, **kwargs)
c:\lucterios2\Python\lib\site-packages\django\db\models\query.py in line 1076 in _insert : return query.get_compiler(using=using).execute_sql(return_id)
c:\lucterios2\Python\lib\site-packages\django\db\models\sql\compiler.py in line 1112 in execute_sql : cursor.execute(sql, params)
c:\lucterios2\Python\lib\site-packages\django\db\backends\utils.py in line 79 in execute : return super(CursorDebugWrapper, self).execute(sql, params)
c:\lucterios2\Python\lib\site-packages\django\db\backends\utils.py in line 64 in execute : return self.cursor.execute(sql, params)
c:\lucterios2\Python\lib\site-packages\django\db\utils.py in line 94 in __exit__ : six.reraise(dj_exc_type, dj_exc_value, traceback)
c:\lucterios2\Python\lib\site-packages\django\utils\six.py in line 685 in reraise : raise value.with_traceback(tb)
c:\lucterios2\Python\lib\site-packages\django\db\backends\utils.py in line 64 in execute : return self.cursor.execute(sql, params)
c:\lucterios2\Python\lib\site-packages\django\db\backends\sqlite3\base.py in line 328 in execute : return Database.Cursor.execute(self, query, params)
J'ai un peu analysé le problème car cela semblait venir du nom des analytiques.
Mes analytiques avaient les noms suivants :
[1] DEPENSES GENERALES 2017
[1] DEPENSES GENERALES 2018
[1] DEPENSES GENERALES 2019
J'ai modifié le nom [1] DEPENSES GENERALES 2019 en DEPGEN2009 et le rapport s'affiche désormais normalement.