Commit graph

1428 commits

Author SHA1 Message Date
Aurélien Delobelle b0d35667b3 Merge branch 'master' into aureplop/kpsul_js_refactor 2017-04-14 15:56:44 +02:00
Ludovic Stephan 55b509b3dd Merge branch 'aureplop/fix_negative' into 'master'
Check negative on cancellation.

Closes #156

See merge request !223
2017-04-13 18:20:24 +02:00
Aurélien Delobelle 9668f1d1ec Account: check_negative() -> update_negative() 2017-04-13 15:48:13 +02:00
Aurélien Delobelle 18425b82c2 Check negative on cancellation.
- Like perform operations, cancel_operations can add/remove an account
  from negative accounts system.
- Balances checks are now performed against real_balance instead of
  balance.
  So if someone with a balance_offset go, for real, to positive land (ie even
  without taking into account the balance offset), its account is removed from
  the negative system.
- Fix bug on real_balance when negative exists but balance_offset is
  not set.

Fixes #156.
2017-04-13 15:15:59 +02:00
Martin Pepin a725f8020c Merge branch 'aureplop/clean_channels' into 'master'
Aureplop/clean channels

Closes #67

See merge request !220
2017-04-11 00:42:08 +02:00
Aurélien Delobelle b357283f87 Merge branch 'master' into aureplop/clean_channels 2017-04-11 00:32:07 +02:00
Martin Pepin a68002d0f6 Merge branch 'aureplop/fix_double_js' into 'master'
Fix stats on some browsers

See merge request !219
2017-04-10 23:59:02 +02:00
Martin Pepin 495c6ac3d1 Merge branch 'aureplop/kfet_config' into 'master'
Configuration utilisateur K-Fêt

See merge request !210
2017-04-10 21:14:37 +02:00
Aurélien Delobelle c75b2946e3 Merge branch 'master' into aureplop/kpsul_js_refactor 2017-04-10 13:08:23 +02:00
Aurélien Delobelle 5d6012b6bd Fix kfet tests
- and add test for `kfet_config.subvention_cof`
2017-04-10 11:52:57 +02:00
Aurélien Delobelle c228416809 Subvention -> Réduction + units for kfet_config
- kfet_config gives "reduction_cof" as editable instead of
  "subvention_cof"
- this last one can still be accessed via kfet_config (computed from
  new "reduction_cof"
- add units to numeric values of kfet_config form
2017-04-10 11:36:06 +02:00
Aurélien Delobelle 7fc07ac603 Merge branch 'Aufinal/clean_modelforest' into 'aureplop/kpsul_js_refactor'
Change ModelForest inner structure
- Intermediary model for nodes removed
- More descriptive ModelForest structure in constructor.structure, child_sort not defined in Python function anymore.
- More intuitive access to parent and children of nodes (e.g. article.category, category.articles...)

See merge request !215
2017-04-09 21:28:16 +02:00
Ludovic Stephan 323f019c0d Check if children is non empty 2017-04-09 13:35:01 -03:00
Ludovic Stephan 9ad208a171 Change child sort + bugfix grom prev commit 2017-04-09 12:30:15 -03:00
Ludovic Stephan 73fb3c419e Add stop check in traverse 2017-04-09 11:43:51 -03:00
Aurélien Delobelle 029d59e615 Enable authentication on KPsul websocket.
- PermConsumerMixin allows checking permissions on connection to a
  consumer.
- KPsul consumer uses this mixin to check if connecting user has the
  permission `kfet.is_team`.

Fixes #67.
2017-04-09 16:10:27 +02:00
Aurélien Delobelle 1e18c4043e Use last channels & co versions
- Use last official releases of channels, asgiref, daphne and
  asgi-redis packages.
- Customization of JsonWebsocketConsumer is now in kfet app through a
  custom class (and so, doesn't require anymore a forked version of channels).
- Clean kfet consumers code.
2017-04-09 15:47:16 +02:00
Aurélien Delobelle ebfe5c41d4 Fix stats on some browsers
- Delete double import in account_read template
- Syntax on account_read

Stats didn't show on Chrome (at least v57) cause of these.
2017-04-09 01:52:26 +02:00
Aurélien Delobelle e89ff68d3b add misisng import 2017-04-09 01:39:18 +02:00
Aurélien Delobelle 457ee64004 update migrations order 2017-04-08 18:38:47 +02:00
Aurélien Delobelle 784ba9bd10 Merge branch 'master' into aureplop/kfet_config 2017-04-08 18:36:28 +02:00
Aurélien Delobelle 15861824b6 Merge branch 'Aufinal/tabs' into 'master'
K-Fêt
- Détails d'un compte: historique et stats sont accessibles par des onglets.

See merge request !218
2017-04-08 14:41:36 +02:00
Ludovic Stephan 4a6bfd5e3d Better button distinction 2017-04-07 12:58:03 -03:00
Ludovic Stephan 052e7b2b6e Move navigation to content-left 2017-04-07 12:17:36 -03:00
Ludovic Stephan e26668e5eb Add tabs to account_read 2017-04-06 21:17:47 -03:00
Aurélien Delobelle a0979c220b Merge branch 'bda_pep8' into 'master'
Clean the `bda.views.catalogue` view

See merge request !212
2017-04-06 21:24:18 +02:00
Ludovic Stephan 9ba13a81ee Adapt add_to_container + small improvements 2017-04-06 00:10:39 -03:00
Ludovic Stephan 23d19545a7 Add back root_sort 2017-04-05 22:23:56 -03:00
Ludovic Stephan df47bedae1 Change ModelForest inner structure 2017-04-05 22:10:21 -03:00
Ludovic Stephan 5e68fcf315 Merge branch 'aureplop/hotfix' into 'master'
Aureplop/hotfix

See merge request !214
2017-04-06 00:32:29 +02:00
Aurélien Delobelle 4b2e20e728 created_at required with default 2017-04-06 00:31:04 +02:00
Aurélien Delobelle e2d7192b23 fix perform opes after account reset 2017-04-06 00:11:41 +02:00
Aurélien Delobelle c849306a32 fix kfet home template 2017-04-06 00:00:53 +02:00
Aurélien Delobelle e4dd434608 no longer use model_to_dict
- fix cof status on k-psul
2017-04-05 23:33:45 +02:00
Aurélien Delobelle e4ccd88dfd Merge branch 'master' into aureplop/kpsul_js_refactor 2017-04-05 23:18:33 +02:00
Martin Pépin 981759f5ce Adds tests covering the bda-catalogue JSON API 2017-04-05 21:02:00 +01:00
Martin Pépin 9ec151e040 A query optimization in bda.views.catalogue
We only need to fetch shows identifiers here:

    FOO.filter(BAR__in=shows)

which can be done using the `values_list` method
2017-04-05 20:48:18 +01:00
Martin Pépin ff9cee5ffc line too long in bda.models 2017-04-05 20:42:50 +01:00
Martin Pépin 853a239e6e Rewrite bda.views.catalogue
- No string concatenations
- Use `get_object_or_404` instead of performing a `.get` and catching
  the eventual exception.
- More accurate error messages when a bad request is detected.
- More accurate error handling
2017-04-05 19:53:04 +01:00
Aurélien Delobelle 6a8f41849b Merge branch 'Aufinal/refactor_articles' into 'aureplop/kpsul_js_refactor'
Aufinal/refactor articles

See merge request !173
2017-04-05 17:56:07 +02:00
Ludovic Stephan 5c422e892a Add children fo traverse callback 2017-04-05 12:31:19 -03:00
Ludovic Stephan 508e7ec23f Change traverse and find behavior 2017-04-05 12:00:39 -03:00
Aurélien Delobelle ebf948d042 Merge branch 'qwann/k-fet/category_addcost' into 'master'
K-Fêt - Majorations
- Seulement les catégories préalablement sélectionnées sont majorées le 
le cas échéant.
- Pour modifier cette sélection, suivre le lien "Catégories" depuis la
liste des articles.

Fixes #149

See merge request !189
2017-04-05 15:52:15 +02:00
Aurélien Delobelle 3ee9de93d9 few improvements on article category
- add verbose names to ArticleCategory fields
- add button to view categories list from articles list
- fix article_update template in form validation
- improve interface for articlecategory_update
- revert vanished urls (happened in merge with master...)
2017-04-05 15:34:28 +02:00
Aurélien Delobelle 42728e58be Merge branch 'master' into qwann/k-fet/category_addcost 2017-04-05 14:57:26 +02:00
Ludovic Stephan 1761c5f1bd Change fromAPI logic 2017-04-05 09:13:00 -03:00
Ludovic Stephan 840010b63f Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles 2017-04-05 09:03:59 -03:00
Ludovic Stephan a29de134f1 Move focus ; move is_low_stock to method 2017-04-05 08:58:46 -03:00
Aurélien Delobelle 2e0de75471 kpsul - fix account balance ukf 2017-04-05 13:18:01 +02:00
Aurélien Delobelle 6bb9280b0d Merge branch 'aureplop/clean_js' into 'aureplop/kpsul_js_refactor'
Enhance APIModelObject

See merge request !213
2017-04-05 04:30:34 +02:00