== Version 2.6.20 ==
Developers side :
-----------------
Non breaking changes :
----------------------
# An issue with global search for extended apps has been fixed (extended apps were ignored).
== Version 2.6.19 ==
Users side :
------------
# An issue with custom-brick reloading: the brick was not reloaded when
a related instance is edited (e.g. if you get an Address field in a
custom-brick & edit the Address).
# Fix drag-n-drop reordering in paginated table bricks : the indices of were
form 0 to pagesize, ignoring the current page start index... and the items always move
to the first page.
# Apps :
* Billing :
- In the view to create a true Product/Service from a line, the form-field
"category" was not required; selecting nothing caused a crash.
- Fix drag-n-drop reordering in billing : moving a line at the first position didn't work
every time.
Developers side :
------------
# An exception in 'CreatorEnumerableChoiceField' has been fixed (when the ForeignKey model
is declared as a string). The code 'fk.related_field.model' should return a 'Model' but in
some cases it is not resolved and return a string.
== Version 2.6.18 ==
Users side :
------------
# Several issues in the Job scheduler had been fixed:
- Disabling then re-activating a Job was not possible;
you were obliged to restart the scheduler.
- Modifying a Job's configuration during it's execution did not work correctly
(new configuration could be lost).
Developers side :
-----------------
Non breaking changes :
----------------------
# The history rendering has been improved code to manage ContentTypes badly removed.
== Version 2.6.17 ==
Users side :
------------
# The style for notification panel with lots of notifications has been improved.
# Apps :
* Recurrents :
- A crash when you tried to add a filter has been fixed.
- The Quick-search on the field 'ct' ("Type of the recurrent resource") has been fixed.
Developers side :
-----------------
Non breaking changes :
----------------------
# The job which sends notification emails has been improved to remove line breaks in subject.
Line breaks were avoiding the mails to be sent.
== Version 2.6.16 ==
Users side :
------------
# Apps :
* Creme_config :
- In configuration for CustomForms, the removing of a fields was broken
when there is a special group (like "Addresses").
* Reports :
- A user needs the permission to export a model in order to export a Report now.
Developers side :
-----------------
Non breaking changes :
----------------------
# An issue with 'creme_core.forms.enumerable.EnumerableSelectMultiple' has been fixed;
in the context, the selected value was handled as a string instead of a list.
== Version 2.6.15 ==
UPGRADE NOTES :
- Do not forget to tun the command "generatemedia".
Developers side :
-----------------
Non breaking changes :
----------------------
# Apps :
* Creme_config :
- The CSS for 'brick.GenericModelBrick' has been improved when the related model has many fields.
== Version 2.6.14 ==
Users side :
------------
# You can now see the detail-view of a public EntityFilter which belongs to another user.
It fixes some issues for Reports with filters too.
Developers side :
-----------------
Non breaking changes :
----------------------
# The rendering of HistoryLine is now more robust with 'ContentTypes' which have been removed.
# Apps :
* Reports :
- The class-view 'views.graph.GraphFetchSettingsForInstance' is now deprecated.
Its uses have been removed.
== Version 2.6.13 ==
Users side :
------------
# In merge view, the left & right value could not be applied with the image selector.
Developers side :
-----------------
Non breaking changes :
----------------------
# TinyMCE did not work in popups: the textarea was not synced on submit.
== Version 2.6.12 ==
Users side :
------------
# The migration from Creme 2.5 managed badly the classical "hat" bricks (Blocks) if
you edited/created some configurations of bricks.
UPGRADE NOTE: run the command "migrate" to fix the issue, even if you have
already migrated (a new migration "0156_v2_6_12__fix_hatbricks.py" should be performed).
# The code has been fixed to accept a settings 'LOGIN_URL' as an URL (it may be necessary to use a SSO).
# The style of edition buttons in tile brick was wrong when the action is disabled.
# Apps:
* Billing :
- No HeaderFilter for 'TemplateBase' was populated (only useful if you use recurrent documents).
Developers side :
-----------------
Non breaking changes :
----------------------
# The method 'creme_core.models.Notification.objects.send()' can set teh attribute 'extra_data' now.
# No quick-search widget is displayed for not enumerable FK/M2M without specific field registered.
# Fields which are stored in configuration then tagged as not viewable are now better
managed by HeaderFilters & EntityFilters.
# Many methods have been marked with 'alters_data = True'.
== Version 2.6.11 ==
Users side :
------------
# The lib 'reportlab' has been pinned to "4.3.X" to work with Python 3.8; sorry.
# The migrations of HistoryLines related to properties (and activity types)
with PostgreSQL were not working correctly (some lines could be ignored).
# A warning is now displayed if the settings 'SITE_DOMAIN' is not correctly defined
(this feature has been backported from Creme 2.7).
# Filtering with the field 'role' of a user was broken.
# The position of the notification count indicator was wrong when exploration mode is active.
# The migrations from Creme 2.5 were crashing if a filter references a Property Type
which has been removed. The invalid conditions are now deleted, & you should
fix/remove the concerned filter.
# Apps:
* Activities :
- Fix a regression in calendar CSS : the filtered events or calendars were not hidden.
* Billing :
- The definitive deletion has been fixed: it did not work with lines
related to Product/Service instances.
* Assistants:
- The dynamic trigger dates of Alerts were not always updated during an entities merging.
- The URLs to entities in the HTML body of notification emails are now absolute.
* Emails:
- The URLs to entities in the HTML body of notification emails
(when a campaign has been sent) are now absolute.
Developers side :
-----------------
Non breaking changes :
----------------------
# The EmptyEnumerator fallback now either raises an exception (ENUMERABLE_REGISTRATION_ERROR=True) or logs an error.
This change is done to prevent issues with empty select when an enumerator is not correctly configured.
# The form-field 'creme_core.forms.fields.GenericEntityField' has been improved:
a ContentType instance is accepted as initial value.
# A crash in 'creme_core.models.notification.NotificationChannelConfigItemManager.bulk_get()' has been fixed.
# The function 'creme_core.utils.dates.date_to_ISO8601()' was not working correctly on Windows.
# Fix an issue when an event 'end' is null during drag-n-drop (allday events).
# Fix calendar eventTimeFormat & slotLabelFormat issues : 24h rendered as 12h, wrong datetime or date ranges.
# Fix creme.utils.ajaxQuery unexpected error when the query returns a 'Connection Error' without data
Breaking changes :
------------------
# The queryset given to 'creme_core.core.paginator.FlowPaginator' must be ordered
(a ValueError is raised if not).
== Version 2.6.10 ==
Users side :
------------
# A crash in the job scheduler (command "creme_job_manager") has been fixed.
# Apps :
* Emails :
- The help text for signatures' images has been improved.
Developers side :
-----------------
Non breaking changes :
----------------------
# The method 'creme_core.utils.CremeDiscoverRunner.setup_databases()' has been updated to prevent running
the 'creme_populate' command on the default test database when the test suite is launched in
parallel mode. This change is done to prevent cache leaking when the test processes are forked.
This is a backport from Creme '2.7'.
# The class 'EnumerableModelChoiceField' now handles correctly callable objects for model-field default value.
== Version 2.6.9 ==
Users side :
------------
# An loading issue (with the lib 'cryptography'), which caused crash at
start-up in some environments, has been fixed.
# The 'populate' scripts could failed on menu configuration in some cases.
# There was issue when a FileRef is creating when a CremeModel is deleted:
the path could be too long to be stored by the FileRef, which caused an error.
== Version 2.6.8 ==
Users side :
------------
# The render of history lines on TextFields (like "description") with line breaks has been improved.
# Apps :
* Opportunities :
- Unsetting the current Quote was not possible if you did not create the relationship yourself.
Developers side :
-----------------
Non breaking changes :
----------------------
# The creation forms for HeaderFilter & EntityFilter now accept models with digits at the end of their name.
# Fix conversion issues in creme.widgets.CheckListSelect when json datatype is enabled.
# Apps :
* Billing :
- The Relation cache is now used in 'Line.related_document'.
- In 'models.Base._DELETABLE_INTERNAL_RTYPE_IDS', the RelationType ID 'REL_OBJ_LINE_RELATED_ITEM' has been removed.
- The handler 'signals.manage_line_deletion()' now avoid to re-compte the totals when its the whole entity (e.g. Invoice) which is being deleted.
It's faster & it avoids some inconsistent states where the entity has no emitter/receiver in its 'save() too.
== Version 2.6.7 ==
Users side :
------------
# A content visibility issue on popover opening has been fixed.
# Apps :
* Creme_config :
- When you emptied your bricks configuration for "My page" (default or owned)
with the form, the configuration displayed a ugly "BLOCK" line.
* Persons :
- A crash in the view to create a user from a Contact has been fixed.
It happened when the email of the Contact was used by an existing user.
* Activities :
- An issue in calendar configuration, when the end of the day is before the start, has been fixed.
Developers side :
-----------------
Non breaking changes :
----------------------
# The display of 'creme_core.forms.base.CremeEntityForm.forced_relations_info'
was too much escaped with several relationships.
# The base form-field 'creme_core.forms.fields.UnionField' did not raise an error
when a required instance was cleaned with empty sub-data & non required sub-fields.
== Version 2.6.6 ==
Users side :
------------
# Apps :
* Persons :
- In the hat card for Organisations, the field "Legal form" is now inner-edited with the name.
The field was displayed, but was not editable directly.
* Billing :
- The bricks for related Quotes/SalesOrders/CreditNotes have been improved: better empty expiration date.
It's now more consistent with the Invoices' brick.
* Opportunities :
- The title of the brick which displays related Opportunities for Contact/Organisation has been improved.
Developers side :
-----------------
Breaking changes :
------------------
- The Job registry now raises an exception when the class attribute "id" is too long
(& so cannot be stored in the field "Job.type_id").
== Version 2.6.5 ==
Users side :
------------
# Apps :
* Creme_config :
# The new property types were not marked as custom since the release '2.6'.
Notice that the fix will only works for new types, it won't fix the types
you have created the mast months ; if you want to fix them, change the value
of the column 'creme_core_cremepropertytype.is_custom' to "True"/"1" in your DB.
* Emails :
- The email form uses HTML line breaks when the HTML body is copied
from the plain text body.
Developers side :
-----------------
Non breaking changes :
----------------------
# The custom field brick displayed inner-edition buttons even when it was disabled.
# The templatetag {% widget_icon instance=... %} did not use "label" argument.
== Version 2.6.4 ==
Users side :
------------
# The render of custom menu icons has been fixed for non-square images.
# In mass-import form, the selector for properties was not our expected widget.
# In menu entries with custom URLs, links are now opened in a new tab.
# Some escaping issues have been fixed.
# Apps :
* Opportunities :
- In the blocks for related Invoices, Quotes & Sales Orders :
- The color of the statuses were not displayed.
- The multi-inner-edition have been added.
Developers side :
-----------------
Non breaking changes :
----------------------
# The method 'CremeUser.has_perm()' works now correctly for link permission on models.
# Javascript :
- Dialog :
- An option 'propagateEvent' has been added :
- When enabled, a copy of the event prefixed by 'dialog-' is triggered to allow the usage of external handlers
(the dialog element if opened or the window.document).
It can be used with the new id option to listen a specific popup.
e.g: $(document).on('dialog-open', '#my-popup', function() { ... });
- An option 'id' has been added to identify the dialog DOM element.
- The methods 'fitToFrameSize()' & 'resize()' has been added to the widget 'ui.dialog'.
- A method 'cremeInstance()' has been added to the widget 'ui.dialog';
it returns the 'creme.dialog.Dialog' instance.
== Version 2.6.3 ==
Users side :
------------
# Apps :
* Documents :
- The cloning of Document has been disabled.
* Commercial :
- The cloning of Strategy has been disabled.
* Emails :
- The cloning of Mailing List has been improved.
* Graphs :
- Cloning a Graph caused an error 500.
* Polls :
- The cloning of Campaigns & Replies has been disabled.
* Recurrents :
- The cloning of Generator has been disabled.
Developers side :
-----------------
Non breaking changes :
----------------------
# The tutorials have been improved (better populate scripts, talk about
MinionModel & UUIDs).
== Version 2.6.2 ==
Users side :
------------
# Several issues in the job scheduler has been fixed for periodic jobs :
- The start date of the jobs depended on the hour the command "creme_job_manager" has started.
- Some useless extra runs have been removed.
# 2 new settings have been added :
- 'BASE_HTML_EXTRA_INCLUDED' to include some templates in all pages.
- 'CELL_SIZE' to limit the size of lists (relationships, ManyToMany...)
& so avoid some performance issues.
# The style of the preview table in the header-filter form has been improved.
# Apps :
* Persons :
- In the bar-brick for Organisations the logo was never displayed.
* Documents :
- You could merge system folders & so, remove them.
* Emails :
- There were some issues when the default owner of synchronised emails is a team.
- A crash when accepting a synchronized email with attachments has been fixed.
* Reports :
- An issue with the date range visibility in the export filter popup of a report has been fixed.
* VCFs :
- In VCF import, the URL validation for the Organisation's site has been removed.
Developers side :
-----------------
Non breaking changes :
----------------------
# The class 'creme_core.creme_jobs.base.JobType' get a new attribute: configurable.
If you set it to 'False', the related job cannot be edited & the value of "enabled" cannot be changed.
# 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 :
------------------
# The new limit for "
" (render of EntityCells, field-printer or FunctionFieldResult) comes with HTML
to be slightly different :
- Empty lists "
" are replaced by an empty string.
- Lists with one element are not rendered as list anymore.
- An attribute ahs been added to the
nodes.
It could make some unit tests to fail.
== Version 2.6.1 ==
Users side :
------------
# The confirmation message for definitive deletion in hat-bar brick has been fixed.
# Apps :
* Billing :
- A packaging issue with the optional exporter "WeasyPrint" has been fixed.
- The layout of the TemplateBase detail-views has been fixed.
- The inner-edition of TemplateBase instances bas been fixed.
Developers side :
-----------------
Non breaking changes :
----------------------
# A crash when a function is used for default value of an enumerable FK has been fixed.
# The confirmation message for the brick action 'delete' can now be customised.
== 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
(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.gui' :
- 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.
- The function 'creme_core.utils.create_if_needed()' is deprecated ;
use 'MyModel.objects.get_or_create()' instead.
- The constant 'creme_core.core.entity_filter.EF_USER' is deprecated ; use 'EF_REGULAR' 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'.
- The function 'creme_core.utils.bool_from_str()' is deprecated.
- 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 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").
- In Javascript, 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.
* Emails :
- The function 'utils.get_mime_image()' is deprecated; use 'utils.SignatureImage' instead.
- The constructor of 'utils.SignatureRenderer' takes now an argument "domain" ;
not filling 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.
# 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 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.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 the '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.
- 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.
- In Javascript :
* 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)
# 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 .
- 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' :
- In the abstract class 'MinionModel' the field "is_custom" is now marked ;
it will at least need a migration (or a manual change in the existing migrations because
it has no consequence on the DB).
- 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 (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 ;
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".
* 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.
Hint: check if you defined 'register_field_printers()' in your own files "apps.py".
(beware: the arguments are now keyword-only) :
'field_printers_registry.register_model_field_type(type=CharField, printer=my_print_function)'
- The methods 'get_html_field_value()' & 'get_csv_field_value()' are now deprecated; use 'get_field_value()' instead.
- In 'creme_core.templatetags.creme_cells', the argument "output" of '{% cell_render %} is deprecated; use "tag" instead.
- The function 'creme_core.utils.dates.make_aware_dt()' is now deprecated; use 'django.utils.timezone.make_aware()' instead.
- In templates :
- In the file "creme_core/base.html", the '{% block extrahead %}' is deprecated;
use the new '{% block head %}' with '{{block.super}}' instead.
- The file "creme_core/generics/error.html" is deprecated.
- In the 'creme_core.tests':
- In the class 'base._CremeTestCase' :
- The method 'login()' is deprecated;
use the new methods 'login_as_*()' (plus 'create_user()' & 'get_root_user()' if you need several users) instead.
- Passing no "user" argument to the method 'build_request()' is deprecated.
- Passing no "user" argument to the methods 'views.base.MassImportBaseTestCaseMixin._build_*doc() is deprecated.
- Apps :
* Creme_config :
- The class 'forms.fields.CustomEnumChoiceField is deprecated;
use 'CreatorCustomEnumerableChoiceField' instead.
* Activities :
- In 'constants', 'DEFAULT_CALENDAR_COLOR' & 'COLOR_POOL' are deprecated.
- In 'models.calendar' :
- The method 'CalendarManager.new_color()' is deprecated.
- The method 'Calendar.get_color()' is deprecated; use 'Calendar.color' instead.
# You can now register a field-printer for a specific field. Example (in your "apps.py") :
def register_field_printers(self, field_printers_registry):
field_printers_registry.register_model_field(
model=Contact, field_name='last_name', printer=my_lastname_printer,
)
# In 'creme_core.forms.enumerable' :
- In the class 'EnumerableChoiceSet', the optional property 'url' allows to use any URL instead of only "creme_core__enumerable_choices".
- A class 'FieldEnumerableChoiceSet' has been added;
it inherits 'EnumerableChoiceSet' (which is now a base class) and has all its previous features (see the section ).
- A new widget class 'EnumerableSelectMultiple' has been added; it supports multiple selection.
# In the class 'creme_core.forms.widgets.DynamicSelect', the constructor accepts now an argument "avoid_empty".
When it's set to 'True', the attribute "data-no-empty" is enabled on client-side.
In order to keep the current behaviour of 'DynamicSelect' within a ChainedSelect widgets definition,
add to all the instances of 'DynamicSelect' having a child dependency.
# In 'creme_core.gui.button_menu', the rendering of Button has been reworked (see the section !);
the verbose name of the button (often use for the button's label) is now always injected in the context ("{{button.verbose_name}}" to get it).
# In 'creme_core.models' :
- In 'CremeEntity' :
- A JSON field 'extra_data' has been added; it can be used by third party code to store
the data they want, without having to modify the code.
- The method 'clone()' now avoids copying 'ManyToManyFields' which are tagged as (see '_clone_m2m()').
- A database index has been added to 'HistoryLine', in order to improve general performance with large volumes.
# In 'creme_core.templatetags.creme_widgets', the templatetag '{% widget_entity_hyperlink %}' has a new optional argument "target".
# In 'creme_core.tests' :
- Several new assertions are now available: 'assertHasAttr()', 'assertHasProperty()', 'assertHasNoProperty()'.
- An dummy email backend which stores 'args' & 'kwargs' is now used.
# In Javascript:
- 'creme.form.Select2' now supports the lazy loading of selections ;
it's useful in entity filter polymorphic inputs that do not know the selected options beforehand.
- New 'RGBColor.rgb()' method to handle CSS format : 'rgb(int, int, int)'
# Apps :
* Sketch :
- A function 'creme.d3NumericDataInfo()' which creates the following stats from data has been added :
min, max, only integers, value range, average.
- The functions 'creme.d3NumericFormat()' & 'creme.d3NumericAxisFormat()' have been added to find the best format from data information.
- A render function 'creme.d3Scroll()' has been added to handle horizontal or vertical scrolling of an SVG node.
- An issue in the renderer 'creme.d3LegendRow', which is visible in D3TubeChart (legend without labels), has been fixed.
- The function 'creme.d3ColorRange()' now accepts a function; it's useful for computed ranges.
Breaking changes :
------------------
# The minimum version of Python has been upgraded to "3.8".
# Deprecated stuffs which have been removed :
- In 'creme_core.forms.fields.SelectorList', the constructor's parameter & attribute "enabled" has been removed ;
the context variable "clonelast" is not injected anymore.
- In 'creme_core.gui' :
- In 'bricks.BricksManager' :
- The attribute '_dependencies_map' has been removed.
- The method '_build_dependencies_map()' has been removed.
- The property 'used_relationtypes_ids' has been removed.
- In the class 'button_menu.Button', the attribute "id" must be filled & used instead of "id_".
- In 'field_printers', the functions 'print_date()' & print_datetime() have been removed.
- In 'creme_core.models' :
- The method 'bricks.RelationBrickItemManager.create_if_needed()' has been removed.
- The method 'relation.Relation.populate_real_object_entities()'' has been removed.
- The method 'search.SearchConfigItemManager.iter_for_models()' does not return unsaved
instances for models without configuration (these models are just ignored).
- In 'creme_core.utils' :
- The functions 'find_first()' & 'split_filter()' have been removed.
- The function 'imports.import_object()' has been removed.
- The JavaScript component 'creme.form.Chosen' has been removed.
- Apps :
* Activities :
- In 'forms.fields', the classes 'ActivityTypeField' & 'ActivityTypeWidget' have been removed.
- The method 'models.AbstractActivity.as_ical_event()' has been removed.
- The view class 'views.activity.TypeChoices' (URL named "activities__get_types") has been removed.
* Emails :
- In the class 'emails.models._Email' :
- 'Status.SYNCHRONIZED_SPAM' & 'Status.SYNCHRONIZED_WAITING' have been removed.
- 'SYNCHRONIZATION_STATUSES' has been removed.
* Graphs :
- The class 'bricks.GraphBarHatBrick' & the related template file "graphs/bricks/graph-hat-bar.html" have been removed.
- In 'models' :
- the method 'AbstractGraph.generate_png()' has been removed.
- the method 'RootNode.get_relation_types()' has been removed.
- The function-view 'views.graph.dl_png()' has been removed.
* Reports :
- The templatetag 'reports_graph_ordinate' has been removed.
* Products :
- In 'forms.fields', the classes 'CategoryField' & 'CreatorCategorySelector' have been removed.
- The function-view 'views.product.get_subcategories()' (URL named "products__subcategories") has been removed.
# In 'creme_core.apps', the method 'CremeCoreConfig.hook_select_template()' has been removed.
It means that the template of 'Select' is not overridden by default anymore (you can use the new class 'creme_core.forms.widgets.PrettySelect').
# In 'creme_core.core' :
- In 'entity_cell' :
- In the class 'EntityCellRegularField', the attributes '_printer_html' & '_printer_csv' have been removed.
- In the class 'EntityCellCustomField' :
- The class attribute '_EXTRA_RENDERERS' has been reworked.
- The method '_get_renderer()' has been removed.
- In 'setting_key', the constructor of '_SettingKey' (& so 'SettingKey' & 'UserSettingKey') takes now its arguments with keywords only.
# In 'creme_core.forms' :
- In 'creme_property', these classes have been renamed :
- '_AddPropertiesForm' => '_PropertiesForm'.
- 'AddPropertiesForm' => 'PropertiesAddingForm'.
- 'AddPropertiesBulkForm' => 'PropertiesBulkAddingForm'.
- In 'entity_filter' :
- These classes have been renamed :
- 'EntityFilterCreateForm' => 'EntityFilterCreationForm'.
- 'EntityFilterEditForm' => 'EntityFilterEditionForm'.
- The widget class 'enumerable.EnumerableSelectMultiple' is now used
for regular-field conditions of EntityFilter instead of 'DynamicSelectMultiple'.
- In 'enumerable' :
- The constructor of class 'EnumerableChoiceSet' has changed;
it requires now an 'Enumerator' instead of a model 'Field' and an 'EnumerableRegistry'.
- The 'FieldEnumerableChoiceSet' has a lazy 'url' property that uses the "creme_core__enumerable_choices" provided by the new property 'default_url'.
- 'EnumerableChoiceField' has been split into :
- a base class 'EnumerableChoiceField' that accepts an 'EnumerableChoiceSet'
- a new 'EnumerableChoiceModelField' that inherits 'EnumerableChoiceField' and keeps the previous behaviour.
- In 'fields' :
- The method 'DateRangeField.compress()' returns an instance of 'creme_core.utils.date_range.DateRange' (it was a tuple) ;
notice that the method 'clean()' already returned a DateRange.
- In class 'DurationField', the methods 'compress()' & 'clean()' now return an instance of 'datetime.timedelta' (it was a string until now).
- In class 'OptionalField' (and so in child classes 'OptionalChoiceField'/'OptionalModelChoiceField') :
- the methods 'compress()' & 'clean()' now return an instance of 'OptionalField.Optional' (it was a tuple until now).
- the data sub-field is always .
- the method '_build_subfield()' only receive keyword arguments.
- In 'header_filter', these classes have been renamed :
- 'HeaderFilterCreateForm' => 'HeaderFilterCreationForm'.
- 'HeaderFilterEditForm' => 'HeaderFilterEditionForm'.
- In 'mass_import' :
- In the class 'RegularFieldExtractorField', the attribute '_can_create' has been removed.
- In the method 'RegularFieldExtractor.set_subfield_search()', the argument 'create_if_unfound' has been replaced by 'creation_form_class'.
- In 'relation', these classes have been renamed :
- '_RelationsCreateForm' => '_RelationsForm'.
- 'RelationCreateForm' => 'RelationsAddingForm'.
- 'MultiEntitiesRelationCreateForm' => 'RelationsBulkAddingForm'.
# In 'creme_core.gui' :
- In 'bricks' :
- In the class 'Brick' (& so, all the child classes you defined), the attribute "id" must be filled & used instead of "id_".
- The only argument of '_BrickRegistry.get_brick_4_object()' is now positional only.
- In 'button_menu', the rendering of Button has been reworked :
- The method 'render()' has been removed; use 'get_context()' instead.
- The method 'has_perm()' has been removed; use 'is_allowed()' instead.
- In the related template, the way to get data in the context has changed;
for all variables returned by the method 'get_context()' of your buttons (like
"verbose_name", "description" and the ones you added of course), use the inner-context "button":
Example: "{{description}}" becomes "{{button.description}}".
Beware: "{{has_perm}}" has been renamed "{{button.is_allowed}}".
- In 'field_printers' :
- These global objects have been removed :
- print_foreignkey_html, print_foreignkey_csv
- print_many2many_html, print_many2many_csv
- These functions have been removed :
- simple_print_csv()
- print_decimal_csv()
- print_boolean_csv()
- print_date_csv()
- print_datetime_csv()
- The class 'M2MPrinterForCSV' has been removed.
- These methods have been removed :
- FKPrinter.print_fk_entity_text()
- M2MPrinterForHTML.printer_html(), M2MPrinterForHTML.printer_entity_html()
- _FieldPrintersRegistry._build_field_printer()
- The signature of the printer functions/methods (i.e. named '[simple_]print_*') has changed :
- the arguments are now keyword-only (because there are lots of arguments).
- the argument "entity" has been renamed "instance" (because printers can be used on non-CremeEntity instances).
- the argument "fval" has been renamed "value".
- The methods 'enumerator_*' of the class 'BaseM2MPrinter' have changed :
- the arguments are now keyword-only.
- the argument "entity" has been renamed "instance".
- the argument "fval" has been renamed "manager".
- The methods 'printer_*' of the classes 'M2MPrinterForHTML' & 'M2MPrinterForCSV' have changed :
- the arguments are now keyword-only.
- the argument "related_entity" has been renamed "related_instance".
- the argument "fval" has been renamed "manager".
- In the method 'FileFieldPrinterForHTML._render_download()', the argument "entity" has been renamed "instance".
# In 'creme_core.models', the only argument of the following methods is now positional only :
- RelationType.is_compatible()
- custom_field.CustomFieldManager.compatible()
- custom_field.CustomFieldManager.get_for_model()
# In the class 'creme_core.tests.base._CremeTestCase' :
- The method 'http_file()' has been removed; see the note about 'creme_core.utils.test.CremeDiscoverRunner' below.
- The method 'create_user()' does not set the password by default anymore;
you have to fill the argument "password" explicitly (hint: use if you want to login with the returned user.
# In 'creme_core.urls' :
- The URL 'creme_core__efilter_user_choices' has changed and follows the pattern 'users/{ct_id}/{field}/json[/]?$'
like the default enumerable choices URL.
# In 'creme_core.utils' :
- The only argument of the function 'content_type.as_ctype()' is now positional only.
- In 'html', the global variables 'ALLOWED_TAGS' & 'ALLOWED_STYLES' are now sets (they were lists) (see bleach 6.0).
- In 'test' :
- The function 'http_port()' has been removed.
- The class 'CremeDiscoverRunner' does not spawn an HTTP server (for static files) anymore.
You should use mocking if you want to test code which retrieves files with HTTP (see in 'vcfs' or 'geolocation)'.
The attribute '_http_server' & the method '_clean_http_server()' have been removed.
# In templates :
- The template "creme_core/templatetags/menu_buttons.html" has been removed.
- In 'creme_core/header/menu-base.html', {% block accessories %} has moved inside the "
" element.
# The method 'creme_core.tests.base._CremeTestCase.build_request()' takes now its arguments as keywords only.
# In Javascript :
- 'creme.widget.DynamicSelect' widget does not select the first option as default behaviour.
A new argument 'data-no-empty' is needed.
- 'creme.form.Select2' accepts the 'data-no-empty' attribute: select the first option as default if the value is empty.
# Apps :
* Creme_config :
- The method 'bricks.UserSettingValuesBrick.detailview_display()' changed the data injected in "values_per_app" (2-tuples => 3-tuples).
- In 'forms', many classes have been renamed in these modules:
bricks, button_menu, creme_property_type, fields_config, relation_type, user.
- In JavaScript, 'creme.creme_config.MenuContainersController' has been renamed 'creme.MenuContainersController'.
* Documents :
- Some constants have been moved :
- 'UUID_DOC_CAT_IMG_ORGA' & 'UUID_DOC_CAT_IMG_CONTACT' to the app 'persons'.
- 'UUID_DOC_CAT_IMG_PRODUCT' to the app 'products'.
- 'UUID_FOLDER_CAT_EMAILS' to the app 'emails'.
- In 'gui', the functions 'print_fk_image_html()' & 'print_doc_summary_html' have been fixed with the new printers signature.
* Activities :
- In 'forms' :
- In 'bricks', these classes have been renamed :
- 'ParticipantCreateForm' => 'ParticipantsAddingForm'.
- 'SubjectCreateForm' => 'SubjectsAddingForm'.
- The value returned by the method 'bulk_update.ActivityRangeField.clean()' is now an instance of 'ActivityRangeField.DateRange' (it was a list).
- In 'fields' :
- The value returned by the method 'UserParticipationField.clean()' has changed (see 'creme_core.forms.fields.OptionalField').
- The value returned by the method 'DateWithOptionalTimeField.clean()' is now an instance of 'DateWithOptionalTimeField.DateWithOptionalTime' (it was a tuple).
- A 'ValueError' is raised when you try to create a not custom 'ActivitySubType' related to a custom 'ActivityType'
(in it was just a log).
- The class 'utils.PytzToVtimezone' has been removed.
* Emails :
- The constant 'SETTING_EMAILCAMPAIGN_SENDER' & the object 'setting_keys.emailcampaign_sender' have been removed.
The related instance of 'SettingValue' is removed from DB by a migration.
- The form 'forms.sending.SendingCreateForm' has been replaced by a new one, 'SendingCreationForm'.
- The attribute 'utils.EMailSender._mime_images' has been removed.
* Billing :
- In 'forms', these classes have been renamed :
- 'credit_note.CreditNotePopupEditForm' => 'CreditNotePopupEditionForm'.
- 'line.LineEditForm' => 'LineEditionForm'.
- 'line.BaseLineEditFormset' => 'BaseLineEditionFormset'.
- 'payment_information.PaymentInformationCreateForm' => 'PaymentInformationCreationForm'.
- 'payment_information.PaymentInformationEditForm' => 'PaymentInformationEditionForm'.
- The function 'utils.print_discount()' has been fixed with the new printers signature.
* Commercial :
- In 'forms', several classes have ben renamed :
- 'commercial_approach.ComAppCreateForm' => 'ComAppCreationForm'.
- 'strategy.SegmentCreateForm' => 'SegmentCreationForm'.
- 'strategy.SegmentEditForm' => 'SegmentEditionForm'.
- 'strategy.SegmentLinkForm' => 'SegmentLinkingForm'.
* Assistants :
- The class 'forms.alert.ModelRelativeDatePeriodField.ModelRelativeDatePeriod' is now a frozen dataclass.
* Mobile :
- In 'forms', these classes have been renamed :
- 'MobileContactCreateForm' => 'MobileContactCreationForm'.
- 'MobileOrganisationCreateForm' => 'MobileOrganisationCreationForm'.
* Graphs :
- The template "graphs/graph_error.html" has been removed.
* Tickets :
- In 'models.status.BASE_STATUS', the tuples contain an additional column for colors.
* Projects :
- In 'forms', several classes have ben renamed :
- 'resource.ResourceCreateForm' => 'ResourceCreationForm'.
- 'resource.ResourceEditForm' => 'ResourceEditionForm'.
- 'task.RelatedActivityCreateForm' => 'RelatedActivityCreationForm'.
- 'task.RelatedActivityEditForm' => 'RelatedActivityEditionForm'.
- 'task.TaskAddParentForm' => 'TaskParentsAddingForm'.
* Polls :
- In 'forms', several classes have ben renamed :
- 'poll_form.PollFormLineCreateForm' => 'PollFormLineCreationForm'.
- 'poll_form.PollFormSectionCreateForm' => 'PollFormSectionCreationForm'.
- 'poll_form.PollFormSectionEditForm' => 'PollFormSectionEditionForm'.
- 'poll_reply.PollRepliesCreationForm' => 'PollRepliesCreationForm'.
- 'poll_reply.PollReplyEditForm' => 'PollReplyEditionForm'.
- In the template "polls/bricks/preplies.html", the block '{% block poll_replies_extra_rows %}' has been removed;
use '{{block.super}}' instead.
* CTI :
- The function 'utils.print_phone_html()' has been fixed with the new printers signature.
* SMS :
- The class 'forms.message.SendingCreateForm' has been renamed 'SendingCreationForm'.
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# In the class 'creme_core.gui.field_printers._FieldPrintersRegistry', the following attributes have been removed/replaced :
_html_printers, _csv_printers, _printers_maps, _choice_printers.
# In the class 'creme_core.templatetags.creme_cells.CellRenderNode', the class attribute 'RENDER_METHODS' has been removed.
# Apps :
* Emails :
- The constant 'utils._MIME_IMG_CACHE' has been removed.
== Version 2.4 ==
UPGRADE NOTE :
- You should create a all new virtual environment based on Python 3.7+ .
- If you used the emails synchronisation in Creme2.3, you should finish to flush the list of
untreated emails (i.e. mark them as synchronised or spam) before upgrading to Creme 2.4 .
Users side :
------------
# The users can now change their own password, and reset their lost password.
These 2 features can be disabled in the new page "Configuration of the instance".
# The setting 'USE_L10N' is now set to 'True' by default (previously only 'False' was working).
So, by default, the formats for dates & times depend on the user's language.
# The inner-edition (i.e. edition of one field directly in the detail-view) can now handles several fields at once.
It's used for example in the relationships-blocks (the blocks displaying the entities linked by a specific relationship type)
when you configure the fields to display: all displayed fields are edited with one form (so you avoid many clicks).
# In the History's block, lines related to entities from apps you cannot view are excluded.
# A periodic job which removes the deprecated users' sessions has been added.
# The combo-boxes with autocompletion now use the JavaScript library "Select2".
Their look'n feel has slightly changed, & for compatible models with a lot of choices, the loading & search are now done lazily.
Almost all small auxiliary models defined in apps (ticket Status, Sector…) are compatible ; 'user' model is compatible too.
# The old color picker 'gccolor' has been replaced by the standard HTML5 color input (less bug, less code).
# The version of the shipped Closure compiler has been upgraded (2020-01-12 => 2022-09-05).
# Two new variables have been added in 'settings.py' :
- SOFTWARE_LABEL is "Creme" by default.
- ENTITIES_DELETION_ALLOWED can disable the definitive deletion of entities.
It's true by default (deletion is allowed), & staff user can always delete entities (to fix privacy issue for example).
# The command "creme_start_project" has been improved to get a 'setup.py' that works
(if you want to install your project in your virtual environment).
# Apps :
* Creme_config :
- The email addresses of active users must be unique.
- The menu icon can now be customised.
- The menu can be customised per role.
- The relationship types have been improved :
- Non-internal types can now be disabled.
- A new kind of constraints has been added : forbidden properties (on subject & object of course).
- An edition view for semi-fixed relationship types has been added.
- The roles can now be cloned ; you can chose to copy the configurations of bricks/menu/custom-forms/search.
- The old password is required when changing a user's password.
- The configurations of CustomForms are collapsed by default, & can be expanded separately.
* Assistants :
- The trigger date of an Alert can now be relative to a date field of the linked entity (e.g. "3 days before its birthday").
Relative trigger dates are automatically updated when the date field changes.
- The owner of Alerts & ToDos can now be dynamic, to always send emails to the entity's owner.
* Activities :
- The sub-type of Activities must now be filled.
Notice that a migration creates sub-types for types which are used in Activities with NULL sub-type.
- The relationships type "is subject of the activity" is now internal.
- In creation form, when an Alert with a trigger date relative to the Activity's start is created,
the new feature is used.
So the trigger date is finally updated when the Activity's start is modified (a very old annoying behaviour disappears).
- The inner-edition is now available for these fields: start, end, is_all_day, busy.
Notice that they are always edited all together with a composite widget.
- The iCal export has been reworked.
* Emails :
- The synchronisation of external emails has been totally reworked & separated from the app "crudity".
This feature allows Creme to fetch emails from some mailboxes to potentially create true Email entities
(e.g. you send a mail, with your usual mail client, to a customer & to the synchronisation address, then you get this mail in Creme).
- Now the mail servers are configured with a GUI (it was in 'settings.py').
- IMAP4 is supported (only POP3 was).
- Mails are in a sandbox, & entities are created only when you accept them (instead of using the status "Synchronized - Untreated").
- Attachments can be ignored, or removed before the mail is transformed into an entity.
- ...
BEWARE: if you used this feature in Creme 2.3, you'll have to remove the configuration
in your settings (it's not supported anymore) & re-create it in the GUI.
* Reports :
- The reports now are displaying new charts using the JavaScript library "D3js" which comes with many improvements :
- Performance improvements (native SVG).
- Charts are following layout changes like resizing the window.
- No longer limited for the creation of custom charts (see 'Relationship graph' brick below).
- The 'USE_JQPLOT' setting allows to fallback to JQplot if needed, and will be removed with the release of .
* Persons :
- The Organisation's bricks "Managers" & "Employees" propose now to edit the related contacts, using the new multi-fields inner-edition feature.
* Products :
- In 'models', the fields 'Category.description' & 'SubCategory.description' are not mandatory anymore.
* Billing :
- When a Quote is converted to an Invoice, a relationship is now created between them.
* Opportunities :
- The bricks "Linked Contacts" & "Business managers" display now these fields for the related contacts: position, email, phone, mobile.
They propose to edit them too, using the new multi-fields inner-edition feature.
* Graphs :
- A new 'Relationship graph' brick is available, displaying the graph in the detail-view without having to download an image.
Notice it can be downloaded as image too.
* Mobile :
- An "owner" field is now present in forms to create Contacts & Organisations.
* Polls :
- The design of the 'Statistic' brick has changed.
* Crudity :
- The support of InfoPath files has been removed.
* Geolocation :
- Map markers now display more information when hovered: the actual address information. The title's importance has also been reduced,
as it's usually less useful on a map than the address itself.
Developers side :
-----------------
- 'jQuery' 3.6.0 migration :
- Remove 'jquery.uuid' & 'jquery.debounce' (replaced by underscore).
- New dependency 'underscorejs 1.13.2'.
- The version of 'floathead' is now "2.2.4".
- The version of 'jquery-ui' is now "1.13.1".
- 'Chosen' to 'Select2' migration :
- New dependency 'Select2 4.0.13'
- 'Sortable.js' was upgraded from "1.10.2" to "1.15.0".
- New app called "Sketch" :
- New dependency 'd3js 5.16.0'.
- New dependency 'filesaver 2.0.4' (customized).
Non breaking changes :
----------------------
# Deprecations :
- In 'creme_core.forms.fields.SelectorList', the constructor's parameter & attribute "enabled" are deprecated ;
use to disable instead (backported to Creme 2.3).
The context variable "clonelast" is deprecated too.
- In 'creme_core.gui' :
- In 'bricks.BricksManager' :
- The attribute '_dependencies_map' is deprecated.
- The method '_build_dependencies_map()' is deprecated.
- The property 'used_relationtypes_ids' is deprecated.
- In 'field_printers', these functions are now deprecated :
- print_date()
- print_datetime()
- In 'creme_core.models' :
- The method 'bricks.RelationBrickItemManager.create_if_needed()' is deprecated.
- The method 'Relation.populate_real_object_entities()'' is deprecated ;
use 'Relation.objects.prefetch_related("real_object")' instead.
- In 'creme_core.utils' :
- The function 'find_first()' is deprecated ; use the builtin 'next()' instead.
- The function 'split_filter()' is deprecated ;
use 'django.utils.functional.partition()' instead (beware the lists 'are returned in the reverse order).
- The function 'imports.import_object()' is deprecated ;
use 'django.utils.module_loading.import_string()' instead.
- Apps :
* Activities :
- In 'forms.fields', the classes 'ActivityTypeField' & 'ActivityTypeWidget' are deprecated.
- The method 'models.AbstractActivity.as_ical_event()' is deprecated.
- The view class 'views.activity.TypeChoices' (corresponding to the URL named "activities__get_types") is deprecated.
- In 'utils', the functions 'get_ical_date()' & 'get_ical' are deprecated ; use 'ICalEncoder' instead.
* Emails :
- In the class 'emails.models._Email' :
- 'Status.SYNCHRONIZED_SPAM' & 'Status.SYNCHRONIZED_WAITING' are deprecated.
- 'SYNCHRONIZATION_STATUSES' is deprecated.
* Graphs :
- The class 'bricks.GraphBarHatBrick' is deprecated ;
the related template file "graphs/bricks/graph-hat-bar.html" is deprecated too.
- In 'models' :
- The method 'AbstractGraph.generate_png()' is deprecated.
- The method 'RootNode.get_relation_types()' is deprecated.
- The function-view 'views.graph.dl_png()' is deprecated.
* Reports :
- The templatetag 'reports_graph_ordinate' is now deprecated ; use 'models.ReportGraph.verbose_ordinate()' instead.
* Products :
- In 'forms.fields', the classes 'CategoryField' & 'CreatorCategorySelector' are deprecated ;
use 'fields.SubCategoryField' instead.
- The view 'products__subcategories' is deprecated ; use the generic one 'creme_core__enumerable_choices' instead.
# In the class 'creme_core.auth.entity_credentials.EntityCredentials', the methods 'filter()' & 'filter_entities()'
can now be called with a combination of permissions (like 'VIEW | CHANGE').
# In 'creme_core.models' :
- A new abstract model 'base.Minion' has been created with fields uuid/is_custom/extra_data.
Most of the small models which gravitate around entities have been converted in the different apps.
- The class 'fields.RealEntityForeignKey' now have a method 'get_prefetch_queryset()' ;
so the method 'Queryset.prefetch_related()' can be called with the name of a field of this type.
- The method 'Relation.clean()' has been created ; it checks the different constraints (ContentType, CremeProperty).
- The model 'FileRef' got a new JSONField called "extra_data" which can be used by third party code.
# In 'creme_core.templatetags.creme_core_tags', the tag "print_field" can now store the output inside a variable with the classical keyword "as".
# In 'creme_core.fields' :
- A new 'enumerable.EnumerableChoiceField' for combo-box with both autocompletion and pagination has been added.
It's extremely useful to prevent issues with huge numbers of MinionModel/CremeUser instances in your database.
- A new 'CremeUserEnumerableField' has been added ; it replaces 'CremeUserChoiceField' when it's possible & can handle better big numbers of user instances.
# In Javascript :
- Some convenience actions for the "hatbarmenu" widget have been added :
- 'creme_core-hatmenubar-view'
- 'creme_core-hatmenubar-update'
- 'creme_core-hatmenubar-form'
- A new component 'creme.form.DropDown', which decorates a