-
Notifications
You must be signed in to change notification settings - Fork 25
/
CHANGELOG.txt
6601 lines (6482 loc) · 520 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.7 Work in progress (not released -- this is a draft) ==
Users side :
------------
# The minimal version of Python is now '3.10'.
# A new mandatory app has been added: "Custom entities".
It allows users to create their own types of entity without coding.
- You can create up to 20 types.
- The new types have just one regular field ("name"), you can add custom-field as usual.
- Some features are still missing (inner-edition, custom-forms, mass-import, mass-import, cloning...).
- BEWARE: it you upgrade from a previous version of Creme, 'creme.custom_entities' must be
in your 'settings.INSTALLED_APPS' (it should be OK it you did not modify it or have modified as advised).
# The deletion & cloning buttons have been reworked in detailed views & list-views;
they are now disabled when a rule avoids you to delete them (e.g. a Contact corresponding
to a user) & the reason is displayed as tool-tip.
# The deletion views have now a better display for the dependencies issues.
Example: entities are displayed as HTML links.
# Apps :
* Creme_config :
- The buttons configuration can now be customised per role.
- In the bricks configuration, default configuration is used as initial value when it's relevant
(instead of starting with an empty configuration).
- In the relation types configuration, you can now edit the "minimal display" value for standard types.
- A view which displays all "FileRefs" (temporary files) has been added; it's only available for staff users.
* Persons :
- A new optional field has been added to 'Organisation': "code".
You can use it to distinguish you managed organisations when you get several ones.
Upgrade note:
if you upgrade from an instance of Creme 2.6, you have to configure your blocks to display
this field if you want to see it. As the field is optional, you can also hide it to remove
it everywhere (notably forms).
* Activities :
- A field of 'Activity', "Fixed or floating?" (internal name: 'floating_type') is now visible.
- A "card" brick is now available for the hat of the Activities' detail-view.
It's used by default by the new installations.
* Billing :
- The number generation has been heavily reworked. The old number generation system
took a prefix in settings & generated numbers in the form "PREFIX15".
The new system can be visually configured & is more powerful :
- The configuration takes now a format string; there are a mandatory variable "{counter}",
but also "{year}", "{month}" & "{code}" (which corresponds to the new field 'Organisation.code').
- The counter can be reset annually/monthly.
- The counter can be manually edited (it's useful after a mass-import to keep a consistent numbering).
- The manual edition of the number can be forbidden.
Notice that if you upgrade from Creme2.6, your existing configuration is migrated &
you should not see difference for Invoices/Quotes/Sales Orders.
The numbers for Credit Notes are not automatically generated at their creation anymore.
These variables in settings.py have been removed :
- QUOTE_NUMBER_PREFIX
- INVOICE_NUMBER_PREFIX
- SALESORDER_NUMBER_PREFIX
- It's now forbidden by default to edit the source Organisation of a Invoice/CreditNote when a number is set.
This behaviour can be changed in the configuration portal of 'billing'.
- The 'Convert to ...' buttons have been reworked :
- When a button is disabled, the reason is displayed as tool-tip.
- The constraints for properties & relationships are better respected.
* Opportunities :
- You can now create unsuccessful phone calls from an Opportunity's detail-view :
- A button has been added (not enabled in default installations).
- In the block "Linked Contacts", you can activate an new action in the configuration (idem).
- The field 'Opportunity.chance_to_win' checks now that the value is between 0 & 100.
Developers side :
-----------------
Non breaking changes :
----------------------
# Deprecations :
- The method 'creme_core.core.entity_cell.EntityCellCustomField.build()' with integer "value" is deprecated;
pass a string (ID ou UUID) instead.
- In 'creme_core.models :
- The method 'CremePropertyTypeManager.smart_update_or_create() is deprecated;
use the classical methods 'create()' or 'update_or_create()' instead.
Notice: if you still want to set the field "subject_ctypes" from models like before,
you can use the new method 'CremePropertyType.set_subject_ctypes()'.
- These methods of 'CremeEntity' are now deprecated (use the new module 'creme_core.core.cloning' instead) :
- clone()
- _clone_object()
- _clone_custom_values()
- _clone_m2m()
- _copy_properties()
- _copy_relations()
- _pre_save_clone()
- _post_clone()
- _post_save_clone()
- The function 'creme_core.utils.translation.get_model_verbose_name()' is deprecated;
use 'smart_model_verbose_name()' instead.
- The method 'creme_core.tests.base._CremeTestCase.assertRelationCount' is deprecated;
use the new methods 'assertHaveRelation()' & 'assertHaveNoRelation()' instead.
- In 'creme_core.templatetags' :
- In the module "creme_core_tags", the argument "callback_url" of '{% inner_edition_uri %}' is deprecated.
- In the module "creme_ctype" :
- The tag "{% ctype_for_model %}" is deprecated; use the filter "|ctype_for_instance" instead.
- The tag "{% ctype_for_swappable %}" is deprecated; use the filter "|ctype_for_swappable" instead.
- The tag "{% ctype_counted_instances_label %}" is deprecated; use the filter "|ctype_counted_label" instead.
- App :
* Persons :
- The method 'models.base.PersonWithAddressesMixin._post_save_clone()' is deprecated.
* Activities :
- The constants 'NARROW', 'FLOATING_TIME' & 'FLOATING' are now deprecated;
use 'Activity.FloatingType.*' instead.
* Billing :
- The module 'registry' is deprecated.
- The class 'views.base.BaseCreation' is deprecated.
* Projects :
- The method 'models.AbstractProjectTask.clone_scope()' is deprecated.
# In 'creme_core.models' :
- The models 'CremeUser' gets a new method 'has_perm_or_die()' which raises exceptions with friendly error messages.
- The model 'FileRef' gets a new optional field "description";
it's used by the new view which displays all FileRefs (so feel free to fill it).
# Apps :
* Persons :
- The model 'Address' gets new semantic fields (like ZipCodeField) which allow to
easily customise things (like the form field, the field printer etc...).
# Javascript:
* FormDialog:
- Form submit error responses with HTML can either replace the default overlay content or the frame content.
- New creme.dialog.Frame option 'fillOnError'; if enabled the html error response replaces the content.
- New creme.dialog.Dialog option 'fillFrameOnError'; if enabled the html error response replaces the content.
Breaking changes :
------------------
# Deprecated stuffs which have been removed :
- In 'creme_core.gui' :
- In 'field_printers', the function 'image_size()' & the constants MAX_HEIGHT/MAX_WIDTH has been removed.
- In the class 'mass_import.FormRegistry' :
- The methods 'get()' & 'is_registered()' have been removed.
- The class 'UnregisteredCTypeException' has been removed.
- In 'creme_core.models' :
- In the methods 'HeaderFilter.can_view()' & 'creme_core.models.EntityFilter.can_view()',
the argument "content_type" has been removed.
- Setting the class attribute 'HistoryLine.ENABLED' is now useless.
The method 'HistoryLine.disable()' has been removed.
- The function 'creme_core.utils.create_if_needed()' has been removed.
- The constant 'creme_core.core.entity_filter.EF_USER' has been removed.
- In the class-view 'creme_core.views.entity_filter.EntityFilterDeletion',
the ID of the EntityFilter cannot be passed in the POST data anymore.
- In 'creme_core.templatetags' :
- The templatetag {% has_perm_to %} has been removed.
- The templatetag {% menu_buttons_display %} (from the library "creme_menu") has been removed.
- The function 'creme_core.utils.bool_from_str()' has been removed.
- In 'creme_core.tests' :
- The module 'forms.base' has been removed.
- The class 'views.ViewsTestCase' has been removed.
- In detail-view for CremeEntities, these actions for the "instance" buttons are not available anymore :
- "creme_core-hatmenubar-addrelationships"
- "creme_core-hatmenubar-form"
- "creme_core-hatmenubar-update"
- "creme_core-hatmenubar-view"
- Apps :
* Persons :
- The form class 'forms.contact.ContactNamesForm' has been removed.
- The class-view 'views.contact.ContactNamesEdition' has been removed.
* Emails :
- The function 'utils.get_mime_image()' has been removed.
- In the constructor of 'utils.SignatureRenderer' the argument "domain" is now required.
# The deletion of CremeEntities has been reworked in order to allow the customisation without having to write your own view.
- If your model could be deleted in Creme 2.6 with the generic deletion view (i.e. you did not define your own view)
you must now register your model in the new registry for deletion. In you "apps.py" :
def register_deletors(self, entity_deletor_registry):
entity_deletor_registry.register(model=MyModel)
- If you disabled the deletion with the method 'get_delete_absolute_url()' returning an empty string,
you should just remove this method to avoid some warning messages.
- If you wrote your own deletion view (i.e. your model defines 'get_delete_absolute_url()'), you should
probably use the new 'Deletor' system to write your custom rules. You'll have less code to maintain,
and your checks will be used to disabled the deletion buttons or by the trash cleaner job.
Hint: see the method 'creme.persons.apps.PersonsConfig.register_deletors()' as example.
# The cloning of CremeEntities has been reworked in order to allow the customisation without having to write your own view.
- If your model could be cloned in Creme 2.6 with the generic cloning view (i.e. you did not define your own view)
you must now register your model in the new registry for cloning. In you "apps.py" :
def register_cloners(self, entity_cloner_registry):
entity_cloner_registry.register(model=MyModel)
- If you disabled the cloning with the method 'get_clone_absolute_url()' returning an empty string,
you should just remove this method to avoid some warning messages.
- If you wrote your own cloning view (i.e. your model defines 'get_clone_absolute_url()'), you should
probably use the new 'Cloner' system to write your custom rules. You'll have less code to maintain,
and your checks will be used to disabled the cloning buttons.
Hint: see the method 'creme.persons.apps.PersonsConfig.register_cloners()' as example.
# The format used to store 'EntityCells' in JSON has slightly changed (si in custom Brick configuration, global search configuration...).
When the cell is related to a 'CustomField', the key "value" contains now the UUID, not the ID anymore.
You won't be impacted unless you read the JSON directly (why would you do this bro?).
In the model 'RelationBrickItem', the way ContentTypes are stored in the field "json_cells_map" has changed too;
a natural key with the pattern "app.modelname" is used instead of the ID.
# The method 'creme_core.bricks.ButtonsBrick._get_buttons()' has a new mandatory argument.
# In 'creme_core.core.entity_cell', in the methods 'EntityCell*.build()' :
- The second argument is now always named "name" (e.g. it was named "customfield_id" in 'EntityCellCustomField.build()').
- The extra arguments are now keyword only (.e.g. 'EntityCellRegularField' & "is_hidden").
# In 'creme_core.gui' :
- In the class 'bricks.Brick', the method 'has_perms()' has been removed ;
use the new method 'check_permissions()' instead.
- In the class 'button_menu.Button', the method 'is_allowed()' has been removed ;
use the new method 'check_permissions()' instead. In the template of your button,
you must also use the variable "button.permission_error" instead of "button.is_allowed".
- In the class 'menu.MenuEntry', the method '_has_perm()' has been removed ;
use the new method 'check_permissions()' instead.
# In 'creme_core.models' :
- In the abstract class 'MinionModel' the field "is_custom" is now marked <editable=False> ;
it will at least need a migration (or a manual change in the existing migrations because
it has no consequence on the DB).
- In the model 'CremeEntity' :
- The field "extra_data" is now tagged as <clonable=False>;
use the new cloning system to clone precisely what you want.
- The method 'get_clone_absolute_url()' is not static anymore.
- The method 'BrickDetailviewLocationManager.create_if_needed()' now takes its arguments as keywords only.
- In 'CremeUser' :
- The unique argument of the following methods is now positional only :
- has_perm_to_create() & has_perm_to_create_or_die()
- has_perm_to_export() & has_perm_to_export_or_die()
- has_perm_to_access() & has_perm_to_access_or_die()
- has_perm_to_admin() & has_perm_to_admin_or_die()
- The method 'has_perms()' return <True> if you pass an empty argument, for consistency
(you did probably not use this case).
- In 'UserRole', the arguments of the following methods have changed (2 strings => 1 positional ContentType instance):
- can_create()
- can_export()
# In 'creme_core.views' :
- The class-view 'entity.EntityRestoration' now just checks the deletion credentials & the attribute "is_deleted".
- The mixin 'entity.EntityDeletionMixin' has been heavily reworked :
- The method 'delete_entity()' takes a new mandatory argument "deletor".
- The methods 'check_entity_for_deletion()' & 'move_to_trash()' have been removed.
# In templates :
- The buttons parts of the hat bricks have changed in order to manage the new deletion & cloning systems
(good news, some {% block %} have been added) :
- "creme_core/bricks/base/hat-card.html"
- "creme_core/bricks/generic/hat-bar.html"
# Apps :
* Creme_config :
- In the brick 'GenericModelBrick', "meta" is not injected in the context anymore.
* Persons :
- In the method 'bricks.NextActivitySummary.get_context()', the returned context does not contain "NARROW" anymore.
- In the button 'buttons.AddLinkedContactButton', the variable "contact_link_perm" is not injected anymore.
* Activities :
- The field 'Activity.floating_type' got some light changes.
It's now a 'PositiveSmallIntegerField', it ahs a 'choices' attribute & it's viewable.
- Some small changes have been made in the class 'views.buttons.UnsuccessfulPhoneCallCreation'.
* Reports :
- In the field 'report.Field.name', the CustomFields are referenced by their UUID now (see types 'RFT_CUSTOM' & 'RFT_AGG_CUSTOM').
* Billing :
- The class 'actions.GenerateNumberAction' has been removed (use '_GenerateNumberAction' instead).
- In 'buttons' :
- The class 'GenerateInvoiceNumberButton' has been removed (use 'GenerateNumberButton' instead).
- The class '_ConvertToButton' (& so, the child classes) has been reworked.
- It injects a string "error" in the context.
- "creation_perm" is not injected in the template anymore.
- The attribute 'target_modelname' has been removed.
The template has been modified, of course.
- In 'core' :
- These variables have been removed : CLASS_MAP, CONVERT_MATRIX, RTYPE_MATRIX.
- The function 'get_models_for_conversion()' has been removed.
- In 'registry' :
- The classes 'Algo' & 'AlgoRegistry' have been removed ; see the new method
'apps.BillingConfig.register_billing_number_generators()' to know how to create/register a number generator.
- The class 'RelationTypeConverterRegistry' & the variable 'relationtype_converter'
have been removed ; you can see in 'creme.opportunities.apps.OpportunitiesConfig.register_billing()'
how to code a feature similar to the old relationship conversion.
- In 'models' :
- The models 'ConfigBillingAlgo' & 'SimpleBillingAlgo' have been removed.
- The default statuses are now initialized at models level, not view level.
- The method 'Base.generate_number()' has been removed.
- In the model 'AbstractTemplateBase' :
- The field "status_id" has been replaced by the field "status_uuid".
- The method 'create_entity()' has been re-written to use a new "spawning"
system, which is derived from the new cloning system.
This new system is de-coupled from the clone & conversion systems;
it should be easier to customise from another app.
- In 'views' :
- The class 'invoice.InvoiceNumberGeneration' has been removed.
- The class view 'convert.Conversion' has been reworked :
- The attribute 'dest_title' has been removed.
- The method 'get_destination_model()' has been removed.
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# In 'creme_core.auth.backend', the constants '_*_PREFIX' have been removed.
# The method 'creme_core.models.CremeModel._delete_stored_file()' is not static anymore.
# Apps :
* Creme_config :
- The class 'bricks.ButtonMenuBrick' (& its template) has been heavily reworked.
- In 'core.exporters', the class 'CellsExporterMixin' & the function 'dump_ct()' have been removed.
- The function 'core.importers.load_ct()' has been removed.
- In the class 'function_fields.TemplateBaseVerboseStatusField',
the attribute "_cache" has been replaced by "_statuses_per_model".
- The views to configurate buttons (& their URL patterns & names) have been heavily reworked.
== Version 2.6 ==
UPGRADE NOTES :
- You should create a all new virtual environment based on Python 3.8+ (as usual).
- Some MariaDB users encountered errors when running migrations.
The following workaround has worked for them:
First, try to run the migrations again (as long as the error is a new one).
It the same error is raised, get the raw SQL code with the command <creme sqlmigrate --settings=... app_label migration_name>
(with the name of the migration which fails of course), then execute line after line the SQL commands in a MariaDB shell.
You will get errors for things which have already be done, it's OK; then, you can run the command 'migrate' again.
Users side :
------------
# A notification system has been added. The notifications are sent to channels, and users can configure
them in order to their notifications are displayed in the browser and/our received by emails.
- A new job which sends notification emails has been created.
- The reminder system (used by Alerts & ToDos) has been reworked to create notifications (instead of sending emails).
- Some events produce now a notification : the end of mass import, an administrator changed your password...
- Staffs users can sent a notification to announce a system upgrade (there is a button in the new page which display all your notifications).
A new command "creme_announce" has been created to do the same thing from the shell.
# The list-views with a big number of entities & no explicit sort now works correctly (i.e. not duplicate).
The mass-export & the exploration mode now accept to be used in this case.
# In the detail-view for property type, a button to delete all the properties with this type
(and related to a given entity type) has been added.
# A detail-view for EntityFilter has been added; in addition to the usual information,
it displays the entities which are linked to the filter (currently only Reports).
# A role "Regular user", which can do everything excepted administrating apps, is created in new installations.
# Many fields of User are now viewable; it can be useful for particular filters.
# The Custom-Fields with type 'URL' are not validated anymore.
You can now omit the protocol (i.e. "http://"), or use local URLs without domain;
it should avoid some annoying errors when importing from csv/xls files.
# Thanks to the library "openpyxl", XLSX files should be better managed now for import, & export proposes this file format now.
BEWARE: if you use a custom list for 'IMPORT_BACKENDS' in your settings,
the value "creme.creme_core.backends.xls_import.XLSXImportBackend" is now invalid.
You should use "creme.creme_core.backends.xlsx_import.XLSXImportBackend" instead.
# In global search, forbidden models are not proposed anymore.
# The button menu has been reworked; it can now be reloaded dynamically
(e.g. some buttons reloaded the whole page in order to be hidden -- or change their label -- once they did their job).
# Seconds are now displayed as tool-tip for datetime fields.
# The command "creme_populate" now returns a correct error code if an error happened.
# The JQPlot compatibility has been dropped.
# Apps :
* Creme_config :
- The bricks configuration of a role can be cloned from the configuration of another role.
* Activities :
- The JavaScript component FullCalendar has been upgraded to the version "5.11.4" :
- New calendar look-n-feel.
- Week/month view changes are now in browsing history ; after a refreshing you will stay on the same view.
- Collisions between events from the same calendar are forbidden.
- The "busy" events (no collision)are displayed with a stripped background.
- A configuration system for the calendar view has been added :
- Default view can be "month" or "week".
- Which days are active.
- What hour range to use.
- ...
- Teams have a default Calendar since years, but they were unused;
now, when you select a team as a participant, the Activity is put on the team's Calendar too.
The default Calendar of a team is always public, & a data migration remove the extra Calendars.
- A new button, which can be displayed on Contacts' detail-views, is available: "Create an unsuccessful phone call".
- The configuration block for Calendars has been improved.
* Persons :
- The staff users are not related to Contacts anymore.
Note: the existing Contacts which were related to staff users are sent to the trash.
- A button to transform a Contact into a user has been added.
- The URL fields of Contacts & Organisations are not validated anymore (see remarks about URL CustomFields above).
* Reports :
- You can now create filters which are reserved to Reports.
- The Graphes using Relationships have been improved :
- the SQL queries should be more efficient.
- the entities in abscissa are now ordered by their name.
- the length of the URL to list-view remains always short (& so it avoids issue with URLs which reach the server's limit).
- The date fields of referenced models can be used for temporal filtering in the Reports
(e.g. in a report on Contacts, Photograph's fields are available).
- The fields with 'choices' (e.g. status of EntityEmails) can now be used as Graphes' abscissa.
- A new type of chart is available: 'linechart'.
- Graphs with an enumerable abscissa are now using its color if exists (e.g. billing status).
* Assistants :
- The UserMessages produce now notifications (so users can chose to be notified in their browser, emails are not the only way anymore).
* Billing :
- You can now define the default statuses (which are notably used as initial values in creation forms).
You can also define the Invoice status to use when a number ins generated.
- When you clone an Invoice, the status is not copied anymore; the new Invoice gets the default status instead.
- When you edit an Invoice/Quote/... & change the target, the addresses of the new target are copied.
In the CSV/XLS import, the options to enable the addresses overriding have been removed because they are now meaningless.
* Emails :
- The spam score of sent emails should be better :
- the header contains a "Message-ID" which matches the host domain.
- the "content-ID" of inline images matches the host domain.
- The render of inlined images has been improved.
* Geolocation :
- The bricks which use OpenStreetMap are now used in the default installation (instead of the GoogleMaps ones).
Developers side :
-----------------
- Javascript :
- The version of Leaflet has been upgraded to "1.9.4".
- The version of 'FullCalendar' is now "5.11.4".
- Some math functions have been added as underscorejs mixins: absRound, clamp, scaleRound, scaleTrunc, toRadian, toDegree & toNumber
- The version of D3js has been upgraded to "7.8.5".
- The version of jQuery is now "3.7.1" (jQuery-migrate 3.4.1).
Non breaking changes :
----------------------
# Deprecations :
- In 'creme_core.core' :
- Several registries (classes & instances) have been renamed to get more naming consistency ;
the old names are still available but are deprecated.
- The constant 'entity_filter.EF_USER' is deprecated ; use 'EF_REGULAR' instead.
- In 'creme_core.gui' :
- Several registries (classes & instances) have been renamed to get more naming consistency ;
the old names are still available but are deprecated.
- In 'field_printers', the function 'image_size()' & the constants MAX_HEIGHT/MAX_WIDTH are now deprecated.
- In the class 'mass_import.FormRegistry' :
- The methods 'get()' & 'is_registered()' are now deprecated.
- The class 'UnregisteredCTypeException' is now deprecated.
- In 'creme_core.models' :
- In the methods 'HeaderFilter.can_view()' & 'creme_core.models.EntityFilter.can_view()',
the argument "content_type" is deprecated.
- Setting the class attribute 'HistoryLine.ENABLED' is deprecated.
The method 'HistoryLine.disable()' is deprecated too.
Use the new context/decorator 'creme_core.models.toggle_history' instead.
- In 'creme_core.utils' :
- The function 'bool_from_str()' is deprecated.
- The function 'create_if_needed()' is deprecated; use 'MyModel.objects.get_or_create()' instead.
- In the class-view 'creme_core.views.entity_filter.EntityFilterDeletion' (related to the URL named "creme_core__delete_efilter"),
the ID of the EntityFilter should now be passed in the URL, not the POST data.
- In 'creme_core.templatetags' :
- The templatetag {% has_perm_to %} is deprecated;
use the template-filters of the new library "creme_perms" instead.
- The templatetag {% menu_buttons_display %} (from the library "creme_menu") is deprecated;
see the new brick 'creme_core.bricks.ButtonsBrick'.
- In 'creme_core.tests' :
- The module 'forms.base' is deprecated.
Use these new methods of 'CremeTestCase' instead: assertFormfieldError() & assertValidationError().
Then stop using the base class 'FieldTestCase' & 'FieldTestCaseMixin'.
- The class 'views.ViewsTestCase' is deprecated ;
use the new method 'CremeTestCase.add_credentials()' instead.
- In Javascript :
- In detail-view for CremeEntities, these actions for the "instance" buttons are deprecated (use regular Brick actions instead) :
- "creme_core-hatmenubar-addrelationships" => "add-relationships"
- "creme_core-hatmenubar-form" => "add"/"edit"
- "creme_core-hatmenubar-update" => "update"
- "creme_core-hatmenubar-view" => "view"
Notice that the actions are not deprecated for models which do not inherit 'CremeEntity' (i.e. do not use the template "view_entity.html").
- The use of jQuery 3.x makes the following methods deprecated :
- '$.mouseover()' ; use '$.trigger("mouseover")' instead.
- '$.mouseenter()' ; use '$.trigger("mouseenter")' instead.
- '$.mouseleave()' ; use '$.trigger("mouseleave")' instead.
- '$.focusout()' ; use '$.trigger("focusout")' instead.
- Apps :
* Persons :
- The form class 'forms.contact.ContactNamesForm' is now deprecated.
- The class-view 'views.contact.ContactNamesEdition' is now deprecated.
* Billing :
- In 'models.Base' (& child classes), these methods are deprecated :
- build()
- _build_object()
- _build_relations()
- _build_properties()
* Emails :
- The function 'utils.get_mime_image()' is deprecated; use 'utils.SignatureImage' instead.
- The constructor of 'utils.SignatureRenderer' takes now an argument "domain" ;
do not fill it is deprecated.
# A new setting value "POPULATORS" has been added ; it allows to
override the classes used by the command "creme_populate".
Many classes 'Populate' have been reworked to facilitate their modification by inheritance ;
the work has been split into several methods, and class attributes with declarative values have been added.
# In 'creme_core.models' :
- A class attribute 'CremeEntity._DELETABLE_INTERNAL_RTYPE_IDS' has been added to avoid writing
methods '_pre_delete()' to manage the internal Relationships.
- The class 'UserRole' has 2 new fields: uuid & extra_data (a JSONField which can be used to store whatever you want).
- Some methods of 'CremeUser' accept instances of auxiliary models (i.e. with a method 'get_related_entity()')
which do not inherit 'CremeEntity': has_perm_to_view*(), has_perm_to_change*(), has_perm_to_delete*().
- The class 'EntityFilter' & 'HeaderFilter' got a JSONField "meta_data" to store custom data.
- The class 'CustomFieldEnumValue' got a UUIDField.
- A new field is available: 'fields.YearField'.
# In 'creme_core.views' :
- The views which manage Bricks now display a minimal Brick (see 'creme_core.gui.bricks.ForbiddenBrick')
which contains an error message when the attribute 'Brick.permissions' does not pass the validation.
This attribute has been set for many Brick classes in order to use this new behaviour.
- The class-view 'views.entity.EntityDeletion' now accepts explicit callback URL.
# In the class 'creme_core.core.setting_key.SettingKey', you can now pass :
- a custom form-field class.
- a custom renderer function.
# In 'creme_core.gui' :
- In the class 'bricks._BrickRegistry', 3 methods to unregister brick classes have been added.
- In 'button_menu' :
- The classes inheriting 'Button' can now define an attribute "dependencies" (like Brick classes) to have a dynamic reloading;
their template can now use the actions available to Bricks.
- In the class 'ButtonsRegistry' :
- A method 'unregister()' has been added.
- A button class can now be registered as mandatory, to be always displayed without
having to hard code them in the detail-view template.
- A method 'bulk_update.FieldOverrider.post_save_instance()' has been added
(it's useful to manage ManyToManyFields, Relationships, CremeProperties...).
- A method 'custom_form.CustomFormDescriptorRegistry.unregister()' has been added.
- A method 'mass_import.FormRegistry.unregister()' has been added.
- A method 'merge._MergeFormRegistry.unregister()' has been added.
# In 'creme_core.templatetags.creme_bricks', the tag {% brick_action %} accepts a new boolean argument 'comeback' ;
once enabled it will add a GET argument 'callback_url' with the current location (client side).
All derived tags (like {% brick_table_action %}) accept this argument too, of course.
# Apps :
* Creme_config:
- In the class 'registry._ConfigRegistry', some methods to unregister brick classes have been added.
- Many portals have been reworked to store the list of displayed Brick as a class attribute.
* Persons:
- The model 'AbstractAddress' got a JSONField "meta_data" to store custom data.
* Activities:
- The models 'ActivityType' & 'ActivitySubType' now inherit 'creme_core.models.MinionModel' (see <Breaking changes> part too).
- The upgrade of FullCalendar came with the following changes :
- these views use ISO8601 format WITH timezone (e.g 2023-04-14T10:38:30+01:00) :
- activities__calendars_activities
- activities__set_activity_dates
- The timezone used is the one provided by the user information instead of the browser's one.
* Reports:
- The graphes with type 'creme.D3TubeChart' now support color field from data.
* Sketch:
- The new type of chart 'creme.D3LineChart' draws a curved line with (optional) dots and tooltips.
- The new chart component 'creme.d3Tooltip' allows to render HTML tooltips.
- New 'creme.d3BisectScale' that retrieve the value scale source value from the position in a chart.
- The type of chart 'creme.D3DonutChart' now supports color field from data.
- The new functions 'd3.axisRadialInner()' & 'd3.axisRadialOuter' draw axis for gauge meters.
Breaking changes :
------------------
# Deprecated stuffs which have been removed :
- In 'creme_core.apps.CremeAppConfig', the argument of several method have been renamed
(it won't crash because the methods are currently called with positional arguments, but you should rename in your code anyway) :
- register_actions()
- register_field_printers()
- register_quickforms()
- register_statistics()
- In 'creme_core.core' :
- In the class 'entity_cell.EntityCell' (& child classes), the methods
'render_html()' & 'render_csv()' have been removed.
- In the class 'function_field.FunctionFieldResult' (& child classes), the methods
'for_html()' & 'for_csv()' have been removed.
- In 'creme_core.forms' :
- The method 'base.HookableFormMixin.as_span()' has been removed.
- The classes 'fields.CremeUserChoiceField' & 'fields.CremeUserChoiceIterator' have been removed.
- In 'creme_core.gui' :
- In 'bricks.Brick', the attribute "id" must be filled & used instead of "id_".
- In the class 'field_printers._FieldPrintersRegistry', these method have been removed :
- 'register()'
- 'get_html_field_value()'
- 'get_csv_field_value()'
- In 'creme_core.templatetags.creme_cells', the argument "output" of '{% cell_render %} has been removed.
- The function 'creme_core.utils.dates.make_aware_dt()' has been removed.
- In templates :
- In the file "creme_core/base.html", the '{% block extrahead %}' has been removed.
- The file "creme_core/generics/error.html" has been deleted.
- In 'creme_core.tests' :
- In the class 'base._CremeTestCase' :
- The method 'login()' has been removed.
- In the method 'build_request()', the argument "user" is now mandatory.
- In the the methods 'views.base.MassImportBaseTestCaseMixin._build_*doc(), the argument "user" is now mandatory.
- In Javascript :
- JQPlot has been removed.
- The 'USE_JQPLOT' flag is no longer useful.
- The widgets 'ui-creme-jqueryplot' & 'ui-creme-plotselector' have been removed.
- The widget 'ui-creme-scrollactivator' has been removed : only used with jqplot to optimize rendering on oldest browsers.
- The component 'creme.form.Chosen' and its dependencies have been removed.
- Refactor creme.widget.DateRangeSelector widget : 'data-format' attribute replaces 'date_format'.
- jQuery 3.x :
- Do not rely on $.ajaxSettings.traditional (deprecated since jQuery 1.9+) :
- creme.ajax.param() will always use traditional mode
- creme.ajax.jqueryFormSubmit() will use traditional mode as default.
- Apps :
* Creme_config :
- The class 'forms.fields.CustomEnumChoiceField has been removed.
* Activities :
- In 'constants', 'DEFAULT_CALENDAR_COLOR' & 'COLOR_POOL' have been removed.
- In 'models.calendar', these methods have been removed :
- 'CalendarManager.new_color()'
- 'Calendar.get_color()'
* Emails :
- These variables (in 'settings.py') have been removed:
- EMAILCAMPAIGN_HOST
- EMAILCAMPAIGN_HOST_USER
- EMAILCAMPAIGN_PASSWORD
- EMAILCAMPAIGN_PORT
- EMAILCAMPAIGN_USE_TLS
* Reports :
- These class-based views have been removed:
- GraphFetching (reports__fetch_graph)
- GraphFetchingInstance (reports__fetch_graph_from_brick)
* Events :
- The class 'gui.RelatedContactsActionsRegistry' have been renamed "RelatedContactActionRegistry".
# The way the Bricks' IDs are generated & used has been reworked.
These IDs have always be designed to retrieve the Bricks classes (on Python/server side), but in facts they were used for the HTML "id" attribute too.
Now these uses are more distinct ; the IDs of classes do not contain a prefix with "brick"/"block" (because it's useless),
& the prefixes of different types of brick have been reworked :
- The value of 'creme_core.constants.MODELBRICK_ID' changed from "modelblock" to "model".
- The value of 'creme_core.gui.bricks.Brick.GENERIC_HAT_BRICK_ID' changed from "hatbrick" to "hat".
- The method 'creme_core.gui.bricks.Brick.generate_id()' returns strings which start now by "regular-" (it started previously by "block_").
The values for the attributes "brick_id" stored in Data Base (see models in 'creme_core.models.bricks') are fixed by a migration.
In HTML, the Brick class' ID is now stored in the HTML attribute "data-brick-id", & the HTML attribute "id"
is created as "brick-{{brick_id}}" (see 'creme/creme_core/templates/creme_core/bricks/base/base.html').
So you'll have to fix your template files if you retrieve bricks nodes by their ID. Example :
$('.brick[id="{{brick_id}}"]') => $('.brick[data-brick-id="{{brick_id}}"]')
# The way the Buttons for CremeEntities (see "view_entity.html") are managed has changed.
They are now wrapped into a Brick (the well-named "ButtonsBrick") & use brick actions.
If you defined custom actions for a CremeEntity class, the code to register your actions have to be modified in order it keeps working :
Old code :
$(document).on('hatmenubar-setup-actions', '.ui-creme-hatmenubar', function(e, actions) {...}
New code :
$(document).on('brick-setup-actions', '.creme_core-buttons-brick', function(e, brick, actions) {...}
# The way the values are stored in 'creme_core.models.SettingValue' has changed.
The field "value_str" (TextField) has been replaced by "json_value" (JSONField).
- Now when you store an empty string, you retrieve an empty string, not <None>.
- If you have defined your own 'SettingKey', you have to write migration for the related 'SettingValue'
(because in migration mode, 'apps' are not initialized as usual, so the core cannot know your 'SettingKey').
You should just copy "creme/activities/migrations/0027_v2_6__settingvalue_json.py" and modify :
- The function 'fill_json()' to use your own 'SettingKeys'.
- The dependency <('activities', '0026_v2_6__fix_status_uuids')>.
# In 'creme_core.core' :
- In 'entity_filter' :
- The constants 'EF_USER' & 'EF_CREDENTIALS' are now strings.
- The class 'condition_handler.PropertyConditionHandler' takes now the UUID
of the related 'CremePropertyType' instance instead of its ID (see 'creme_core.models' section) ;
the related field 'EntityFilterCondition.name' stores now the UUID of the CremePropertyType instance.
The attribute "_ptype_id" has been replaced by "_ptype_uuid".
- The class 'paginator.FlowPaginator' does not accept ForeignKeys as key anymore;
pass the corresponding "low-level" attribute (e.g. "user_id") or a sub-field (e.g. "user__username").
- In the class 'reminder.Reminder' :
- These methods have been removed : get_emails(), generate_email_subject(), generate_email_body(), send_mails().
- You have now to implement the methods 'get_users()' & 'get_notification_content()'.
- In the method 'execute()' the argument "job" has been removed.
- In the method 'search.Searcher.search()', the argument "research" has been renamed "searched".
# In 'creme_core.models' :
- The model 'CremePropertyType' uses now a classical AutoField (i.e. integers) for primary key, and gets an UUIDField.
A CharField "app_label" has been added too (the app label was given is the previous string primary key).
The parameters of the method 'CremePropertyTypeManager.smart_update_or_create()' have changed ;
"str_pk" & "generate_pk" have been replaced bu "uuid". Notice that this method is now mainly useful to set the ContentType constraints
(because you can pass model, not only ContentType instances) ; use 'CremePropertyType.objects.create()' or
'CremePropertyType.objects.update_or_create()' in the other cases.
- In 'bricks' :
- The model 'CustomBrickConfigItem' uses now a classical AutoField (i.e. integers) for primary key,
and gets an UUIDField. In your "populate.py" scripts, you should probably set the "uuid" with a
hard-coded value (but you can just let the code generate a value).
- The properties 'brick_id' of the models 'CustomBrickConfigItem'/'InstanceBrickConfigItem'/'RelationBrickItem'
return different values (the prefixes contained in the attributes '_brick_id_prefix' have changed).
Idem with 'InstanceBrickConfigItem.generate_base_id()'.
- "rtype_brick" => "rtype"
- "instanceblock" => "instance"
- "customblock" => "custom"
The methods 'id_from_brick_id()' have been removed.
- The method 'SpecificRelationsBrick.generate_id()' has been removed (it was unused/useless since Creme 2.4).
- The field 'HeaderFilter.json_cells' is now a 'JSONField';
you won't have to change your code if you use the property 'cells' as advised.
- The field 'EntityFilter.filter_type' is now a CharField (see changes about the constants 'EF_*').
- In 'EntityFilterCondition' :
- The field 'name' contains now the UUID of 'CremePropertyType' & 'CustomField' when it's relevant.
- The field 'raw_value' has been renamed "value" & is now a 'JSONField';
it'll only affect direct access to the field (e.g. QuerySet), because the property (getter/setter) "value" has just been replaced.
The JSON data should always be a dictionary, so the data changed for conditions on CremeProperties
(example: 'true' became '{"has":true}' ; see 'creme_core.core.entity_filter.condition_handler.PropertyConditionHandler').
- In conditions related to 'Relation', the format of the stored JSOn has changed :
- The related 'ContentType' is now stored with the key "ct" (instead of "ct_id"), and the value is the natural-key (instead of the ID).
- The related 'CremeEntity' is now stored with the key "entity" (instead of "entity_id") and the value is the UUID (instead of the ID).
- The method 'FieldsConfig._get_hidden_field_names()' has been replaced by the property "hidden_field_names".
- The class attribute 'HistoryLine.ENABLED' has been removed, so reading it is broken
(you can still set it because it is checked dynamically, but is is deprecated -- see the deprecation section).
- The model 'reminder.DateReminder' has been removed.
# In 'creme_core.forms' :
- In 'entity_filter.fields' :
- The attribute 'CustomFieldsConditionsField._non_hiddable_cfield_ids' has been replaced by "_non_hiddable_cfield_uuids".
- The attribute 'PropertiesConditionsField._non_disabled_ptype_ids' has been replaced by "_non_disabled_ptype_uuids".
- In 'merge', the CSS classes related to 'EntitiesHeaderWidget' & 'MergeWidget' has been renamed
(the templates & 'creme_core/js/merge.js' have been reworked of course) :
- "merge_entity_field" => "merge-field".
- "li_merge_entity_header*" => "merge-field-header-*".
- "li_merge_result_header" => "merge-field-header-result".
- "li_merge_entity*" => "merge-field-*".
- "li_merge_result" => "merge-field-result".
- "li_merge_button" => "merge-field-button".
# In 'creme_core.gui' :
- The attribute 'listview.state.ListViewState.extra_q' has been removed.
- The method 'mass_import.FormRegistry.register()' now raises an exception when a model is registered twice.
# The behaviour of the method 'creme_core.utils.meta.FieldInfo.value_from()' has changed with "low-level" attributes
related to ForeignKeys; now it return the low-level value (e.g. integer, string...), not the related model instance anymore.
Example: 'FieldInfo(Contact, 'user_id').value_from(my_contact)' returns an integer, not a CremeUser instance.
'FieldInfo(Contact, 'user').value_from(my_contact)' still returns a CremeUser instance.
# In 'creme_core.views' :
- In 'bricks' :
- The attribute 'BricksReloading.check_bricks_permission' has been removed (in child classes too).
- The default value attribute 'BrickStateSetting.brick_id_arg' changed from "id" to "brick_id".
So you'll have to fix your JavaScript code if you use the URL named "creme_core__set_brick_state".
- In 'creme_property', the brick IDs have been simplified.
The method 'TaggedEntitiesBrick.parse_brick_id()' has been reworked in consequence.
- In 'search' :
- The global variable 'MIN_RESEARCH_LENGTH' has been renamed 'MIN_SEARCH_LENGTH'.
- In the class 'FoundEntitiesBrick' :
- The value of the attribute "id" have been simplified.
The method 'parse_brick_id()' has been reworked in consequence.
- The constructor argument and attribute 'research' have been rename 'searched'.
- In the class-view 'Search', teh context variable "research" has been renamed "searched".
The related template "creme_core/search_results.html" has been reworked of course.
# In 'creme_core.tests' :
- The method 'base._CremeTestCase.get_propertytype_or_fail()' now takes an UUID string instead of an integer.
- In the method 'base._CremeTestCase.get_relationtype_or_fail()',
the arguments "sub_props" & "obj_props" are now iterable of <CremePropertyTypes or strings> (instead of integers).
- The method 'views.base.ButtonTestCaseMixin.iter_instance_button_nodes()' has been renamed 'iter_button_nodes()'
(because of the new method 'get_global_buttons_node()').
# The template "creme_core/templates/creme_core/view_property_type.html" is now "creme_core/templates/creme_core/detail/property-type.html".
# These obsolete JavaScript tools have been removed (because all browsers are supporting flexbox, table layout and ResizeObserver) :
- creme.widget.Container
- creme.layout.LayoutResizeSensor
# Some icons which were unused (& not in the 2 themes) were moved in "creme/media/warehouse/" : pin.svg, print.svg, buyer.svg, training.svg...
They are not collected by the asset manager anymore, but you can copy them in your project to use them.
# Apps :
* Creme_config :
- In 'registry._ConfigRegistry' :
- The way the bricks of portal & app portals are managed have changed.
BEWARE: when you register a brick with 'register_portal_bricks()'/'register_app_bricks()' (in your 'apps.py'),
the brick class must not be registered in the global brick registry anymore.
- The way the bricks of "My settings" are managed have changed :
- BEWARE: when you register a brick with 'register_user_bricks()' (in your 'apps.py'),
the brick class must not be registered in the global brick registry anymore.
- The property 'user_bricks' has been replaced by 'get_user_bricks()'.
- In 'urls' :
- The view named 'creme_config__create_detailviews_bricks' has been renamed 'creme_config__create_detailview_bricks'.
- The view named 'creme_config__delete_home_brick' has been renamed 'creme_config__delete_home_bricks'.
- In 'forms' :
- The class 'bricks._CustomBrickConfigItemBaseForm' has been removed.
- In 'creme_property_type', these classes have been removed :
- _CremePropertyTypeBaseForm
- CremePropertyTypeCreationForm
- CremePropertyTypeEditionForm
- The global dictionary 'forms.setting._FIELDS' has been removed;
see the new class attribute 'creme_core.core.setting_key._SettingKey.FORM_FIELDS' instead.
- The class-view 'views.user_settings.UserSettings' does not inject "apps_usersettings_bricks" in the context anymore.
- The template 'user_settings.html' has been renamed 'user-settings.html' to be more consistent.
* Persons :
- The UUIDs of the instances of the models 'Civility', 'Position', 'Sector', 'LegalForm' & 'StaffSize'
created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the 5 types provided by default, and stores the old UUIDs in their field "meta_data".
- In the method 'models.Address.info_field_names()' (used by several form generators for Address),
the excluded fields are just not-viewable fields (it was a hard coded list before).
- The hat-card bricks have been reworked to facilitate the modification of small summaries (activities, acts, opportunities).
A base class 'CardSummary' has been introduced. The classes 'ContactCardHatBrick' & 'OrganisationCardHatBrick' get
new attributes "intro_summary" & "summaries"; so its easier to change summaries from external code (the dependencies of the bricks
are automatically computed, summaries indicate which template to use etc...).
- The class 'Activities4Card' has been replaced by 'LastActivityIntroSummary' & 'NextActivitySummary'.
- The class 'Opportunities4Card' has been replaced by 'OpportunitiesSummary'.
- The class 'CommercialActs4Card' has been replaced by 'CommercialActsSummary'.
The related templates have changed :
- "persons/bricks/*-hat-card.html"
- "persons/bricks/frags/card-*.html"
- In the class 'buttons.CrmButton' (& in the child classes), the attribute 'relation_type_id' has been removed
(the new attribute 'Button.relation_type_deps' is used instead).
* Activities :
- The models 'ActivityType' & 'ActivitySubType' use now regular 'AutoField' (i.e. integer) for primary key,
& get an 'UUIDField' (they used custom 'CharField' as primary key).
The constant strings which allow to retrieve types by their ID have been replaced by constants UUID:
e.g. use 'UUID_TYPE_MEETING' instead of 'ACTIVITYTYPE_MEETING'.
Hint: see the files "migrations/002?_v2_6__types_uuid0?.py" to understand how to write your own migrations if you reference these types in your own models.
- The UUIDs of the instances of 'models.Status' created by the 'populate' script are now fixed (to be consistent between Creme instances).
- The constants 'STATUS_*' have been removed; you should use the new constants 'UUID_STATUS_*' instead.
- A data migration fixes the UUIDs of the 5 Statuses provided by default, and stores the old UUIDs in their field "meta_data".
- The method 'forms.fields.ParticipatingUsersField.clean()' now returns a dictionary containing the concerned Contacts & Calendars ;
the forms manipulating participants have slightly changed their internal behaviour, beware if you inherit them.
- The brick 'bricks.UserCalendarsBrick' does not inject "has_app_perm" in its context anymore.
- The class 'buttons.AddRelatedActivityButton' has been reworked to use 'ActivityType.uuid';
e.g. the class attribute "activity_type" has been replaced by "activity_type_uuid".
- In 'views' :
- In 'activity', the class-view 'ActivityCreation' has been reworked to use 'ActivityType.uuid';
e.g. the method 'get_type_id()' has been replaced by 'get_type_uuid()'.
Notice that the GET argument to fix the type must be a UUID now (if you use these URLS in your template for example).
- In 'calendar', the function '_js_timestamp_to_datetime' has been removed and replaced by 'fromRFC3339()' & 'toRFC3339()'.
- The class 'statistics.AveragePerMonthStatistics' has been reworked to use 'ActivityType.uuid';
e.g. in the class attribute 'items', the keys "type_id" have been replaced by "type_uuid".
- The upgrade of 'FullCalendar' caused some changes :
- 'creme.activities.CalendarController' has been renamed as 'creme.ActivityCalendar'.
- The Calendar view changes are now stored in URL hashes (e.g: #week & #month).
- We use ISO8601 format WITH timezone for queries on backend views (e.g. "2023-04-14T10:38:30+01:00").
* Assistants :
- The module 'creme_jobs' has been removed (_UserMessagesSendType etc...).
- In the model 'UserMessage', the field 'email_sent' & the method 'send_mails()' have been removed.
- In 'reminders', the attributes 'ReminderAlert.body' & 'ReminderTodo.body' have been removed.
- The UUIDs of the instances of 'models.UserMessagePriority' created by the 'populate' script are now fixed (to be consistent between Creme instances).
- The constants 'PRIO_*' & 'USERMESSAGE_PRIORITIES' have been removed; you should use the new constants 'UUID_PRIORITY_*' instead.
- A data migration fixes the UUIDs of the 3 Priorities provided by default, and stores the old UUIDs in their field "meta_data".
* Documents :
- In the context of the brick 'ChildFoldersBrick', "folder_model" is not injected anymore.
* Products :
- The UUIDs of the instances of the models 'Category' & 'SubCategory' created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the instances provided by default, and stores the old UUIDs in their field "meta_data".
* Billing :
- In 'constants' :
- 'DEFAULT_DRAFT_INVOICE_STATUS' has been removed (use 'InvoiceStatus.is_default' instead).
- 'DEFAULT_INVOICE_STATUS' has been removed (use 'InvoiceStatus.is_validated' instead).
- In 'views.base', in the class-views 'BaseCreation' & 'RelatedBaseCreation' (& so, in their child classes),
the attribute 'initial_status' has been removed.
- The method 'populate.Populator.create_reports()' has been replaced by a new one, '_populate_reports()'.
- The UUIDs of the instances of the models '*Status', 'PaymentTerms', 'SettlementTerms' & 'AdditionalInformation'
created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the instances provided by default, and stores the old UUIDs in their field "meta_data".
- The default value for the field 'models.Line.vat_value' is now dynamic & use the 'Vat' instance with <is_default=True> ;
so it will break your code which relied on an implicit "0.0" value (mainly your unit tests).
* Opportunities :
- The UUIDs of the instances of the models 'SalesPhase' & 'Origin' created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the instances provided by default, and stores the old UUIDs in their field "meta_data".
- The class 'bricks.OpportunityCardHatBrick' (& the related template) has been reworked to follow the changes in app "persons".
A new class 'ContactsSummary' has been introduced, and the class variable "displayed_contacts_number" has been move into it.
- The method 'populate.Populator.create_report_n_graphes()' has been replaced by a new one, '_populate_report_n_graphes()'.
* Emails :
- In the class 'buttons.EntityEmailLinkButton', the attribute 'rtype_ids' has been removed ('relation_type_deps' is used instead).
- The constructor of 'models.mail.EntityEmailSender' now takes only one argument (the 'EntityEmail' instance) ;
the class stored in the class attribute 'AbstractEntityEmail.email_sender_cls' uses this new signature.
- In 'utils' :
- The constructor of 'EMailSender' takes now an argument "domain".
- In the class 'SignatureRenderer', the sub-class 'Image' has been removed ;
the class 'SignatureImage' is used instead.
* Commercial :
- The value 'constants.PROP_IS_A_SALESMAN' has been replaced by 'UUID_PROP_IS_A_SALESMAN'.
- The UUIDs of the instances of 'models.ActType' created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the instances provided by default, and stores the old UUIDs in their field "meta_data".
* Sketch :
- In LineChartBrick & BarChartBrick : abscissa_title & ordinate_title default values are now '' instead of None.
* Tickets :
- The UUIDs of the instances of models 'Status', 'Priority' & 'Criticity' created by the 'populate' script are now fixed (to be consistent between Creme instances).
- In 'models.status', the constants '*_PK' & 'BASE_STATUS' have been removed.
- A data migration fixes the UUIDs of the instances provided by default, and stores the old UUIDs in their field "meta_data".
* Mobile :
- In the function-views 'persons_portal()' & 'search_person()', "contact_model" & "orga_model" are not injected in the template context anymore.
- The CSS classes referencing 'ActivityType' IDs have been renamed;
e.g. "activity-type-activities-activitytype_meeting" became "activity-type-meeting".
* Events :
- The UUIDs of the instances of 'models.EventType' created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the 4 types provided by default, and stores the old UUIDs in their field "meta_data".
* Projects :
- The UUIDs of the instances of 'models.ProjectStatus' & 'models.TaskStatus' created by the 'populate' script are now fixed (to be consistent between Creme instances).
- The constants '*_PK' & 'TASK_STATUS' (and the class 'TaskStatusDesc') have been removed.
- A data migration fixes the UUIDs of the Statuses provided by default, and stores the old UUIDs in their field "meta_data".
- The button "Close project" uses the new system for mandatory buttons;
so the template "projects/templates/projects/view_project.html" has been reworked.
* Polls :
- The UUIDs of the instances of 'models.PollType' created by the 'populate' script are now fixed (to be consistent between Creme instances).
A data migration fixes the UUIDs of the 3 types provided by default, and stores the old UUIDs in their field "meta_data".
* Crudity :
- The method 'bricks.CrudityHistoryBrick.generate_id()' has been removed.
* CTI :
- In the class-view 'views.PhoneCallCreation', some the attributes & methods have been replaced
in order to use UUIDs instead of integer IDs for statuses & types.
* SMS :
- The class 'bricks._RelatedEntitesBrick' has been renamed '_RelatedEntitiesBrick'.
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# In 'creme_core.core.entity_filter' :
- The method '_EntityFilterSuperRegistry.unregister()' raises a new class of exception ('UnRegistrationError').
- In 'condition_handler' :
- The attribute 'BaseCustomFieldConditionHandler._custom_field_id', has been replaced by '_custom_field_uuid'.
- In the class 'RelationConditionHandler', these attributes have been replaced :
- _entity_id => _entity_uuid
- _ct_id => _ct_key
# In 'creme_core.forms.entity_filter.fields', in the classes '_ConditionsField' & 'SubfiltersConditionsField' :
- The constructor parameter 'efilter_type' has been removed (the type is the registry's ID).
- The attribute 'efilter_type' is now read only.
# In 'creme_core.models' :
- In the values of 'ButtonMenuItem.button_id', the prefix "button_" has been removed
(see 'creme.creme_core.gui.button_menu.Button.generate_id()').
- In the method 'EntityFilter.can_edit()', the type of filter is not checked anymore (it is checked by the views).
- In the model 'FieldsConfig' :
- The attributes "_excluded_fnames" & "_required_fnames" have been removed.
- The method 'update_form_fields()' now takes a form instance, and can set the _meta attribute (backported to 2.5.6/2.4.13).
- The method 'creme_core.models.history._HLTAuxCreation._model_info()' has been removed.
# In 'creme_core.gui' :
- The method 'bricks._BrickRegistry.get_bricks()' :
- does not build 'SpecificRelationsBrick' & 'CustomBrick' when no entity is given.
- does not build 'CustomBrick' when the entity's type does not match.
- The class 'bulk_update.FieldNotAllowed' has been removed.
# In 'creme_core.views' :
- In the context created by the class-view 'search.Search',
"models" is now a list of CremeEntity classes (use "verbose_names" instead).
- In the view-mixin 'entity_filter.EntityFilterMixin', the attribute 'efilter_registry' has been replaced by 'efilter_type'.
# In the templatetag "{% search_form %}" (from library "creme_search")
- The argument "user" has been removed.
- A mandatory argument "models" has been added.
# Apps :
* Creme_config :
- The value of class attribute "id" of several Brick classes (for bricks configuration) have changed (mainly "block" => "brick").
- In the class 'registry._ConfigRegistry' :
- The attribute '_user_brick_ids' has been replaced by '_user_brick_classes'.
- The attribute '_portal_brick_ids' has been replaced by '_portal_brick_classes'.
- In the class 'registry._AppConfigRegistry' :
- The attribute '_brick_ids' has been replaced by '_brick_classes'.
- The method '_register_bricks' now takes Brick classes.
- The view 'views.portal.Portal' injects "bricks" (in the context) instead "app_bricks".
* Assistants :
- The function 'signals._refresh_alert_reminder_job()' has been renamed.
* Billing :
- In JavaScript, the actions "billing-hatmenubar-invoice-number" & "billing-hatmenubar-add-document" have been removed.
* Report :
- The module 'core.graph.lv_url' is not imported in the parent module anymore.
* Mobile :
- The templatetag "mobile_activity_card" does not inject "STATUS_IN_PROGRESS" in the context anymore.
* Projects :
- In JavaScript, the action "projects-hatmenubar-close" has been removed.
== Version 2.5 ==
UPGRADE NOTE :
- You should create a all new virtual environment based on Python 3.8+ .
Users side :
------------
# The version of Django has been upgraded to "4.2".
# A visitor mode has been added; from any list-view, you can visit all the related detail-views the one after the other.
(button "Enter the exploration mode" in list-views).
# The link in the list-views selectors are now opened in other tabs automatically.
# In forms :
- The custom fields with ENUM/MULTI_ENUM type are now using the Select2 combobox with lazy loading & search.
- In the form for entity-filters :
- The regular fields corresponding to foreign keys ('Sector', 'Status', ...) are now using the Select2 combobox with lazy loading & search.
- The regular fields with static choices (like 'Discount' in billing lines) are now using combobox instead of a text input.
# Apps :
* Creme_config :
- Each CustomForm can now be reset (to set the fields it would have have after a fresh installation).
- In the Users' configuration page :
- The displayed name of Users can now be customised (per user);
each used can change its own displayed name by default (& you can disable this feature).
- When creating a new user, usernames which differ only in case are rejected.
- Displayed Users can be filtered (by user-name, first name, last name & new field displayed-name).
- Enumerable custom fields are using the Select2 widget in forms.
* Persons :
- The UI forbids to clone managed Organisations.
* Activities :
- A color field has been added to Status.
* Billing :
- The Product/Service lines can be reordered by drag'n drop.
- The mass-import can now import entities with their totals (a Product line is created).
- A color field has been added to Statuses.
* Emails :
- The SMTP server used to send campaign is now configured through the GUI;
indeed you can configure several ones.
These variables are not used anymore (excepted during the migrations from Creme 2.4):
- EMAILCAMPAIGN_HOST
- EMAILCAMPAIGN_HOST_USER
- EMAILCAMPAIGN_PASSWORD
- EMAILCAMPAIGN_PORT
- EMAILCAMPAIGN_USE_TLS
- The blocks for signatures (in "My settings") displays now a preview.
* Opportunities :
- A color field has been added to SalesPhase.
* Reports :
- The horizontal stacked bar chart (creme.D3TubeChart) has been improved :
- The horizontal scrolling of legend is enabled when the list is wider than the canvas.
- The text wrapping for legend text has been added.
- The bar's text is visible only on mouse hover if it is too small.
* Sketch :
- In the bar char (creme.D3BarChart), the horizontal scrolling is enabled when the bars are wider than the canvas.
- In the donut chat (creme.D3DonutChart) :
- The vertical scrolling of legend is enabled when the list is taller than the canvas.
- The slice text is visible only on mouse hover if it is too small.
* Tickets :
- A color field has been added to Status.
Developers side :
-----------------
- The version of 'Django' is now "4.2".
You should probably read the following releases notes for Django versions :
- https://docs.djangoproject.com/en/4.2/releases/4.0/
Some important items :
- The 'settings.py' value 'USE_L10N' is now deprecated.
- The 'settings.py' value ALLOWED_HOSTS must be a list.
- In classes inheriting 'django.template.Node', the method 'render()' must return a string.
- https://docs.djangoproject.com/en/4.2/releases/4.1/
Some important items :
- The method 'assertFormError()' should now take a form instance.
- The logout view should be used with a POST request.
- A reverse FK now raises ValueError when calling related managers for unsaved objects.
- https://docs.djangoproject.com/en/4.2/releases/4.2/
Some important items :
- Attributes 'index_together' of your Meta classes should be replaces by 'indexes'.
- Beware to the argument 'update_fields' in your custom methods 'save()' for models.
- New versions of libraries :
- bleach 5.0 -> 6.0
- Pillow 9.2+ -> 9.4+
- redis: 4.1 -> 4.5
- flake8: 5.0 -> 6.0
- polib: 1.1 -> 1.2
Non breaking changes :
----------------------
# A new context processor 'creme.creme_core.context_processors.get_base_template' injects now
the new settings.py variable 'BASE_HTML' (default value: "creme_core/base.html").
All pages which extended "creme_core/base.html" have been updated to use this variable.
So you can now customise the base structure of the pages, because your our own base template can extend "creme_core/base.html"
(i.e. you do not have to override it with a copy-pasted version anymore).
# In order to allow the resetting of CustomForms, the good way to describe the fresh configuration is to use the new
class 'creme.creme_core.gui.custom_form.CustomFormDefault' & stop describing the fields in the "populate" scripts
(so the fields are listed only once, & forms built by "populate" scripts & the resetting view will be the same).
So, IF YOU DEFINED CUSTOMFORMS for your own models, you SHOULD :
- create classes inheriting 'CustomFormDefault', and use them when creating your descriptors (argument "default").
- in your 'Populator', remove the argument "groups_desc" of 'CustomFormConfigItem.objects.create_if_needed()'.
The section "CustomForms" of the tutorials has been updated (& you can see how vanilla apps are made of course).
# Deprecations :
- In 'creme_core.core' :
- In the class 'entity_cell.EntityCell' (& child classes), the methods
'render_html()' & 'render_csv()' are deprecated; use 'render()' instead.
- In the class 'function_field.FunctionFieldResult' (& child classes), the methods
'for_html()' & 'for_csv()' are deprecated; use 'render()' instead.
- In 'creme_core.forms' :
- The method 'base.HookableFormMixin.as_span()' is deprecated; use 'as_div()'/'as_ul()'/... instead.
- The classes 'fields.CremeUserChoiceField' & 'fields.CremeUserChoiceIterator' are deprecated;
use 'CremeUserEnumerableField' instead.
- In the class 'creme_core.gui.field_printers._FieldPrintersRegistry' :
- The method 'register()' is deprecated; use the method 'register_model_field_type()' instead.