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.