forked from HybirdCorp/creme_crm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG.txt
5135 lines (5042 loc) · 405 KB
/
CHANGELOG.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
== Version 2.4 Work in progress (not released -- this is a draft) ==
UPGRADE NOTE :
- You should create a all new virtual environment based on Python 3.7+ .
- If you used the emails synchronisation in Creme2.3, you should finish to flush the list of
untreated emails (ie: mark them as synchronised or spam) before upgrading to Creme 2.4 .
Users side :
------------
# The setting 'USE_L10N' is now set to 'True' by default (previously only 'False' was working).
So, by default, the formats for dates & times depend on the user's language.
# In the History's block, lines related to entities from apps you cannot view are excluded.
# The comboboxes with autocompletion now use Select2 tool and their visuals and behavior have slightly changed.
# Apps :
* Creme_config :
- The menu icon can now be customised.
- The menu can be customised per role.
- The relationship types have been improved :
- Non-internal types can now be disabled.
- A new kind of constraints has been added : forbidden properties (on subject & object of course).
- An edition view for semi-fixed relationship types has been added.
- The configurations of CustomForms are collapsed by default, & can be expanded separately.
* Assistants :
- The trigger date of an Alert can now be relative to a date field of the linked entity (e.g. "3 days before its birthday").
Relative trigger dates are automatically updated when the date field changes.
- The owner of Alerts & ToDos can now be dynamic, to always send e-mails to the entity's owner.
* Activities :
- The relationships type "is subject of the activity" is now internal.
- In creation form, when an Alert with a trigger date relative to the Activity's start is created,
the new feature <Alert with relative trigger date> is used.
So the trigger date is finally updated when the Activity's start is modified (a very old annoying behaviour disappears).
* Emails :
- The synchronisation of external emails has been totally reworked & separated from the app "crudity".
This feature allows Creme to fetch e-mails from some mailboxes to potentially create true Email entities
(e.g. you sent a mail, with your usual mail client, to a customer & to the synchronisation address, then you get this mail in Creme).
- Now the mail servers are configured with a GUI (it was in 'settings.py').
- IMAP4 is supported (only POP3 was).
- Mails are in a sandbox, & entities are created only when you accept them (instead of using the status "Synchronized - Untreated").
- Attachments can be ignored, or removed before the mail is transformed into an entity.
- ...
BEWARE: if you used this feature in Creme 2.3, you'll have to remove the configuration
in your settings (it's not supported anymore) & re-create it in the GUI.
* Mobile :
- A "owner" field is now present in forms for of Contacts & Organisations.
* Crudity :
- The support of InfoPath files has been removed.
* Graphs :
- New 'Relationship graph' brick is available
Developers side :
-----------------
- jQuery 3.6.0 migration :
- Remove 'jquery.uuid' & 'jquery.debounce' (replaced by underscore)
- New dependency 'underscorejs 1.13.2'
- The version of 'floathead' is now "2.2.4".
- The version of 'jquery-ui' is now "1.13.1".
- Chosen to Select2 migration :
- New dependency 'Select2 4.0.13'
- New application Sketch :
- New dependency 'd3js 5.16.0'
- New dependency 'filesaver 2.0.4' (customized)
Non breaking changes :
----------------------
# Deprecations :
- In 'creme_core.forms.fields.SelectorList', the constructor's parameter & attribute "enabled" are deprecated ;
use <attrs={"disabled": True}> to disable instead (backported to Creme 2.3).
The context variable "clonelast" is deprecated too.
- In 'creme_core.gui' :
- In 'bricks.BricksManager' :
- The attribute '_dependencies_map' is deprecated.
- The method '_build_dependencies_map()' is deprecated.
- The property 'used_relationtypes_ids' is deprecated.
- In 'field_printers', these functions are now deprecated :
- print_date()
- print_datetime()
- In 'creme_core.models' :
- The method 'bricks.RelationBrickItemManager.create_if_needed()' is deprecated.
- The method 'Relation.populate_real_object_entities()'' is deprecated ;
use 'Relation.objects.prefetch_related("real_object")' instead.'
- In 'creme_core.utils' :
- The function 'creme_core.utils.find_first()' is deprecated ; use next() instead.
- The function 'split_filter()' is deprecated ;
use 'django.utils.functional.partition()' instead (beware the lists 'are returned in the reverse order).
- The function 'imports.import_object()' is deprecated ;
use 'django.utils.module_loading.import_string()' instead.
- Apps :
* Emails :
- In the class 'emails.models._Email':
- 'Status.SYNCHRONIZED_SPAM' & 'Status.SYNCHRONIZED_WAITING' are deprecated.
- 'SYNCHRONIZATION_STATUSES' is deprecated.
* Graphs :
- The method 'models.RootNode.get_relation_types()' is deprecated.
# In 'creme_core.models' :
- The class 'fields.RealEntityForeignKey' now have a method 'get_prefetch_queryset()' ;
so the method 'Queryset.prefetch_related()' can be called with the name of a field of this type.
- The method 'Relation.clean()' has been created ; it checks the different constraints (ContentType, CremeProperty).
# In the class 'auth.entity_credentials.EntityCredentials', the methods 'filter()' & 'filter_entities()'
can now be called with a combination of permissions (like 'VIEW | CHANGE').
# In Javascript:
- Added some convenience actions for the hatbarmenu widget
- 'creme_core-hatmenubar-view'
- 'creme_core-hatmenubar-update'
- 'creme_core-hatmenubar-form'
- Added 'creme.D3GraphRelationChart' that displays the relations between nodes of a graph.
# Apps
- Sketch : New application that integrates D3js tools for creme
* Added base bricks for the most common usecases.
- BarChartBrick
- GroupBarChartBrick
- StackBarChartBrick
- DonutChartBrick
* Added actions for sketch bricks
- 'sketch-download'
- 'sketch-popover'
- Graphs :
* Add "creme.sketch" as dependency
* New GraphRelationChartBrick that renders the relation graphs
Breaking changes :
------------------
# Deprecated stuffs which have been removed :
- The files "creme/local_settings.py" & "creme/project_settings.py" are now loaded anymore.
- The folder "creme/media/upload" have been removed.
- The file "creme/django.wsgi" has been removed.
- In 'creme_core.forms' :
- The alias 'base.FieldBlocksGroup' has been removed.
- The class 'fields.AjaxModelChoiceField' has been removed.
- In 'creme_core.models' :
- The method 'CremePropertyType.create()' has been removed.
- The method 'Job.not_finished_jobs()' has been removed.
- In 'fields_config' :
- The method 'FieldsConfigManager.is_model_valid()' has been removed.
- In 'FieldsConfig.LocalCache', the methods 'get_4_model()' & 'get_4_models()' have been removed.
- In 'history', all code related to history line rendering has been rendering.
- The method 'RelationType.create()' has been removed.
- The method 'Vat.get_default_vat()' has been removed.
- In 'creme_core.templatetags' :
- In 'history', the template filter "|history_modifications" is deprecated.
- In 'creme_widgets', the templatetag '{% widget_select_or_msg %}' & its template file have been removed.
- In Javascript :
- These functions of 'creme.ajax.*' have been removed :
- ajax(), get(), post(), submit(), reloadContent()
- json.send(), json.get(), json.post(), json.isvalid(), json.parse()
- 'creme.form.Select' has been removed.
- All 'creme.layout.Layout' classes have been removed :
Layout, ColumnSortLayout, CSSColumnLayout, SortLayout
- '$.uidGen' has been removed; use '_.uniqueId' instead.
- 'creme.utils.debounce' has been removed; use '_.debounce' instead.
- Apps :
* Persons :
- The function 'forms.base._get_address_field_names()' has been removed.
- The class 'forms.address._AuxiliaryAddressForm' has been removed.
* Commercial :
- The method 'AbstractStrategy.get_segment_category()' has been removed.
* Reports :
- The template file "reports/templatetags/report_chart.html" has been removed.
* Recurrents :
- The property 'registry.RecurrentRegistry.ctypes' has been removed.
* Crudity :
- The function 'crudity.utils.strip_html()' has been removed.
# There are 2 major changes in formats (dates, numbers) :
- 'USE_L10N = True' by default.
- The formats in creme/settings.py (DATE_FORMAT, DATE_INPUT_FORMATS...) have been cleared,
so the django's values are used if you set 'USE_L10N = False'.
So you may encounter some changes if you parse dates in your code & were relying of some specific formats.
# In 'creme_core.core.reminder.ReminderRegistry', the argument "reminder" has been renamed "reminder_class"
in the 2 methods 'register()' & 'unregister()'.
# In 'creme_core.forms' :
- In 'base.CremeEntityForm', the error messages with the following keys have been removed :
"missing_property_single", "missing_property_multi".
- In 'fields' :
- In 'RelationEntityField' :
- These methods have been removed :
- _get_allowed_rtypes_objects(), _get_allowed_rtypes_ids().
- _validate_ctype_constraints(), _validate_properties_constraints().
- The error messages with the following keys have been removed :
"rtypedoesnotexist", "ctypenotallowed", "nopropertymatch".
- In 'MultiRelationEntityField', these methods have been removed :
_get_cache(), _build_ctype_cache(), _build_rtype_cache().
- In 'widgets' :
- The attribute 'CalendarWidget.default_help_text' is now a format string.
- The class 'OrderedMultipleChoiceWidget' has been reworked (& its template file too) ;
- The input value has changed ; it's now a JSON list with selected choices.
So you'll have to update your unit tests for the forms using these kind of widget.
- The widget must now be used with the new class 'OrderedMultipleChoiceField'
(classical 'django.forms.OrderedMultipleChoiceField' won't work anymore).
- In 'listview', these methods have been removed :
- RegularDateField._get_date()
- CustomDatetimeField._get_date()
- BaseDecimalField._sanitize_separators()
- In 'relation._RelationsCreateForm', the error messages with the following keys have been removed :
"missing_property_single", "missing_property_multi".
# In 'creme_core.gui' :
- The class attribute 'button_menu.Button.id_' has been renamed "id" ;
you have to rename this attribute in your child classes.
- The method 'bricks.SpecificRelationsBrick.id_is_specific()' has been removed.
# In 'creme_core.models' :
- In 'bricks' :
- In CustomBrick's constructor, the argument "customblock_conf_item" has been renamed "custombrick_conf_item".
- The field 'RelationBrickItem.brick' has been removed ;
a property is used instead, but the generated value is different.
- The TextFields which were used to store JSON have been replaced by JSONFields :
- RelationBrickItem.json_cells_map
- InstanceBrickConfigItem.json_extra_data
- CustomBrickConfigItem.json_cells
- BrickState.json_extra_data
- A mandatory field "object_ctype" has been added to 'Relation' ;
but it is set automatically in 'save()' by using the value of the field 'object_entity', so your code will probably work without change.
- A mandatory field "object_ctype" has been added to 'SemiFixedRelationType'.
- In the models 'EntityJobResult' & 'MassImportJobResult', the new fields "entity_ctype" have to be
filled when the field "entity" is not NULL (hint: use the new virtual field "real_entity").
- The field 'FieldsConfig.raw_descriptions' is now a JSONField.
- The field 'CustomFormConfigItem.json_groups' is now a JSONField.
- A mandatory field "entity_ctype" has been added to 'Imprint'.
# In the class 'creme_core.views.search.FoundEntitiesBrick', the attribute "ctype" has been removed.
# In templates:
- In "creme/templates/authent/base.html", {% block form_username %} & {% block form_password %} have been replaced by {% block form_fields %}.
- In "creme/creme_core/templates/creme_core/listview/content.html", {% block extra_buttons_hidden %} has been removed
(use {% block lv_hidden_buttons %} + {{block.super}} instead).
# In JavaScript :
- The function 'creme.forms._toDualColumnMultiSelect' & 'creme.forms.toOrderedMultiSelect' have been removed ;
the new component 'creme.widget.SelectOrInputWidget' is used instead.
- 'creme.form.Chosen' is now deprecated; It has been renamed as 'creme.form.Chosen'.
No longer used in media generation but still exist to ease migrations.
# Apps :
* Creme_config :
- The brick 'MenuBrick' has been reworked (to manage menu per role) ; the template variable "entries" is now a list of dictionaries.
In the related JavaScript component 'creme.creme_config.MenuContainersController', the attribute '_containers' is now an 'Array' of 'Sortable' instances.
- The extra data stored in the BrickStates related to 'bricks.CustomFormsBrick' has changed from <ctype_id> to <{'ctype': ctype_id, items: [...]}>.
The view 'custom_form.CustomFormShowDetails' & the JavaScript component 'creme.FormGroupsController' have been adapted.
- The following URLs/views have been modified to take a UserRole as parameter :
- "creme_config__add_menu_container"
- "creme_config__add_menu_special_level0"
- "creme_config__reorder_menu_level0"
- The method 'core.importers.MenuConfigImporter.load_mci()' has been removed.
* Assistants :
- The method 'bricks._AssistantsBrick._populate_related_real_entities()' has been removed.
- The form 'AlertForm' has been heavily modified (the fields "trigger_date" & trigger_time" have been removed...).
- In models:
- the fields "creme_entity" have been renamed "real_entity" for consistency.
- the field 'Alert.trigger' can now be NULL.
* Documents :
- In 'bricks.LinkedDocsBrick', the template variable "predicate_id" is not injected anymore.
* Persons :
- In 'bricks' :
- In the class 'ManagersBrick' (& so 'EmployeesBrick'), the template variable "rtype_id" is not injected anymore.
- The global variable 'bricks_list' has been renamed 'brick_classes' & is now a list.
- In 'buttons.CrmButton' (& so child button classes) the template variable "rtype_id" is not injected anymore.
* Products :
- The module 'forms.product' has been renamed 'forms.bulk_update'.
* Opportunities :
- In 'bricks' :
- In the base class '_LinkedStuffBrick' (& so all child brick classes), the template variable "predicate_id" is not injected anymore.
- In the mixin class '_RelatedToOpportunity', the method 'get_related_contacts()' has been removed.
- The global variable 'bricks_list' has been renamed 'brick_classes' & is now a list.
* Commercial :
- In 'bricks' :
- The method 'ApproachesBrick._populate_related_real_entities()' has been removed.
- The context variable "ct_id" is not injected any more in the following bricks :
ActObjectivesBrick, SegmentDescriptionsBrick, PatternComponentsBrick.
- In 'RelatedOpportunitiesBrick', the template variable "predicate_id" is not injected anymore.
- In 'buttons.CompleteGoalButton', the template variable "predicate_id" is not injected anymore.
* Emails :
- The constants 'REL_*_MAIL_SENDED' have been renamed 'REL_*_MAIL_SENT'.
- In 'bricks', some variable are not injected in the context anymore :
- 'MailsHistoryBrick': "rtype_ids", "creation_perm".
- 'MySignaturesBrick': "has_app_perm".
- A mandatory field "recipient_ctype" has been added to 'models.LightWeightEmail'.
- In 'email.js', these actions have been removed :
"emailsync-link", "emailsync-action", "emailsync-delete".
* Tickets :
- In 'buttons.Linked2TicketButton', the template variable "rtype_id" is not injected anymore.
- In 'models.AbstractTicket', the attribute "old_status_id" has been removed.
* Crudity :
- All the code related to InfoPath support has been removed (.py, .html. .xml...).
* Graphs :
- A mandatory field "entity_content_type" has been added to 'models.RootNode'.
* Projects :
- In 'bricks.ProjectTasksBrick', the variable "creation_perm" is not injected in the context anymore.
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# The constructor of 'creme_core.forms.entity_filter.widgets.DateFieldsConditionsWidget'
does not take any argument "enabled" now (backported to Creme 2.3).
# In 'creme_core.gui.last_viewed.LastViewedItem', the key "ctype_id" is now mandatory.
# In 'creme_core.management.commands.i18n_overload.Command._get_catalog_paths()', the return
values are now instances of 'pathlib.Path'.
# In Javascript:
- 'creme.widget.DynamicSelect' is using the new wrapper 'creme.form.Select2' instead of 'creme.form.Chosen'.
# Apps :
* Billing :
- In 'models.AbstractTemplateBase', the protected attribute '_verbose_status_cache' has been removed (was useless since years).
== Version 2.3 ==
UPGRADE NOTE :
- You should create a all new virtual environment based on Python 3.6+
(e.g. "mkvirtualenv -p /usr/bin/python3XX" if you use 'mkvirtualenv')
and populate it with "pip install -e .[mysql|pgsql]" of course.
- The layout of Creme projects has changed : Creme is a classical Python package
installed in your virtualenv & your own data are stored in another place.
Create a fresh project folder with the following command (you must be out of the Creme's tree):
> creme creme_start_project my_project
- Edit the file "my_project/settings.py" ;
copy (carefully) the values from your old files "local_settings.py/project_settings.py".
- Do not forget to set the values for LANGUAGE_CODE & TIME_ZONE (the default
values in Creme 2.2 are 'fr' & 'Europe/Paris' ; if you did not set them
in your instance of Creme 2.2, use these values explicitly with Creme 2.3).
- The hard-coded sub-folder 'upload/' has been moved to the default value of 'settings.MEDIA_ROOT' ;
so if you have set 'MEDIA_ROOT' in your personal settings, add a sub-folder "upload" at the end
(to avoid breaking the paths of all your uploaded Documents, generated PDFs etc...).
Example:
> MEDIA_ROOT = os.path.join('var', 'www', 'example.com', 'media')
becomes
> MEDIA_ROOT = os.path.join('var', 'www', 'example.com', 'media', 'upload')
- The value of 'settings.GENERATED_MEDIA_DIR' is not used anymore ; 'settings.STATIC_ROOT' is used instead.
So if you have set 'GENERATED_MEDIA_DIR' in your personal settings, rename it "STATIC_ROOT".
Example:
> GENERATED_MEDIA_DIR = os.path.join('var', 'www', 'example.com', 'static')
becomes
> STATIC_ROOT = os.path.join('var', 'www', 'example.com', 'static')
- If your old setting MEDIA_ROOT had the default value ("creme/media/"), copy the content of the
folder "creme/media/upload/" of your old installation to the destination indicated by your new
setting MEDIA_ROOT ("my_project/media/upload/" by default in the generated file "my_project/settings.py").
If your old setting MEDIA_ROOT referenced a folder out of the default, you can just
make a backup of these uploaded files (backups are a good thing).
- Execute the well known commands "migrate", "creme_populate" & "generatemedia", but in a new way:
> creme migrate --settings=my_project.settings
> creme creme_populate --settings=my_project.settings
> creme generatemedia --settings=my_project.settings
- The undocumented options "colorize" & "colors" of 'creme.utils.loggers.CremeFormatter' have been removed ;
fix your settings if you used it (probably not).
- If you used the locale overloading (generated by the command "i18n_overload.py")
- Copy the content of the old folder "creme/locale_overload/locale/" in a new
folder "my_project/locale_overload/" (beware there is no "locale/" sub-folder).
- In your project's settings, add the line:
> LOCALE_PATHS.insert(0, BASE_DIR / 'locale_overload')
Users side :
------------
# The version of Django has been upgraded to "3.2".
# The layout of Creme projects has changed : now Creme lives as a classical Python package
in your virtualenv, and your settings/media are well separated from Creme's code
(see the new command "creme_start_project").
# Two full-python backends for the media-generator have been added ;
they are used in the default configuration (see the setting 'ROOT_MEDIA_FILTERS') in order to remove the dependency to Java by default.
- The package "csscompressor" is used to minify the CSS files.
- The package "rjsmin" is used to minify the JavaScript files.
# The history has been improved :
- The messages in the history block are prettier.
- Old & new values are stored now for TextFields (e.g. description) ; they are shown in a popover dialog.
- Elements which are added & removed for ManyToManyFields are now stored.
- CustomFields are now historized too.
# The global search can now search in CustomFields.
# The job scheduler can now use a UNIX socket (when they are available) to
communicate with the views, instead of a Redis server.
# Many blocks got descriptions, which are displayed as tool-tips.
# The field "modified" of entities is updated when you use inner/bulk edition with a CustomField.
# Apps :
* Creme_config :
- The main menu can now be customised ; containers can be created,
re-ordered, removed, & their entries can be chosen too.
All apps have been reworked to use the new system to provide a menu identical to the old one.
- You can add a configuration of a Custom-Form specific to a role.
- The fields can now be marked as required in fields' configuration (not ManyToManyFields for now).
- The instances of CremePropertyTypes can now be disabled (to not be proposed in forms).
- The configuration form for blocks on detailed views has been redesigned
(the pool of available blocks is now shared, blocks are draggable, descriptions are displayed).
- A portal which displays all the filters (used by list-views) has been added.
- A portal which displays all the views (of list-views) has been added.
* Persons :
- A many-to-many field "Spoken language(s)" has been added to Contacts ; it's hidden for old installations.
- The setting PERSONS_MENU_CUSTOMERS_ENABLED has been removed (you can add/remove the entry menu in 'creme_config').
* Billing :
- The field 'payment_type' ("Settlement terms") is now present in all 'billing' entity types (Quote, SalesOrder...).
Notice that if you upgrade your Creme installation, if you want to display this field in the detail-views, you
have to edit your block configuration (excepted for 'Invoice' of course).
* Reports :
- The CustomFields with type DATE can now be used as abscissa in ReportGraphs (only DATETIME was available).
* Emails :
- When you create an e-mail from a detailed view, only one of the 2 bodies needs to be filled
(the other one is automatically filled from it).
* Assistants :
- In Alerts & ToDos bricks, the validated lines can be shown/hidden. The default behaviour is still the same.
Developers side :
-----------------
- The version of 'Django' is now "3.2".
You should probably read the following releases notes for Django versions :
- https://docs.djangoproject.com/en/3.2/releases/3.0/
- https://docs.djangoproject.com/en/3.2/releases/3.1/
- https://docs.djangoproject.com/en/3.2/releases/3.2/
- The version of 'jQuery' is now "3.6.0" (jQuery-migrate 3.3.2).
Migration warning are enabled and documented here https://github.com/jquery/jquery-migrate/blob/main/warnings.md,
and you should read the migration guides:
- https://jquery.com/upgrade-guide/3.0/
- https://jquery.com/upgrade-guide/3.5/
- jQuery 3.6.0 needed the update of the following dependencies :
- The version of 'fullcalendar' is now "3.10.2".
- The version of 'floatthead' is now "2.2.1".
Non breaking changes :
----------------------
# Deprecations :
- The loading of settings from "creme/local_settings.py" & "creme/project_settings.py" is deprecated ;
use the new project layout & the arguments "--settings" of the executable "creme".
- The folders "creme/media/upload" & "creme/media/static" are deprecated ;
use "my_project/media/upload" & "my_project/media/static" instead.
- The file "creme/django.wsgi" is deprecated ; use "my_project/wsgi.py" instead.
- The class 'creme_core.forms.fields.AjaxModelChoiceField' is deprecated.
- In 'creme_core.models' :
- The method 'CremePropertyType.create()' is deprecated ; use 'CremePropertyType.objects.smart_update_or_create()' instead.
- The method 'Job.not_finished_jobs()' is deprecated ; use 'Job.objects.not_finished()' instead.
- In 'fields_config' :
- The method 'FieldsConfigManager.is_model_valid()' is deprecated ; use 'has_configurable_fields()' instead.
- In 'FieldsConfig.LocalCache', the methods 'get_4_model()' & 'get_4_models()' are deprecated ;
use 'get_for_model()' & 'get_for_models()' instead.
- In 'history', all code related to history line rendering is deprecated ;
use the new rendering system 'creme_core.gui.history' instead.
- The method 'RelationType.create()' is deprecated ; use 'RelationType.objects.smart_update_or_create()' instead.
- The method 'Vat.get_default_vat()' is deprecated ; use 'Vat.objects.default()' instead.
- In 'creme_core.templatetags' :
- In 'creme_widgets', the templatetag '{% widget_select_or_msg %}' & its template file are deprecated ;
use '{% widget_enumerator %}' instead.
- In 'history', the template filter "|history_modifications" is deprecated.
- In Javascript :
- Some creme.ajax.* functions are now deprecated; use 'creme.ajax.Query' instead :
- creme.ajax.ajax()
- creme.ajax.get()
- creme.ajax.post()
- creme.ajax.submit()
- creme.ajax.reloadContent()
- creme.ajax.json.send()
- creme.ajax.json.get()
- creme.ajax.json.post()
- creme.ajax.json.isvalid()
- creme.ajax.json.parse()
- Some creme.form.* functions are now deprecated :
- creme.forms.Select.optionsFromData()
- creme.forms.Select.fill()
- All 'creme.layout.Layout' classes are deprecated; use CSS instead :
- creme.layout.Layout
- creme.layout.ColumnSortLayout
- creme.layout.CSSColumnLayout
- creme.layout.SortLayout
- The jquery extension '$.browserVersion' is now deprecated but kept as gccolor dependency.
- jQuery 3.x :
- $.bind() is deprecated; use $.on() instead.
- $.unbind() is deprecated; use $.off() instead.
- $.trim() is deprecated; use String.prototype.trim() instead.
- $.isArray() is deprecated; use Array.isArray() instead.
- Use properties instead of attributes for disabled state :
- $.removeAttr('disabled') => $.prop('disabled', false)
- $.attr('disabled', 'disabled') => $.prop('disabled', true)
- 'click' trigger & handler shortcuts are deprecated :
- $.click() => $.trigger('click')
- $.click(handler) => $.trigger('click', handler)
- 'submit' trigger & handler shortcuts are deprecated :
- $.submit() => $.submit('click')
- $.submit(handler) => $.submit('click', handler)
- 'change' trigger & handler shortcuts are deprecated :
- $.change() => $.trigger('change')
- $.change(handler) => $.trigger('change', handler)
- 'hover' event is deprecated; use 'mouseenter' & 'mouseleave' instead :
- $.hover(onenter, onleave) => $.on('mouseenter', onenter).on('mouseleave', onleave)
- Apps :
* Persons :
- The function 'forms.base._get_address_field_names()' is deprecated.
- The class 'forms.address._AuxiliaryAddressForm' is deprecated.
* Commercial :
- The method 'AbstractStrategy.get_segment_category()' is deprecated.
* Reports :
- The template file "reports/templatetags/report_chart.html" is deprecated.
* Recurrents :
- The property 'registry.RecurrentRegistry.ctypes' is deprecated ; use "models" instead.
* Crudity :
- The function 'crudity.utils.strip_html()' is deprecated ;
use 'creme_core.utils.html.strip_html()' instead.
# In 'creme_core.views.generic', in the view-classes 'CremeModelCreation' & 'CremeModelEdition',
the redirection URL can be passed in the GET request (argument "callback_url").
Some views have been reworked to use this feature instead of using a fixed URL.
# Apps :
* Reports :
- The template file "templates/reports/view_graph.html" use smaller '{% block %}' tags to be easier to extend.
Breaking changes :
------------------
# Deprecated stuffs which have been removed :
- In 'creme_core.models' :
- The method 'Relation._build_symmetric_relation()' has been removed.
- These methods of 'EntityFilter' have been removed : create(), get_latest_version(), get_for_user()
- These methods of 'HeaderFilter' have been removed : create(), get_for_user()
- These methods of 'FieldsConfig' have been removed :
create(), field_enumerator(), filter_cells(), get_4_model(), get_4_models(), is_model_valid()
- These methods of 'CustomField' have been removed : get_pretty_value(), get_value_class(), type_verbose_name()
- The method 'CustomFieldValue.delete_all()' has been removed.
- The method 'ButtonMenuItem.create_if_needed()' has been removed.
- The property 'BrickHomeLocation.brick_verbose_name' has been removed.
- The property 'BrickMypageLocation.brick_verbose_name' has been removed.
- The method 'CustomBrickConfigItem.generate_id()' has been removed.
- The property 'InstanceBrickConfigItem.errors' has been removed.
- These methods of 'SearchConfigItem' have been removed : create_if_needed(), get_4_models()
- In 'backends._BackendRegistry' :
- The property 'backends' has been removed.
- The method 'get_backend()' has been removed.
- In 'gui' :
- In 'field_printers' :
- The class 'M2MPrinter' has been removed.
- These functions have been removed : print_decimal(), print_integer()
- These methods of 'quick_forms.QuickFormsRegistry' have been moved : iter_models(), get_form()
- In 'forms' :
- In 'fields', these classes have been removed: AjaxChoiceField, AjaxMultipleChoiceField
- The property 'header_filter.EntityCellsField.content_type' has been removed.
- The class 'widgets.DependentSelect' has been removed.
- In 'views' :
- In 'bricks', these functions have been removed :
build_context(), get_brick_ids_or_404(), render_detailview_brick(), render_home_brick(), bricks_render_info()
- The decorator 'decorators.POST_only' has been removed.
- The function 'file_handling.download_file()' has been removed.
- In 'utils', these functions have been removed :
creme_entity_content_types(), get_ct_or_404(), build_ct_choices(), entities2unicode(), related2unicode()
These templatetags of 'creme_core_tags' have been removed: {% creme_media_url %}, {% hg_info %}
- The template file "creme/creme_core/templates/creme_core/generics/blockform/content.html" have been removed
- In JavaScript :
- The module 'creme.color' has been removed.
- 'creme.dialog.ConfirmAction' has been removed (never used).
- 'creme.creme_config.FormGroupsController' is renamed as 'creme.FormGroupsController'
- jQuery 3.x :
- '$.param()' does not use 'jQuery.ajaxSettings.traditional' flag anymore. Use 'creme.ajax.param()' to keep the old behavior.
- '$.val()' returns an empty array instead of 'null' when a multi-select is empty.
- Complete refactor of progress controller of jobs :
- creme.jobs.BaseJobsMonitor:
- 'BaseJobsMonitor(url)' is replaced by 'BaseJobsMonitor({url: ..., fetchDelay: ...})'
- 'start()' has been renamed as 'fetch()'.
- 'onAllJobsFinished(handler)' is replaced by 'on("finished", handler)'.
- creme.jobs.JobsMonitor:
- 'JobsMonitor(url, element)' is replaced by JobsMonitor(element, {url: '...', fetchDelay: ...})
- creme.jobs.BrickJobsMonitor:
- BrickJobsMonitor(url, brick_id) is replaced by 'BrickJobsMonitor(brick, {url: ..., fetchDelay: ...})'
where 'brick' is a 'creme.bricks.Brick' instance.
- Apps :
* Creme_config :
- In 'forms' :
- The class user_role.UserRoleDeleteForm has been removed.
- In 'custom_fields', these classes have been removed :
CustomFieldsBaseForm, CustomFieldsCTAddForm, CustomFieldsAddForm, CustomFieldsEditForm.
- The function 'user._password_validators_help_text_html()' has been removed.
- The class 'views.search.SearchItemEdition' has been renamed "SearchConfigDeletion".
* Persons :
- The module 'views.crud_relations' has been removed.
- In 'forms.base', these constants have ben removed : _BILLING_ADDRESS_FIELD & _SHIPPING_ADDRESS_FIELD
- These template files in "creme/persons/templates/persons/" have been removed :
- frags/*
- add_*_form.html
- edit_*_form.html
- The JavaScript function 'creme.persons.copyTo()' has been removed.
* Documents :
- The method 'models.AbstractDocument.get_linkeddoc_relations()' has been removed.
- The constant 'forms.document._TITLE_MAX_LEN' has been removed.
* Activities :
- In 'forms.activity', these classes have been removed :
_ActivityForm, ActivityEditForm, _ActivityCreateForm, ActivityCreateForm, RelatedActivityCreateForm, CalendarActivityCreateForm, IndisponibilityCreateForm.
- The SettingKey 'setting_keys.form_user_messages_key', and the related constant 'SETTING_FORM_USERS_MSG' have been removed.
- In the class 'views.calendar.ActivitiesData', the method '_activity_2_dict' is not static anymore.
- These template files have been removed in "creme/activities/templates/activities/" :
- add_activity_form.html
- forms/add-activity-popup.html
- frags/activity_form_content.html
- frags/indispo_form_content.html
* Billing :
- In 'models.Base', these methods have been removed : get_source() & get_target().
- The function 'forms.base.first_managed_orga_id()' has been removed.
- In 'views' :
- The class 'base.BaseEdition' has been removed.
- The class-view 'base.RelatedBaseCreation' does not fill <initial['target']> anymore.
- These template files have been removed in "creme/billing/templates/billing/forms/" :
add.html, add-popup.html, base.html, edit.html
- The template 'templates/billing/bricks/base/lines.html' needs the variable "line_edit_form_template" to be filled
* Opportunities :
- In 'forms.opportunity', the classes 'TargetMixin' & 'EmitterMixin' have been removed.
* Commercial :
- The constants REL_SUB_SOLD_BY & REL_OBJ_SOLD_BY have been removed.
* Emails :
- These methods of 'models.EmailSending' have been removed : get_mails(), get_unsent_mails_count().
- In 'views.crudity', these functions have been removed :
set_emails_status(), spam(), validated(), waiting()
- The class attribute 'bricks.MailsHistoryBrick._RTYPE_IDS' has been removed.
* Reports :
- In 'core.graph' :
- The property 'hand.ReportGraphHand.verbose_ordinate' has been removed.
- The method 'fetcher.RegularFieldLinkedGraphFetcher.validate_fieldname()' has been removed.
- In 'models' :
- The method 'AbstractReport.get_related_fields_choices()' has been removed.
- In 'AbstractReportGraph' :
- These methods have been removed : create_instance_brick_config_item(), get_fetcher_from_instance_brick().
- The sub-class 'InstanceBrickConfigItemError' has been removed.
- In 'views' :
- The class 'report.ReportCreation' has been removed.
- In 'graph', these functions have been removed : get_available_report_graph_types(), _get_available_report_graph_types().
- The template file "creme/reports/templates/reports/add_report.html" has been removed.
- In JavaScript, the component 'creme.reports.ReportFormController' has been removed.
* Projects :
- The property 'models.AbstractProjectTask.safe_duration' has been removed.
* Recurrents :
- The method 'registry.RecurrentRegistry.get_form_of_template()' has been removed ;
use 'get_template_form_class()' instead.
# The variables 'default_app_config' present in the file '__init__.py' of all apps have been removed ;
the classes inheriting 'AppConfig' got an attribute 'default = True' instead (see https://docs.djangoproject.com/en/3.2/releases/3.2/#automatic-appconfig-discovery).
# In 'creme.settings', the variable 'SITE_ID' (related to the unused app "django.contrib.sites") has been removed.
# In 'creme.utils.loggers' :
- The method 'CremeFormatter.formatEncodedException()' has been removed (use 'formatException()' instead).
- The method 'CompressedTimedRotatingFileHandler._next_filename()' has been removed (it was unused).
# The method 'creme_core.apps.CremeAppConfig.register_menu()' has been removed ;
all apps have been reworked to use the new API (registration of entry classes in 'apps.py', base configuration of menu in 'populate.py').
# The method 'get_tag()' injected in all model-fields takes now an argument named "tag" (it was named "tag_name") ;
notice that it's better to pass an enumeration value (e.g. 'FieldTag.VIEWABLE').
# If you used the fields configuration on your own models (ie: they have fields tagged as "optional"),
you must now register them in your 'apps.py' in the method 'CremeAppConfig.register_fields_config()'
(use the method 'fields_config_registry.register_models()').
# In the method 'creme_core.bricks.HistoryBrick._populate_related_real_entities()', the argument "user" has been removed.
# In 'creme_core.core' :
- The module 'job' has been reworked :
- It has been split in several files, so some imports may have been broken.
- The constants 'CMD_*' have been replaced by constants 'Command.{START, END, REFRESH, PING}'.
- The class '_BaseJobSchedulerQueue' :
- has been renamed 'BaseJobSchedulerQueue'.
- its class-method 'get_main_queue()' (& the related attribute '_main_queue') has been removed ;
use the function 'get_queue()' instead.
- its constructor takes an argument "setting" now.
- its method 'pong()' takes now an instance of 'job.Command'.
- The class 'JobSchedulerQueue' (which had different definitions) has been removed ;
use the function 'get_queue()' to get the concrete instance of the queue.
- In the class 'search.Searcher' :
- The attribute '_search_map' stores now 'EntityCell' instances as values.
- The method '_build_query()' takes a parameter "cells" instead of "fields".
- The method 'get_fields()' has been removed (use 'get_cells()' instead).
# In 'creme_core.forms' :
- The attribute 'ActionButtonList.actions' is not a list of tuples anymore (it's a list of 'WidgetAction' instances).
- The method 'ActionButtonList._get_button_context()' has been removed.
- The inner-class 'SelectorList.Action' has been replaced by the new class 'WidgetAction' (they are globally identical, but the new constructor takes only keyword arguments).
- Remove the 'BulkFieldSelectWidget' that is no longer useful and move its role to 'creme.lv_widget.EditSelectedAction' (JS).
# In 'creme_core.gui' :
- In 'bricks', the attribute 'Brick.permission' has been replaced by 'permissions' (which accepts strings sequence too).
- In 'button_menu', the attribute 'Button.permission' has been replaced by 'permissions' (which accepts strings sequence too).
- In the class 'custom_form.CustomFormDescriptor', in the methods 'build_form_class()' & 'groups()', the argument "item" cannot be 'None' anymore.
- In 'menu', the old API has been removed :
- These classes have been removed :
Item, ViewableItem, ItemList, ItemGroup, ItemSeparator, ContainerItem, LabelItem, GroupLabelItem,
URLItem, TrashItem, QuickCreationItemGroup, CreationFormsItem, LastViewedEntitiesItem, Menu
- The global instance 'creme_menu' has been removed.
- The function '_validate_id()' has been removed.
# In 'creme_core.models' :
- The field 'CustomFormConfigItem.cform_id' has been replaced by the fields 'id' & 'descriptor_id'.
- The field 'DeletionCommand.json_replacers' has been transformed to a 'JSONField'.
- In 'fields_config', the method 'FieldsConfigManager.field_enumerator()' has been removed.
- In 'job' :
- The field 'Job.raw_data' has been transform into a nullable 'JSONField' named "data" ;
the property 'Job.data' has been removed since it's useless now.
- The field 'BaseJobResult.raw_messages' (& so in the concrete child models: JobResult, EntityJobResult & MassImportJobResult)
has been transform into a 'JSONField' named "messages" ;
the property 'BaseJobResult.messages' has been removed since it's useless now.
- The field 'MassImportJobResult.raw_line' has been transform into a 'JSONField' named "line" ;
the property 'MassImportJobResult.line' has been removed since it's useless now.
- The field 'Language.code' has been removed.
- In 'search' :
- The class 'SearchField' has been removed.
- In the model 'SearchConfigItem' :
- The field 'field_names' has been replaced by 'json_cells', which stores 'EntityCells' as dictionaries.
- The class attributes '_searchfields' & '_all_fields' have been removed.
- These methods have been removed: _build_searchfields(), _get_modelfields_choices(), get_modelfields_choices().
- The property 'searchfields' has been removed ; use 'cells' & 'refined_cells' instead.
# In 'creme_core.utils.meta' :
- In 'ModelFieldEnumerator' :
- Two parameters of the constructor have been renamed: "deep" became "depth", "only_leafs" has been fixed to "only_leaves".
The corresponding protected attributes have been renamed too.
- The functions passed to the methods 'filter()' & 'exclude()' take now 3 arguments by keywords
(notice: "model" is new, "deep" is now "depth").
- The method '_FilterModelFieldQuery.__call__()' takes now 3 arguments by keywords (same remark).
# In 'creme_core.views.generic.base' :
- The method 'CustomFormMixin.get_custom_form_class()' is not a static method anymore.
- The default value of the attribute 'PermissionsMixin.permissions' is now an empty string (instead of 'None').
# The HTML/CSS for forms have been heavily reworked :
- The HTML for 'django.forms.widgets.Select' is now wrapped in a tag "<div>".
- "<div>" tags are used instead of "<table>" in the blocks.
- The HTML id "editforms" has been removed.
- The CSS class "table_detail_view" is not use anymore.
- the CSS files "creme_core/css/blocks.css" have been removed from in the setting "CREME_CORE_CSS" (they will be removed in Creme 2.4)
# In Makefile, some targets have been removed :
- "karma-ci" is no longer used in circleci script.
- These commands were broken with the new project layout :
"update", "media", "test", "test-cov", "serve", "serve-jobs", "shell".
# Apps :
* Creme_config :
- There are several changes about Custom-Forms :
- In the views, the argument to retrieve the instance of 'CustomFormConfigItem' has been renamed "item_id" (instead of "form_id").
- The objects injected in the template of 'bricks.CustomFormsBrick' have changed (to get several items by descriptor) ;
So 'creme_config/bricks/custom-forms.html', the related CSS classes have changed too.
In the JS class 'creme.FormGroupsController' :
- The code has been updated to retrieve the new CSS classes correctly.
- The methods '_toggleItem()', 'items()' & 'item()' have been renamed respectively '_toggleCType()', 'ctypes()' & 'ctype()'.
- In 'forms.search' :
- These classes have been removed/replaced by new ones : _SearchForm, SearchAddForm, SearchEditForm.
The related views have been updated.
* Persons :
- The method 'forms.merge._PersonMergeForm._handle_addresses()' has been removed ;
work has been split cleanly between clean & save steps (notably by the new method '_clean_addresses()').
- The field 'AbstractContact.language' has changed :
- It has been renamed "languages".
- It is no tagged as <viewable=False> any more (we did not know if we should remove this field).
- It is now editable.
- A data migration hides it (ie: with 'FieldsConfig') in existing installations when you upgrade.
- The class 'views.organisation.OrganisationCreationBase' has been removed (merged with 'OrganisationCreation').
* Reports :
- Some constants have been replaced by 'django.db.models.*Choices' :
- An 'IntegerChoices' class for : RGT_*, GROUP_TYPES.
- An 'TextChoices' class for : RGA_*, AGGREGATOR_TYPES.
- In 'core.graph' :
- The attribute 'cell_constraint.GHCCCustomField.customfield_type' has been replaced by "customfield_types".
- The method 'aggregator.ReportGraphAggregator.aggregrate()' has been renamed "aggregate".
- Several templatetags have been renamed (for consistency) :
- 'report_chart_json' became 'reports_chart_json'.
- 'report_chart_selector' became 'reports_chart_selector'.
- 'report_chart_labels' became 'reports_chart_labels'.
* Activities :
- The class 'bricks.PastActivitiesBrick' now inherits a new base class called '_RelatedActivitiesBrick'.
- The global dictionary 'views.activity._TYPES_MAP' has been transformed in the class attribute 'ActivityCreation.allowed_activity_types'.
* Billing :
- The constants 'DISCOUNT_*' have been replaced by an 'django.db.models.IntegerChoices' : 'model.Line.Discount'.
- The class 'forms.credit_note.CreditNoteRelatedForm' has been renamed "CreditNotesRelatedForm".
* Commercial :
- In the model 'AbstractStrategy', in the methods 'get_asset_score()' & 'get_charm_score()', the argument "segment" has been renamed "segment_desc".
* Emails :
- In 'constants' :
- 'MAIL_STATUS*' have been replaced by a 'django.db.models.IntegerChoices' : 'model._Email.Status'.
- 'MAIL_SYNC_STATUSES' has been replaced 'model._Email.SYNCHRONIZATION_STATUSES'.
- In the form-class, 'forms.mail.EntityEmailForm', the field "subject" is now required.
- In 'models.sending', some constants have been replaced by 'django.db.models.IntegerChoices' :
- 'SENDING_TYPE*' by 'EmailSending.Type'.
- 'SENDING_STATE*' by 'EmailSending.State'.
* Mobile :
- The templatetags without prefix have been prefixed :
- {% prepare_fields %} => {% mobile_prepare_fields %}
- {% document_class %} => {% mobile_document_class %}
- {% activity_card %} => {% mobile_activity_card %}
- {% get_footer %} => {% mobile_footer %}
- |orga_subjects => |mobile_organisation_subjects
* Projects :
- In 'models.AbstractProjectTask' :
- The field 'order' is not 'null=True' any more.
- The <related_name> of the field 'parent_tasks' has been renamed "children" (it was "children_set").
* Geolocation :
- The inner-constants in 'models.GeoAddress' have been replaced by an 'IntegerChoices' class :
UNDEFINED, MANUAL, PARTIAL, COMPLETE, STATUS_LABELS
* Events :
- The name of the class 'bricks.ResutsBrick' has been fixed to be 'ResultsBrick'.
- In 'forms.event', the global variables '_SYMMETRICS' & '_TYPES' have been removed.
* CTI :
- The function 'utils.print_phone()' has been renamed 'utils.print_phone_html()'.
* VCFs :
- In 'forms.vcf' :
- The constant 'IMG_UPLOAD_PATH' has been removed.
- In the class 'VcfImportForm' :
- The methods '_create_contact()', '_create_address()' & '_create_image()' have been removed.
- The method '_init_orga_field()' has been renamed '_init_orga_fields()'.
# Javascript :
- The function 'creme.ajax.json.ajaxFormSubmit' has been removed.
- The jQuery package 'extensions/utils.js' has been reworked, and renamed as 'extensions/jquery.toggle-attr.js' :
- The extensions '$.fn.check()', '$.fn.uncheck()' & '$.fn.toggleCheck' have been removed.
- The extension '$.fn.toggleProp' has been added.
- The jQuery extension '$.fn.wait()' has ben removed (not useful anymore).
- The jQuery extension '$.toJSON()' has been removed ; use 'JSON.stringify()' instead.
- These unused dependencies have been removed :
- jquery.cookie.js
- jquery.highlight.js
- jquery.bind-first.js
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# The method 'creme_core.apps.CremeCoreConfig.tag_ctype()' has been removed.
# The function 'creme_core.checks.check_secret_key()' has been removed.
# In 'creme_core.core.job' :
- the functions '_build_*_command()' have been removed.
- the global variable 'COMMANDS' has been removed.
# The class attribute 'creme_core.utils.meta._FilterModelFieldQuery._TAGS' has been removed.
# There were several changes in 'creme.utils.loggers.CremeFormatter'.
# In 'mediagenerator':
- In 'settings', some global variables have been removed: GENERATED_MEDIA_DIR, _media_dir.
- In 'utils', these functions have been removed: _load_generators(), _refresh_dev_names().
# Apps :
* Recurrents :
- In 'registry' :
- The attribute 'RecurrentRegistry._apps' has been replaced by '_template_forms'.
- The classes 'TemplateRecurrentRegistry' & 'AppRecurrentRegistry' have been removed.
* VCFs :
- Several useless methods have been removed in 'vcf_lib.base'.
== Version 2.2 ==
UPGRADE NOTE :
- You should create a all new virtual environment based on Python 3.6+
(e.g. "mkvirtualenv -p /usr/bin/python3XX" if you use 'mkvirtualenv')
and populate it with "pip install -e .[mysql|pgsql]" of course.
- Execute the well known commands "migrate", "generatemedia" & "creme_populate".
- If you used CommercialApproaches, edit the configuration of Activities' custom-forms to add
the field "Is a commercial approach?".
Users side :
------------
# A CustomForm system have been created : the forms for almost all entity types can be customised through
a GUI in the general configuration. You can create groups of fields, chose which fields are used (some
of them are required anyway) and their order. A basic layout system for the group allows you to display
groups on the whole width, or on the half width (left or right).
# CustomFields have been improved :
- 3 new types of CustomFields have benn added : TEXT, DATE & URL.
- New choices for ENUM (Choice list) & MULTI_ENUM (Multiple choice list) CustomFields can be created on-the-go in forms.
- In mass import, duplicates choices are managed : no error is raised, the first choice is used.
# Add a new secured view to download dynamic files (ie: uploaded files, files related to entity, files generated by export...).
# Sending an entity to the trash (or restoring it) creates now an history line.
# An exception handler for errors 400 (Bad Request) has been added.
# In listviews, the popup which displays the selected entity filter information is replaced by a popover.
# The buttons got descriptions, which are displayed as tool-tips.
# Apps :
* Creme_config :
- Each user can now fix the language to use in the interface ; by default the language asked by the browser is used (like before).
- The possibility to export & import some configured models has been added.
It's useful to deploy a test/prototype server, & re-use their data on the production server.
The transferred models are : UserRoles, HeaderFilters, EntityFilters, CustomForms configuration,
CremePropertyTypes, RelationTypes, Bricks configuration, Buttons configuration, Search configuration.
- The configuration of CustomFields has been improved :
- CustomFields can now be marked as required.
- CustomFields which are related to values cannot be deleted any more; they are just marked as deleted.
Marked CustomFields do not appear in list-views, reports etc...
If a marked CustomField has no value any more (ie: no entity uses it), it can be definitely deleted.
- The management of choices for CustomFields (so with type ENUM or MULTI_ENUM) has been improved :
- A new view to manage them will improve the managing of great number of choices.
- The deletion view proposes now to replace a choice by another one in related entities.
- Duplicated choices are now avoided when creating or editing choices.
- The deletion/replacement of UserRoles uses now the "deletor" Job.
- A popover is used for permissions by filter in the role configuration.
- In the configuration of bricks :
- The constraints of InstanceBricks are displayed.
- It's now forbidden to delete a RelationType brick, a custom brick or an instance brick when it is used in a configuration.
* Reports :
- In Reports, the aggregates related to hidden field are hidden too.
- The way the abscissa & the ordinate of 'models.AbstractReportGraph' are stored has been rework.
- The ReportGraph's form has been improved too :
- The fields for abscissa & ordinate have been replaced by 2 composite/chained fields.
- The new widget for abscissa does not perform AJAX requests & has autocompletion.
- A new ReportGraph fetcher specific to Contact has been added : "belongs to the Contact/User".
- The volatile link is now used to narrow the related list-view (when you click of a ReportGraph's brick).
- The report graph bricks set now the compatible entities types (attribute "target_ctypes") ;
so they are only proposed for detail-view's brick configuration which are relevant.
* Billing :
- A backend system to export documents as files replaces the old PDF export (based on LateX) ;
Several backends have been created, based on: xhtml2pdf, weasyprint, xlwt (python packages) & pdflatex (external binary, like before).
All these backends export PDF files, excepted the one based on 'xlwt' which exports raw data in XLS files.
In the default settings, the one based on 'xhtml2pdf' & 'xlwt' are activated ; there are easy to install with "pip", even on Windows, & give good results.
The 2 "new" PDF exporters ('xhtml2pdf' & 'weasyprint') got new visual design.
If you were using LateX in previous releases, configure your setting 'BILLING_EXPORTERS', & then select it in the configuration GUI of 'billing'.
* Activities :
- The version of Fullcalendar has been upgraded (from "1.6.7" to "3.10").
- The creation/edition of events through a range selection is now possible in the calendar.
* Persons :
- The constraints of the RelationTypes "owns => belongs to" have been narrowed to: [Contact, Organisation] => Organisation.
* Tickets :
- A field 'Status.is_closed' has been added ; it can be edited in configuration.
* Commercial :
- The constraints of some RelationTypes have been narrowed :
- "has sold => has been sold by" : [Contact, Organisation] => [Product, Service].
- with "completes a goal of the commercial action", this types cannot be subject any more :
Strategy, billing.{CreditNote, TemplateBase, ProductLine, ServiceLine}
* Projects :
- The fields "start" & "end" of Tasks cannot be emptied with the inner-edition any more.
BEWARE: if you have empty values, they are replaced at migration (<0> for duration, <01-01-1970> for start/end).
* Geolocation :
- An OpenStreetMap backend and 3 related bricks have been added :
- OpenStreetMapDetailMapBrick
- OpenStreetMapFilteredMapBrick
- OpenStreetMapNeighboursMapBrick
* Mobile :
- A new SettingKey to configure the redirection links to "Google Maps" or "Open Street Map" has been added. Some examples :
- https://www.openstreetmap.org/search?query={search}
- https://www.openstreetmap.org#map=18/{lat}/{lng}
- https://www.google.com/maps/?q={search}
- https://maps.google.com/maps/place/{lat},{lng}
Developers side :
-----------------
Non breaking changes :
----------------------
# Deprecations :
- Almost all entity forms in apps have been deprecated (because CustomForms are used instead them).
- In 'creme_core.models', some custom managers have been added to :
- The method 'ButtonMenuItem.create_if_needed()' is deprecated ; use 'ButtonMenuItem.objects.create_if_needed()' instead.
- In 'entity_filter' :
- The method 'EntityFilter.create()' is deprecated ; use 'EntityFilter.objects.smart_update_or_create()' instead.
- The method 'EntityFilter.get_for_user()' is deprecated ; use "EntityFilter.objects.filter_by_user(...).filter(entity_type[in]=...)" instead.
- The method 'EntityFilter.get_latest_version()' is deprecated ; use 'EntityFilter.objects.get_latest_version()' instead.
- In 'header_filter' :
- The method 'HeaderFilter.get_for_user()' is deprecated ; use "HeaderFilter.objects.filter_by_user(...).filter(entity_type=...)" instead.
- The method 'HeaderFilter.create()' is deprecated ; use 'HeaderFilter.objects.create_if_needed()' instead.
- In 'custom_field' :
- These methods of 'CustomField' are deprecated : type_verbose_name(), get_pretty_value()
- The method 'CustomField.get_value_class()' is deprecated ; use the property 'value_class' instead.
- The method 'CustomFieldValue.delete_all()' is deprecated.
- In 'fields_config' :
- The method 'FieldsConfig.create()' is deprecated ; use 'FieldsConfig.objects.create()' instead.
- The method 'FieldsConfig.field_enumerator()' is deprecated ; use 'FieldsConfig.objects.field_enumerator()' instead.
- The method 'FieldsConfig.filter_cells()' is deprecated ; use 'creme_core.core.entity_cell.EntityCell.is_excluded' instead.
- The method 'FieldsConfig.get_4_model()' is deprecated ; use 'FieldsConfig.objects.get_for_model()' instead.
- The method 'FieldsConfig.get_4_models()' is deprecated ; use 'FieldsConfig.objects.get_for_models()' instead.
- The method 'FieldsConfig.is_model_valid()' is deprecated ; use 'FieldsConfig.objects.is_model_valid()' instead.
- In 'bricks' :
- The property 'BrickHomeLocation.brick_verbose_name' is deprecated.
- The property 'BrickMypageLocation.brick_verbose_name' is deprecated.
- The method 'CustomBrickConfigItem.generate_id()' is deprecated ; use the property "brick_id" instead.
- The method 'InstanceBrickConfigItem.errors()' is deprecated ; use 'InstanceBrickConfigItem.brick.errors' instead.
- In 'search' :
- The method 'SearchConfigItem.create_if_needed()' is deprecated ; use 'SearchConfigItem.objects.create_if_needed()' instead.
- The method 'SearchConfigItem.get_4_models()' is deprecated ; use 'SearchConfigItem.objects.iter_for_models()' instead.
- In the class 'creme_core.backends._BackendRegistry':
- The property 'backends' is deprecated ; use 'backend_classes' instead.
- The method 'get_backend()' is deprecated ; use 'get_backend_class()' instead.
- In 'creme_core.forms' :
- In 'base', the class 'FieldBlocksGroup' is deprecated ; use 'BoundFieldBlocks' instead.
- In 'widgets', these classes are deprecated : 'DependentSelect', 'AjaxChoiceField' & 'AjaxMultipleChoiceField'.
- In 'creme_core.gui' :
- In 'field_printers' :
- These functions are deprecated : 'print_integer()', 'print_decimal()'.
- The class 'M2MPrinter' is deprecated ; use 'M2MPrinterForHTML' instead.
- The class 'quick_forms.QuickFormsRegistry' has been improved :
- The method 'iter_models()' is deprecated ; use '@models' instead.
- The method 'get_form() is deprecated ; use 'get_form_class()' instead.
- In 'creme_core.views' :
- These functions of 'bricks' are deprecated ; use the class-based view 'BricksReloading' instead :
- get_brick_ids_or_404()
- bricks_render_info()
- build_context()
- render_detailview_brick() & render_home_brick()
- The function-view 'file_handling.download_file()' is deprecated; use the class-based view 'RegisteredFileFieldDownloadView' instead.
- In 'decorators', "@POST_only" is deprecated ; use 'django.views.decorators.http.require_POST' instead.
- In 'creme_core.utils' :
- The function 'entities2unicode()' is deprecated ; use 'entities_to_str()' instead.
- The function 'related2unicode()' is deprecated.
- A new module 'content_type' has been added :
- The function 'creme_entity_content_types()' is deprecated ; use 'content_type.entity_ctypes()' instead.
- The function 'get_ct_or_404() is deprecated ; use 'content_type.get_ctype_or_404()' instead.
- The function 'build_ct_choices() is deprecated ; use 'content_type.ctype_choices()' instead.
- In 'creme_core.templatetags' :
- "{% creme_media_url %}" is deprecated ; use the icon system instead.
- "{% hg_info %}" is deprecated ; use "{% scm_info %}" instead.
- These template files are deprecated :
- creme/creme_core/templates/creme_core/generics/blockform/content.html
- creme/creme_core/templates/creme_core/templatetags/widgets/list_instances.html
- In JavaScript :
- The package "creme.color" is deprecated and can be replaced by RGBColor tools.
- Apps :
* Creme_config :
- The class 'forms.user_role.UserRoleDeleteForm' is deprecated ; use 'UserRoleDeletionForm' instead.
- In 'forms.custom_fields' :
- The class 'CustomFieldsBaseForm' is deprecated ; use 'CustomFieldBaseForm' instead.
- The class 'CustomFieldsCTAddForm' is deprecated ; use 'FirstCustomFieldCreationForm' instead.
- The class 'CustomFieldsAddForm' is deprecated ; use 'CustomFieldCreationForm' instead.
- The class 'CustomFieldsEditForm' is deprecated.
- The function 'forms.user._password_validators_help_text_html()' is deprecated.
* Persons :
- These function-views in 'views.crud_relations' are deprecated ; use the view named "creme_core__save_relations" instead :
become_customer(), become_prospect(), become_suspect(), become_inactive(), become_supplier()
- The abstract function-view 'views.crud_relations._link()' is deprecated.
- These template files are deprecated :
- creme/persons/templates/persons/frags/*.html
- creme/persons/templates/persons/*_form.html
- creme/persons/templates/persons/*_form.html
- The JavaScript function 'creme.persons.copyTo()' is deprecated.
* Activities :
- The SettingKey 'setting_keys.form_user_messages_key' is deprecated ;
the related constant 'SETTING_FORM_USERS_MSG' too.
- These template files are deprecated :
- creme/activities/templates/activities/frags/*
- creme/activities/templates/activities/forms/add-activity-popup.html
- creme/activities/templates/activities/add_activity_form.html
* Reports :
- In 'core.graph' :
- In the class 'ReportGraphHand', the property 'verbose_ordinate' is deprecated ; you can use the templatetag "{% reports_graph_ordinate %}" instead.
- The method 'fetcher.RegularFieldLinkedGraphFetcher.validate_fieldname()' is deprecated.
- In 'models' :
- The method 'AbstractReport.get_related_fields_choices()' is deprecated.
- In 'AbstractReportGraph' :
- The method 'create_instance_brick_config_item() is deprecated ; use 'GraphFetcher.create_brick_config_item()' instead.
- The method 'get_fetcher_from_instance_brick()' is deprecated ; use "ReportGraphBrick(...).fetcher" instead.
- The inner-class 'InstanceBrickConfigItemError' is deprecated.
- In 'forms.report', 'ReportCreateForm' & 'ReportEditForm' are deprecated.