Commit graph

908 commits

Author SHA1 Message Date
Ludovic Stephan de865c61aa Move container clearing 2017-04-14 11:36:52 -03:00
Aurélien Delobelle b0d35667b3 Merge branch 'master' into aureplop/kpsul_js_refactor 2017-04-14 15:56:44 +02:00
Aurélien Delobelle 0a21858b33 Use css for scroll positionning
- Better rendering on scroll on pages with a left block
(- It removes the warning on Firefox about scroll positionning)
2017-04-14 13:08:03 +02:00
Aurélien Delobelle 7db497d095 Less articles prices history
- Prices given with order_to_inventory are saved to db only if they are
  updated (it doesn't create a new price row each time)

Fixes #142.
2017-04-13 16:34:29 +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
Aurélien Delobelle 06572f0bb5 Order create use Scale.
Order create view use WeekScale. No query improvements, only shorter
code.

Scale/ScaleMixin:
- Two methods directly relative to the Scale class move to... the Scale
  class.

- Fix order create on Chrome.
2017-04-13 14:11:44 +02:00
Aurélien Delobelle 3f4a1adbb9 Fewer queries on stats/scales + Fix
Scales:
- Fix #chunks when used with std_chunk=True (there was one too many at
  the beginning)
- Scale.end gives the end of the last chunk (instead of its start)
  So scale.begin -> scale.end gives the full range of the scale.

`kfet_day` now returns an aware datetime.

ScaleMixin:
- new method `get_by_chunks` which use only one query and ranks
  elements according to the scale. Elements are returned by a generator
  for each scale chunk (and all chunks are returned as a generator too).

ArticlesStatSales and AccountStatOperations use this new method to
avoid issuing #scale_chunks queries.

ArticleStat:
- fixed on Chrome
2017-04-12 18:03:31 +02:00
Aurélien Delobelle e97e0081d7 Fewer queries on stats of an account balance.
- Remove labels, should be replaced to an anchor to the relative
  operation in history.
- Add select_related as necessary.
2017-04-11 23:13:54 +02:00
Aurélien Delobelle b5cc26bb1b Merge branch 'master' into aureplop/fewer_requests 2017-04-11 22:46:18 +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
Ludovic Stephan 8c02e5da0c Trigger event on history itself 2017-04-10 15:40:29 -03:00
Ludovic Stephan 2eba6892a2 Revert "Change event triggered when canceling opes"
This reverts commit ce3d8aa6f7.
2017-04-10 15:34:57 -03:00
Ludovic Stephan ce3d8aa6f7 Change event triggered when canceling opes 2017-04-10 15:08:17 -03:00
Qwann be8d249ed7 remove useless code 2017-04-10 17:47:39 +02:00
Ludovic Stephan 84d478271b Compatibility changes on history.js 2017-04-10 12:34:43 -03:00
Ludovic Stephan cd0e4c6f3e Allow (basic) chaining on api_with_auth 2017-04-10 12:33:24 -03:00
Ludovic Stephan 983a55780f Add cancel_history event 2017-04-10 12:32:35 -03:00
Qwann e0b0a53112 stupidness removed 2017-04-10 17:18:43 +02:00
Qwann cb9ba76a4f small fixes 2017-04-10 16:47:13 +02:00
Ludovic Stephan cfb39b1050 Better default options 2017-04-10 11:30:00 -03: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
Ludovic Stephan 47da80f21c Add related objects 2017-04-09 23:24:50 -03:00
Ludovic Stephan 5e8752632c Add index for Day objects 2017-04-09 21:50:47 -03:00
Ludovic Stephan 688d5bba29 Adapt history to new structure 2017-04-09 17:54:37 -03:00
Ludovic Stephan 051231a031 Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_history 2017-04-09 16:47:05 -03:00
Qwann 5c6a73c597 kfet_open uses moment.js 2017-04-09 20:54:30 +02:00
Qwann 15873085e1 small fixes 2017-04-09 20:01:52 +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
Qwann e18c2c698c new migration 2017-04-07 17:52:44 +02:00
Qwann deb0d4de1e moving migration again 2017-04-07 17:23:41 +02:00
Ludovic Stephan 052e7b2b6e Move navigation to content-left 2017-04-07 12:17:36 -03:00
Qwann 531a4611d3 Merge branch 'master' into qwann/k-fet/kfet_open 2017-04-07 17:11:48 +02:00
Ludovic Stephan e26668e5eb Add tabs to account_read 2017-04-06 21:17:47 -03:00
Aurélien Delobelle 0ed70eb0a7 PEP8
No improvement.
2017-04-06 20:30:23 +02:00
Aurélien Delobelle 026fba867d Fewer db requests on home view.
- 1 request instead of (2 + #articles)
2017-04-06 19:44:16 +02:00
Aurélien Delobelle 2731d4630f Fewer requests on accounts groups.
- Saves two queries.

(4 prefetch where done, replaced by 2 prefetchs (whose 1 with 2
selected_related))
2017-04-06 19:25:23 +02:00
Aurélien Delobelle afdb08b424 Fewer db requests with AccountNegative handling.
- AccountNegative use new AccountNegativeManager which select_related
  account, cofprofile and user for instances accessed via
  AccountNegative.objects.
- Compute sum of negatives with python instead of an SQL statement
  (since we already got the data with a previous query).
- Fix bug on account property `real_balance` (happened if
  an account has a relative AccountNegative instance but balance_offset
  to NULL).

- More compliant to PEP8
2017-04-06 19:07:13 +02:00
Aurélien Delobelle f8b71b604c Fewer db accesses on transfers list view.
- Add select_related for `from_acc`, `to_acc` and `group.valid_by`.
- 2 requests instead of (3 * #transfers)
2017-04-06 18:42:00 +02:00
Aurélien Delobelle 709d421b2c Add custom Manager for Account model.
- When Account model is queried with Account.objects, it always add
  .select_related('cofprofile_user', 'negative').
- Eg benefits: history doesn't do anymore one request by account to
  fill the account filter.

Important

Using this workaround (systemically append select_related) can be
dangerous normally, however a certain number of properties in
cofprofile and user are frequently used (as firstname or lastname), and
the benefits seems greater.
2017-04-06 18:23:27 +02:00
Aurélien Delobelle 33cee05884 initial checkout selected
Result is the same result but:
- auto-select go to javascript
- 1 less request for KPsulCheckoutForm

- delete debug messages
- some PEP8
2017-04-06 16:45:44 +02:00
Aurélien Delobelle 56fa70e495 fewer calls on account_read view 2017-04-06 14:38:25 +02:00
Aurélien Delobelle 1302adf156 globally fewer db requests 2017-04-06 14:15:03 +02:00
Aurélien Delobelle f57bab8ae9 createopes use only bulk_create
createopes script:
- more than 6x faster
- only bulk_create is used instead of create or save
- correctly create editions (~5% of created operations)
- ratio of withdrawals go from ~10% to ~5%
2017-04-06 13:33:40 +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
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
Ludovic Stephan ed0a82ed5d Add no_trigramme option 2017-04-05 16:51:17 -03:00
Qwann ef8fec89fe migration renamed 2017-04-05 17:50:49 +02:00
Qwann a5671fdf4c Merge branch 'master' into qwann/k-fet/kfet_open 2017-04-05 17:40:19 +02:00
Ludovic Stephan 5c422e892a Add children fo traverse callback 2017-04-05 12:31:19 -03:00
Ludovic Stephan f57c292184 Rename history var 2017-04-05 12:13:24 -03:00
Ludovic Stephan 508e7ec23f Change traverse and find behavior 2017-04-05 12:00:39 -03:00
Ludovic Stephan 88f7ea941d Move selection logic to another class 2017-04-05 11:26:33 -03:00
Ludovic Stephan 8d13c0a4bb Add fetch method 2017-04-05 10:59:59 -03: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
Ludovic Stephan 290d4ecb6e Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-04-05 10:03:30 -03:00
Aurélien Delobelle 42728e58be Merge branch 'master' into qwann/k-fet/category_addcost 2017-04-05 14:57:26 +02:00
Ludovic Stephan 7ec7ed2696 Rename History class 2017-04-05 09:53:12 -03:00
Ludovic Stephan e051631a34 Use WebSocket classes 2017-04-05 09:28:32 -03:00
Ludovic Stephan 360c442a4e Remove useless class 2017-04-05 09:24:27 -03: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 6be6202b3f few cleans 2017-04-05 04:26:50 +02:00
Aurélien Delobelle f1aaad7317 Better jquery ajax calls management
It becomes the same as the original jQuery ajax object.
For example, callbacks can be queued.
get_by_apipk and from_API of ModelObject returns the ajax object.

Example (js):
Account.get_by_apipk('AAA')
    .done(function (data) {
        console.log(data)
    })
    .fail( () => console.log('cool') )
    ...
    .done( ...
2017-04-05 04:05:31 +02:00
Aurélien Delobelle efbcde163b clean some js
- clean buttons code on account and checkout
- merge CheckoutRead and kpsul_checkout_data views (the first won)

APIModelObject interface
- add url_create, url_update, url_update_for
- rename url_object_for and url_object to url_read_for and url_read
2017-04-05 03:43:51 +02:00
Ludovic Stephan 3b9affb3f3 Add focus methods 2017-04-04 20:18:53 -03:00
Ludovic Stephan 9c559d9ec3 Add articles reset to kpsul.reset 2017-04-04 19:54:03 -03:00
Ludovic Stephan 021937a38e Small bugfixes 2017-04-04 19:52:12 -03:00
Ludovic Stephan cb28b928c4 Remove articleSelect from _env 2017-04-04 19:42:30 -03:00
Martin Pepin fe66a6ef6b Merge branch 'aureplop/fix_stats' into 'master'
Stats K-Fêt - Python side

See merge request !208
2017-04-05 00:41:47 +02:00
Ludovic Stephan e5791efe4d Remove last traces of old articles 2017-04-04 19:41:15 -03:00
Ludovic Stephan 05156f37c6 Update addExistingPurchase 2017-04-04 19:34:22 -03:00
Martin Pépin 85ba44c231 Tests the redirection using the appropriate method 2017-04-04 23:31:24 +01:00
Qwann 7350006990 PEP8 2017-04-04 21:48:17 +02:00
Qwann ba11aa49db categories are updatable 2017-04-04 21:36:02 +02:00
Aurélien Delobelle dc07b072ab Flatten scale args in GET params of stats urls
- get_scale_args method of ScaleMixin retrieves useful GET params for
  Scale object instanciation (by default from request.GET)
- it takes into account the type of the scale arg
- prefix used for GET param can be modified in stats_manifest funcs and
  ScaleMixin
2017-04-04 20:12:21 +02:00
Aurélien Delobelle 885e40fd05 cleaner scales
- References to `Stat` in `Scale` objects are deleted (because scales
  are independent of stats)
- KFET_WAKES_UP_AT is now a time object insted of an hour
- Proper use of date, datetime, timedelta, etc (django.utils.timezone
  provides neither datetime nor timedelta)
2017-04-04 18:11:15 +02:00
Aurélien Delobelle ddd71c7ac1 add missing __init__ 2017-04-04 17:29:54 +02:00
Aurélien Delobelle 714903210c Add kfet_config tests
- KFetConfig `set` method now takes model instance instead of their pk
  for this type of entries.
- Add tests for KFetConfig class: tests against types currently used by
  kfet app (duration, modelinstance, decimal).
- These tests are located in `kfet/tests/test_config.py`. We should
  separate tests suites by file like this, considering what they are about.
- KFetConfig method `set_many` renamed to `set` (because it also updates
  only one).
2017-04-04 17:05:55 +02:00
Qwann 72615bf400 small fixes 2017-04-04 16:57:17 +02:00
Aurélien Delobelle 278459e80f typo....... 2017-04-04 11:05:49 +02:00
Aurélien Delobelle 0405eee7a7 Merge branch 'Aufinal/inventaires' into 'master'
K-Fêt - Création d'inventaires
- Amélioration de l'interface
- Ajout de colonnes intermédiaires pour faciliter le calcul
- Ajout d'indication de conflits possibles avec les opérations en cours
- Résolution semi-automatique de ces conflits

Closes #141

See merge request !200
2017-04-04 10:59:09 +02:00
Martin Pépin b383923d49 Merge branch 'Kerl/test_stats' into aureplop/fix_stats 2017-04-04 09:39:26 +01:00
Ludovic Stephan 514f1da6df Fix SpecialOpeFormatter 2017-04-03 21:26:33 -03:00
Ludovic Stephan ec9f47274a Fix WS update functions 2017-04-03 21:24:07 -03:00
Ludovic Stephan 20b7156e1f Improve type display 2017-04-03 21:18:07 -03:00
Ludovic Stephan a173be4f7d Use api_with_auth in history 2017-04-03 21:14:06 -03:00
Ludovic Stephan 07290f6fec Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-04-03 21:00:12 -03:00
Aurélien Delobelle 7989a07b5f cleaner fix 2017-04-04 01:36:19 +02:00
Aurélien Delobelle df467767f4 fix default GET param 'types' on operations stats 2017-04-04 01:29:19 +02:00
Ludovic Stephan 3ce4dc5c85 Add article stock management 2017-04-03 20:14:45 -03:00
Ludovic Stephan b91edc9c7d Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles 2017-04-03 20:03:58 -03:00
Aurélien Delobelle 9d2298a089 Merge branch 'master' into aureplop/kpsul_js_refactor
Not chill.
2017-04-04 00:51:49 +02:00
Martin Pépin f13d1072c7 Add simple tests for the stat views
We check that we can get all the stats views with the appropriate
permissions.
2017-04-03 23:21:42 +01:00
Aurélien Delobelle ce2a05766d Add set_many methods to kfet_config
- Fix addcost updates (from K-Psul)
2017-04-03 23:06:47 +02:00
Ludovic Stephan 5020037103 api_lock inside kfet.js 2017-04-03 16:08:40 -03:00
Ludovic Stephan 51acb4e00a Use new WS class 2017-04-03 16:05:18 -03:00
Ludovic Stephan 32474a6865 Don't update input when unchecking 2017-04-03 16:03:22 -03:00
Ludovic Stephan f46ba0dd6c Merge branch 'master' into Aufinal/inventaires 2017-04-03 16:01:51 -03:00
Aurélien Delobelle 7384465cbd fix migrations order 2017-04-03 21:01:36 +02:00
Aurélien Delobelle 921dce1f35 Merge branch 'master' into aureplop/kfet_config 2017-04-03 20:58:57 +02:00
Ludovic Stephan 5607d7c9a4 Migration pour kfet_forms 2017-04-03 15:54:02 -03:00
Ludovic Stephan ad2c8537e3 Add Runpython (oops) 2017-04-03 15:50:18 -03:00
Aurélien Delobelle 85caa6b058 Use django-djconfig for kfet app.
Old configuration(/settings), based on Settings model, system is
deleted: SettingsForm, Settings.
New system use `django-djconfig` module.

- `kfet.config` module provides `kfet_config` to access configuration concerning
kfet app.
- Views, forms, models, etc now use this object to retrieve conf values.
- Views no longer add config values to context, instead templates use
  `kfet_config` provided by a new context_processor.
- Enhance list and update views of settings.
- Fix: settings can directly be used without having to visit a specific
  page...

Misc
- Delete some py2/3 imports
- Delete unused imports in kfet.models and kfet.views
- Some PEP8 compliance
2017-04-03 20:32:16 +02:00
Aurélien Delobelle 10d2b58fa7 clean some comments
- fix: error if actions are empty in balance stats
2017-04-03 17:06:32 +02:00
Aurélien Delobelle 6d2e150aa0 clean align 2017-04-03 16:56:44 +02:00
Aurélien Delobelle 903da795ab clean kfet statistic.js
- no longer dictToArray where it isn't necessary (because already an
  array)
- fix chart height:
  - previous charts were causing bugs
  - height is fixed (even with window resizing)
- clean whitespaces
2017-04-03 16:53:28 +02:00
Ludovic Stephan 40da3bc299 Listen on input 2017-04-03 11:21:05 -03:00
Ludovic Stephan b113a57b74 Fix update function 2017-04-03 11:20:56 -03:00
Aurélien Delobelle 87bc90ec8b Begin/end balance stat graph
- Anytime begin at account creation datetime
- Others doesn't take care of account creation
- Add check to avoid to bug on actions list length
2017-04-03 16:07:31 +02:00
Aurélien Delobelle 769c37634d delete debug msg 2017-04-03 15:43:56 +02:00
Aurélien Delobelle 1bb83ccdd7 simplify StatScale 2017-04-03 15:10:53 +02:00
Aurélien Delobelle 7dc233c0e2 Merge branch 'Aufinal/editions' into 'master'
K-Fêt
- Fix: Les éditions ne touchent plus la caisse
- Fix: Seuls les achats sont possibles sur LIQ

See merge request !198
2017-04-03 14:39:53 +02:00
Aurélien Delobelle b157ffac4c Merge branch 'Aufinal/kfet_forms' into 'master'
K-Fêt
- Affichage des formulaires amélioré

See merge request !203
2017-04-03 13:40:41 +02:00
Aurélien Delobelle b3a9ad8a96 clean mixin 2017-04-03 13:24:04 +02:00
Aurélien Delobelle d97a7be819 stats: fix begin of balances graphs
- graph begin at first operation or later
2017-04-03 03:15:07 +02:00
Aurélien Delobelle c01de558e1 Clean Article stats
kfet.statistic
- delete no longer used defs
- new mixin - ScaleMixin
  - get scale args from GET params
  - chunkify querysets according to a scale

Article stats
- use SingleResumeStat for manifest
- use ScaleMixin for sales
- update urls
- update permission required: teamkfet

Account stats
- update permission required: teamkfet
- operations use ScaleMixin
- fix manifests urls
2017-04-03 03:12:52 +02:00
Aurélien Delobelle f585247224 Refactor Account Operations stats
K-Fêt - Statistics

New base class - StatScale
- create scale, given chunk size (timedelta), start and end times
- get labels of
- get start and end datetimes of chunks

DayStatScale: Scale whose chunks interval is 1 day
WeekStatScale: same with 1 week
MonthStatScale: same with 1 month

AccountStatOperationList: manifest of operations stats of an account
- renamed from AccountStatLastAll
- updated according to SingleResumeStat

AccountStatOperation:
- renamed from AccountStatLast
- remove scale logic with use of StatScale objects
- used scale is given by `scale` and `scale_args` GET params
- add filter on operations types with `types` GET param

AccountStatLast(Day,Week,Month) are deleted ("merged" in
AccountStatOperation)
2017-04-03 00:40:52 +02:00
Aurélien Delobelle 31261fd376 set height canvas graph & fix graph display 2017-04-02 23:38:42 +02:00
Aurélien Delobelle 6ebea6557c Merge branch 'Aufinal/graph_size' into aureplop/fix_stats 2017-04-02 23:19:34 +02:00
Ludovic Stephan 48721b7dca Reduce graph size 2017-04-02 17:54:13 -03:00
Aurélien Delobelle df7e935390 Clean GET params in ajax calls
- Use `data` arg of `$.getJSON` for `format` param
- Delete `dictToArray` call on data returned by `SingleResumeStat` class view since this view now returns stats manifest as an array
2017-04-02 17:16:05 +02:00
Aurélien Delobelle 1ee993e1e1 Add permission check to AccountStatBalance
Only connected user can get its balance data
2017-04-02 17:14:36 +02:00
Aurélien Delobelle 87b9db520f Refactor py base stats and account balance stats
New mixin: PkUrlMixin
- use with SingleObjectMixin standard django mixin (used by
  DetailView...)
- `get_object` use field declared in `pk_url_kwarg` to get... the object

SingleResumeStat
- clean (part of) py code

AccountStatBalanceList
- renamed from `AccountStatBalanceAll`
- url modified
- add permission checking (only the connected user can get balance
  stats manifest)
- clean py code

AccountStatBalance
- cleaner filtering management
- merge urls using this class
- clean py code
2017-04-02 17:03:20 +02:00
Aurélien Delobelle f6022ecf7d Add str to Transfer model
+ PEP8 this model
2017-04-02 16:49:41 +02:00
Aurélien Delobelle 78aa5df350 fix template error 2017-04-02 12:55:44 +02:00
Aurélien Delobelle e8fdd083aa delete unused class-views 2017-04-02 05:34:34 +02:00
Aurélien Delobelle 96597aa146 clean some kfet templates 2017-04-02 05:17:26 +02:00
Ludovic Stephan c9973cde75 Help text for password length 2017-04-01 23:25:47 -03:00
Aurélien Delobelle 55116f7179 Merge branch 'Aufinal/stat_article' into 'master'
Fix article stat display

See merge request !207
2017-04-02 02:49:54 +02:00
Martin Pépin e4d51de569 Merge branch 'hotfix/autocomplete_no_value' 2017-04-01 22:11:36 +01:00
Ludovic Stephan 91a057873d Merge migrations 2017-04-01 18:10:51 -03:00
Ludovic Stephan 944a73eef7 Merge remote-tracking branch 'origin/master' into Aufinal/editions 2017-04-01 18:09:23 -03:00
Martin Pépin a793e9a2e7 exclude empty strings from ldap results
The uid attribute in a LDAP's entry cannot be an empty string. We need
to get an actual identifier.
2017-04-01 22:07:32 +01:00
Martin Pépin 9cdf064005 Handle incomplete values from the LDAP
Sometime `uid` is not set in the objects fetched from the LDAP. This
case has to be handled. Also, the `.uid` and `.cn` attributes of these
objects in the python abstractions have a `.value` method which we
should use.
2017-04-01 21:45:05 +01:00
Ludovic Stephan cce0411ee9 Merge both 0048 migrations 2017-04-01 17:37:29 -03:00
Ludovic Stephan bbb517fbd3 Fix article stat display 2017-04-01 10:37:40 -03:00
Ludovic Stephan 6797c92a1f Ok ok je me rends 2017-04-01 09:35:37 -03:00
Ludovic Stephan 4af2562121 More clarity in argument names 2017-04-01 09:34:02 -03:00
Ludovic Stephan 29836fd15c Remove deprecated option 2017-04-01 09:24:18 -03:00
Ludovic Stephan e20ab2f352 Use set delete() 2017-04-01 09:18:40 -03:00
Ludovic Stephan 271654b447 No need for intermediate error reporting 2017-04-01 08:47:09 -03:00
Ludovic Stephan ccf5f80685 Merge remote-tracking branch 'origin/master' into Aufinal/editions 2017-04-01 02:43:19 -03:00
Ludovic Stephan 8da832c1f7 Use nice authentication in orders too 2017-04-01 00:36:39 -03:00
Ludovic Stephan 063446efb5 Use columns for authentication and submit 2017-04-01 00:32:09 -03:00
Ludovic Stephan cf03fba1cc Remove whitespace by using elif 2017-03-31 23:54:38 -03:00
Ludovic Stephan 2774dbb5de Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-31 23:51:13 -03:00
Ludovic Stephan 7d93d91af9 Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles 2017-03-31 23:50:33 -03:00
Ludovic Stephan 9c9ad21d73 Add variable for article line 2017-03-31 23:46:10 -03:00
Ludovic Stephan 92fd94d1f9 Merge remote-tracking branch 'origin/master' into Aufinal/fix_stock_ws 2017-03-31 23:43:19 -03:00
Aurélien Delobelle 1286606f7a Merge branch 'Aufinal/hotfix/liq_withdraw' into 'master'
K-Fêt :
- Empêche les retraits/charges sur LIQ

See merge request !205
2017-03-31 23:49:33 +02:00
Ludovic Stephan aa29621c7c Prevents special opes on LIQ 2017-03-31 18:28:03 -03:00
Ludovic Stephan 236dcb4644 Tweaks to UserDialog 2017-03-31 18:10:06 -03:00
Ludovic Stephan 582cdebaa1 Better callback management 2017-03-31 17:49:22 -03:00
Ludovic Stephan ab15dbae76 Add handler management 2017-03-31 17:37:39 -03:00
Ludovic Stephan 38bfccf331 Change class name 2017-03-31 15:57:15 -03:00
Ludovic Stephan 8bf1bd5343 Websocket as member 2017-03-31 15:45:15 -03:00
Ludovic Stephan 413df0806d Add url get method 2017-03-31 15:10:41 -03:00
Ludovic Stephan 49c84076de Manage help_text and errors 2017-03-31 15:01:31 -03:00
Ludovic Stephan 1d8e084a19 websocket update when addcost 2017-03-31 14:37:00 -03:00
Ludovic Stephan 499c081565 Websocket class and instance 2017-03-31 12:23:27 -03:00
Ludovic Stephan fdcd2e864c Use widget_tweaks everywhere 2017-03-31 11:24:38 -03:00
Ludovic Stephan 530aafad19 Use widget_tweaks 2017-03-31 11:07:37 -03:00
Ludovic Stephan 6ac1241bd3 Listen to submit instead 2017-03-31 10:07:42 -03:00
Ludovic Stephan 50cb6e51a1 Use Set() natively 2017-03-31 10:06:02 -03:00
Ludovic Stephan e54324e9f1 Use col-offset 2017-03-31 09:50:37 -03:00
Ludovic Stephan ebf133d9af Lowercase model verbose names 2017-03-30 21:38:16 -03:00
Ludovic Stephan 20561eb515 Idem for account_update 2017-03-30 21:31:16 -03:00
Ludovic Stephan c1b8849cb8 Idem for supplier_form 2017-03-30 21:16:47 -03:00
Ludovic Stephan 91d5fe234c Idem for checkoutstatements 2017-03-30 21:10:50 -03:00
Ludovic Stephan 8e65298c7c Idem for article_update 2017-03-30 19:34:22 -03:00
Ludovic Stephan 079666c0db Use verbose names and form snippets for article_create 2017-03-30 19:32:11 -03:00
Ludovic Stephan 0c21238391 Change misc field when updating 2017-03-30 18:39:13 -03:00
Ludovic Stephan 998838ca3e Add update button 2017-03-30 13:31:16 -03:00
Ludovic Stephan 31888e33ce simpler jquery selection 2017-03-30 13:30:55 -03:00
Ludovic Stephan 56b5fd6279 Always randomize supplier articles 2017-03-29 23:22:18 -03:00
Ludovic Stephan 95c59de4fc Add supplier to dev data 2017-03-29 23:16:40 -03:00
Ludovic Stephan eb7d436b90 Add "count finished" checkbox 2017-03-29 20:43:48 -03:00
Ludovic Stephan ca6e120a38 Fix ws stock update 2017-03-29 09:43:10 -03:00