Creme-crm

Latest version: v2.5.8

Safety actively analyzes 622918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

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 <Breaking changes>).
- 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 <avoid_empty=True> 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 <Breaking changes>!);
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 <clonable=False> (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 <required=False>.
- 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 <self.USER_PASSWORD> 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 "<div>" 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 <Creme 2.4> 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.

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.

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.

3.2

- The version of 'jQuery' is now "3.6.0" (jQuery-migrate 3.3.2).
Migration warning are enabled and documented here https://github.com/jquery/jquery-migrate/blob/main/warnings.md,
and you should read the migration guides:
- https://jquery.com/upgrade-guide/3.0/
- https://jquery.com/upgrade-guide/3.5/
- jQuery 3.6.0 needed the update of the following dependencies :
- The version of 'fullcalendar' is now "3.10.2".
- The version of 'floatthead' is now "2.2.1".

Non breaking changes :
----------------------
Deprecations :
- The loading of settings from "creme/local_settings.py" & "creme/project_settings.py" is deprecated ;
use the new project layout & the arguments "--settings" of the executable "creme".
- The folders "creme/media/upload" & "creme/media/static" are deprecated ;
use "my_project/media/upload" & "my_project/media/static" instead.
- The file "creme/django.wsgi" is deprecated ; use "my_project/wsgi.py" instead.
- The class 'creme_core.forms.fields.AjaxModelChoiceField' is deprecated.
- In 'creme_core.models' :
- The method 'CremePropertyType.create()' is deprecated ; use 'CremePropertyType.objects.smart_update_or_create()' instead.
- The method 'Job.not_finished_jobs()' is deprecated ; use 'Job.objects.not_finished()' instead.
- In 'fields_config' :
- The method 'FieldsConfigManager.is_model_valid()' is deprecated ; use 'has_configurable_fields()' instead.
- In 'FieldsConfig.LocalCache', the methods 'get_4_model()' & 'get_4_models()' are deprecated ;
use 'get_for_model()' & 'get_for_models()' instead.
- In 'history', all code related to history line rendering is deprecated ;
use the new rendering system 'creme_core.gui.history' instead.
- The method 'RelationType.create()' is deprecated ; use 'RelationType.objects.smart_update_or_create()' instead.
- The method 'Vat.get_default_vat()' is deprecated ; use 'Vat.objects.default()' instead.
- In 'creme_core.templatetags' :
- In 'creme_widgets', the templatetag '{% widget_select_or_msg %}' & its template file are deprecated ;
use '{% widget_enumerator %}' instead.
- In 'history', the template filter "|history_modifications" is deprecated.
- In Javascript :
- Some creme.ajax.* functions are now deprecated; use 'creme.ajax.Query' instead :
- creme.ajax.ajax()
- creme.ajax.get()
- creme.ajax.post()
- creme.ajax.submit()
- creme.ajax.reloadContent()
- creme.ajax.json.send()
- creme.ajax.json.get()
- creme.ajax.json.post()
- creme.ajax.json.isvalid()
- creme.ajax.json.parse()
- Some creme.form.* functions are now deprecated :
- creme.forms.Select.optionsFromData()
- creme.forms.Select.fill()
- All 'creme.layout.Layout' classes are deprecated; use CSS instead :
- creme.layout.Layout
- creme.layout.ColumnSortLayout
- creme.layout.CSSColumnLayout
- creme.layout.SortLayout
- The jquery extension '$.browserVersion' is now deprecated but kept as gccolor dependency.
- jQuery 3.x :
- $.bind() is deprecated; use $.on() instead.
- $.unbind() is deprecated; use $.off() instead.
- $.trim() is deprecated; use String.prototype.trim() instead.
- $.isArray() is deprecated; use Array.isArray() instead.
- Use properties instead of attributes for disabled state :
- $.removeAttr('disabled') => $.prop('disabled', false)
- $.attr('disabled', 'disabled') => $.prop('disabled', true)
- 'click' trigger & handler shortcuts are deprecated :
- $.click() => $.trigger('click')
- $.click(handler) => $.trigger('click', handler)
- 'submit' trigger & handler shortcuts are deprecated :
- $.submit() => $.submit('click')
- $.submit(handler) => $.submit('click', handler)
- 'change' trigger & handler shortcuts are deprecated :
- $.change() => $.trigger('change')
- $.change(handler) => $.trigger('change', handler)
- 'hover' event is deprecated; use 'mouseenter' & 'mouseleave' instead :
- $.hover(onenter, onleave) => $.on('mouseenter', onenter).on('mouseleave', onleave)
- Apps :
* Persons :
- The function 'forms.base._get_address_field_names()' is deprecated.
- The class 'forms.address._AuxiliaryAddressForm' is deprecated.
* Commercial :
- The method 'AbstractStrategy.get_segment_category()' is deprecated.
* Reports :
- The template file "reports/templatetags/report_chart.html" is deprecated.
* Recurrents :
- The property 'registry.RecurrentRegistry.ctypes' is deprecated ; use "models" instead.
* Crudity :
- The function 'crudity.utils.strip_html()' is deprecated ;
use 'creme_core.utils.html.strip_html()' instead.
In 'creme_core.views.generic', in the view-classes 'CremeModelCreation' & 'CremeModelEdition',
the redirection URL can be passed in the GET request (argument "callback_url").
Some views have been reworked to use this feature instead of using a fixed URL.
Apps :
* Reports :
- The template file "templates/reports/view_graph.html" use smaller '{% block %}' tags to be easier to extend.

Breaking changes :
------------------
Deprecated stuffs which have been removed :
- In 'creme_core.models' :
- The method 'Relation._build_symmetric_relation()' has been removed.
- These methods of 'EntityFilter' have been removed : create(), get_latest_version(), get_for_user()
- These methods of 'HeaderFilter' have been removed : create(), get_for_user()
- These methods of 'FieldsConfig' have been removed :
create(), field_enumerator(), filter_cells(), get_4_model(), get_4_models(), is_model_valid()
- These methods of 'CustomField' have been removed : get_pretty_value(), get_value_class(), type_verbose_name()
- The method 'CustomFieldValue.delete_all()' has been removed.
- The method 'ButtonMenuItem.create_if_needed()' has been removed.
- The property 'BrickHomeLocation.brick_verbose_name' has been removed.
- The property 'BrickMypageLocation.brick_verbose_name' has been removed.
- The method 'CustomBrickConfigItem.generate_id()' has been removed.
- The property 'InstanceBrickConfigItem.errors' has been removed.
- These methods of 'SearchConfigItem' have been removed : create_if_needed(), get_4_models()
- In 'backends._BackendRegistry' :
- The property 'backends' has been removed.
- The method 'get_backend()' has been removed.
- In 'gui' :
- In 'field_printers' :
- The class 'M2MPrinter' has been removed.
- These functions have been removed : print_decimal(), print_integer()
- These methods of 'quick_forms.QuickFormsRegistry' have been moved : iter_models(), get_form()
- In 'forms' :
- In 'fields', these classes have been removed: AjaxChoiceField, AjaxMultipleChoiceField
- The property 'header_filter.EntityCellsField.content_type' has been removed.
- The class 'widgets.DependentSelect' has been removed.
- In 'views' :
- In 'bricks', these functions have been removed :
build_context(), get_brick_ids_or_404(), render_detailview_brick(), render_home_brick(), bricks_render_info()
- The decorator 'decorators.POST_only' has been removed.
- The function 'file_handling.download_file()' has been removed.
- In 'utils', these functions have been removed :
creme_entity_content_types(), get_ct_or_404(), build_ct_choices(), entities2unicode(), related2unicode()
These templatetags of 'creme_core_tags' have been removed: {% creme_media_url %}, {% hg_info %}
- The template file "creme/creme_core/templates/creme_core/generics/blockform/content.html" have been removed
- In JavaScript :
- The module 'creme.color' has been removed.
- 'creme.dialog.ConfirmAction' has been removed (never used).
- 'creme.creme_config.FormGroupsController' is renamed as 'creme.FormGroupsController'
- jQuery 3.x :
- '$.param()' does not use 'jQuery.ajaxSettings.traditional' flag anymore. Use 'creme.ajax.param()' to keep the old behavior.
- '$.val()' returns an empty array instead of 'null' when a multi-select is empty.
- Complete refactor of progress controller of jobs :
- creme.jobs.BaseJobsMonitor:
- 'BaseJobsMonitor(url)' is replaced by 'BaseJobsMonitor({url: ..., fetchDelay: ...})'
- 'start()' has been renamed as 'fetch()'.
- 'onAllJobsFinished(handler)' is replaced by 'on("finished", handler)'.
- creme.jobs.JobsMonitor:
- 'JobsMonitor(url, element)' is replaced by JobsMonitor(element, {url: '...', fetchDelay: ...})
- creme.jobs.BrickJobsMonitor:
- BrickJobsMonitor(url, brick_id) is replaced by 'BrickJobsMonitor(brick, {url: ..., fetchDelay: ...})'
where 'brick' is a 'creme.bricks.Brick' instance.
- Apps :
* Creme_config :
- In 'forms' :
- The class user_role.UserRoleDeleteForm has been removed.
- In 'custom_fields', these classes have been removed :
CustomFieldsBaseForm, CustomFieldsCTAddForm, CustomFieldsAddForm, CustomFieldsEditForm.
- The function 'user._password_validators_help_text_html()' has been removed.
- The class 'views.search.SearchItemEdition' has been renamed "SearchConfigDeletion".
* Persons :
- The module 'views.crud_relations' has been removed.
- In 'forms.base', these constants have ben removed : _BILLING_ADDRESS_FIELD & _SHIPPING_ADDRESS_FIELD
- These template files in "creme/persons/templates/persons/" have been removed :
- frags/*
- add_*_form.html
- edit_*_form.html
- The JavaScript function 'creme.persons.copyTo()' has been removed.
* Documents :
- The method 'models.AbstractDocument.get_linkeddoc_relations()' has been removed.
- The constant 'forms.document._TITLE_MAX_LEN' has been removed.
* Activities :
- In 'forms.activity', these classes have been removed :
_ActivityForm, ActivityEditForm, _ActivityCreateForm, ActivityCreateForm, RelatedActivityCreateForm, CalendarActivityCreateForm, IndisponibilityCreateForm.
- The SettingKey 'setting_keys.form_user_messages_key', and the related constant 'SETTING_FORM_USERS_MSG' have been removed.
- In the class 'views.calendar.ActivitiesData', the method '_activity_2_dict' is not static anymore.
- These template files have been removed in "creme/activities/templates/activities/" :
- add_activity_form.html
- forms/add-activity-popup.html
- frags/activity_form_content.html
- frags/indispo_form_content.html
* Billing :
- In 'models.Base', these methods have been removed : get_source() & get_target().
- The function 'forms.base.first_managed_orga_id()' has been removed.
- In 'views' :
- The class 'base.BaseEdition' has been removed.
- The class-view 'base.RelatedBaseCreation' does not fill <initial['target']> anymore.
- These template files have been removed in "creme/billing/templates/billing/forms/" :
add.html, add-popup.html, base.html, edit.html
- The template 'templates/billing/bricks/base/lines.html' needs the variable "line_edit_form_template" to be filled
* Opportunities :
- In 'forms.opportunity', the classes 'TargetMixin' & 'EmitterMixin' have been removed.
* Commercial :
- The constants REL_SUB_SOLD_BY & REL_OBJ_SOLD_BY have been removed.
* Emails :
- These methods of 'models.EmailSending' have been removed : get_mails(), get_unsent_mails_count().
- In 'views.crudity', these functions have been removed :
set_emails_status(), spam(), validated(), waiting()
- The class attribute 'bricks.MailsHistoryBrick._RTYPE_IDS' has been removed.
* Reports :
- In 'core.graph' :
- The property 'hand.ReportGraphHand.verbose_ordinate' has been removed.
- The method 'fetcher.RegularFieldLinkedGraphFetcher.validate_fieldname()' has been removed.
- In 'models' :
- The method 'AbstractReport.get_related_fields_choices()' has been removed.
- In 'AbstractReportGraph' :
- These methods have been removed : create_instance_brick_config_item(), get_fetcher_from_instance_brick().
- The sub-class 'InstanceBrickConfigItemError' has been removed.
- In 'views' :
- The class 'report.ReportCreation' has been removed.
- In 'graph', these functions have been removed : get_available_report_graph_types(), _get_available_report_graph_types().
- The template file "creme/reports/templates/reports/add_report.html" has been removed.
- In JavaScript, the component 'creme.reports.ReportFormController' has been removed.
* Projects :
- The property 'models.AbstractProjectTask.safe_duration' has been removed.
* Recurrents :
- The method 'registry.RecurrentRegistry.get_form_of_template()' has been removed ;
use 'get_template_form_class()' instead.
The variables 'default_app_config' present in the file '__init__.py' of all apps have been removed ;
the classes inheriting 'AppConfig' got an attribute 'default = True' instead (see https://docs.djangoproject.com/en/3.2/releases/3.2/#automatic-appconfig-discovery).
In 'creme.settings', the variable 'SITE_ID' (related to the unused app "django.contrib.sites") has been removed.
In 'creme.utils.loggers' :
- The method 'CremeFormatter.formatEncodedException()' has been removed (use 'formatException()' instead).
- The method 'CompressedTimedRotatingFileHandler._next_filename()' has been removed (it was unused).
The method 'creme_core.apps.CremeAppConfig.register_menu()' has been removed ;
all apps have been reworked to use the new API (registration of entry classes in 'apps.py', base configuration of menu in 'populate.py').
The method 'get_tag()' injected in all model-fields takes now an argument named "tag" (it was named "tag_name") ;
notice that it's better to pass an enumeration value (e.g. 'FieldTag.VIEWABLE').
If you used the fields configuration on your own models (i.e. they have fields tagged as "optional"),
you must now register them in your 'apps.py' in the method 'CremeAppConfig.register_fields_config()'
(use the method 'fields_config_registry.register_models()').
In the method 'creme_core.bricks.HistoryBrick._populate_related_real_entities()', the argument "user" has been removed.
In 'creme_core.core' :
- The module 'job' has been reworked :
- It has been split in several files, so some imports may have been broken.
- The constants 'CMD_*' have been replaced by constants 'Command.{START, END, REFRESH, PING}'.
- The class '_BaseJobSchedulerQueue' :
- has been renamed 'BaseJobSchedulerQueue'.
- its class-method 'get_main_queue()' (& the related attribute '_main_queue') has been removed ;
use the function 'get_queue()' instead.
- its constructor takes an argument "setting" now.
- its method 'pong()' takes now an instance of 'job.Command'.
- The class 'JobSchedulerQueue' (which had different definitions) has been removed ;
use the function 'get_queue()' to get the concrete instance of the queue.
- In the class 'search.Searcher' :
- The attribute '_search_map' stores now 'EntityCell' instances as values.
- The method '_build_query()' takes a parameter "cells" instead of "fields".
- The method 'get_fields()' has been removed (use 'get_cells()' instead).
In 'creme_core.forms' :
- The attribute 'ActionButtonList.actions' is not a list of tuples anymore (it's a list of 'WidgetAction' instances).
- The method 'ActionButtonList._get_button_context()' has been removed.
- The inner-class 'SelectorList.Action' has been replaced by the new class 'WidgetAction' (they are globally identical, but the new constructor takes only keyword arguments).
- Remove the 'BulkFieldSelectWidget' that is no longer useful and move its role to 'creme.lv_widget.EditSelectedAction' (JS).
In 'creme_core.gui' :
- In 'bricks', the attribute 'Brick.permission' has been replaced by 'permissions' (which accepts strings sequence too).
- In 'button_menu', the attribute 'Button.permission' has been replaced by 'permissions' (which accepts strings sequence too).
- In the class 'custom_form.CustomFormDescriptor', in the methods 'build_form_class()' & 'groups()', the argument "item" cannot be 'None' anymore.
- In 'menu', the old API has been removed :
- These classes have been removed :
Item, ViewableItem, ItemList, ItemGroup, ItemSeparator, ContainerItem, LabelItem, GroupLabelItem,
URLItem, TrashItem, QuickCreationItemGroup, CreationFormsItem, LastViewedEntitiesItem, Menu
- The global instance 'creme_menu' has been removed.
- The function '_validate_id()' has been removed.
In 'creme_core.models' :
- The field 'CustomFormConfigItem.cform_id' has been replaced by the fields 'id' & 'descriptor_id'.
- The field 'DeletionCommand.json_replacers' has been transformed to a 'JSONField'.
- In 'fields_config', the method 'FieldsConfigManager.field_enumerator()' has been removed.
- In 'job' :
- The field 'Job.raw_data' has been transform into a nullable 'JSONField' named "data" ;
the property 'Job.data' has been removed since it's useless now.
- The field 'BaseJobResult.raw_messages' (& so in the concrete child models: JobResult, EntityJobResult & MassImportJobResult)
has been transform into a 'JSONField' named "messages" ;
the property 'BaseJobResult.messages' has been removed since it's useless now.
- The field 'MassImportJobResult.raw_line' has been transform into a 'JSONField' named "line" ;
the property 'MassImportJobResult.line' has been removed since it's useless now.
- The field 'Language.code' has been removed.
- In 'search' :
- The class 'SearchField' has been removed.
- In the model 'SearchConfigItem' :
- The field 'field_names' has been replaced by 'json_cells', which stores 'EntityCells' as dictionaries.
- The class attributes '_searchfields' & '_all_fields' have been removed.
- These methods have been removed: _build_searchfields(), _get_modelfields_choices(), get_modelfields_choices().
- The property 'searchfields' has been removed ; use 'cells' & 'refined_cells' instead.
In 'creme_core.utils.meta' :
- In 'ModelFieldEnumerator' :
- Two parameters of the constructor have been renamed: "deep" became "depth", "only_leafs" has been fixed to "only_leaves".
The corresponding protected attributes have been renamed too.
- The functions passed to the methods 'filter()' & 'exclude()' take now 3 arguments by keywords
(notice: "model" is new, "deep" is now "depth").
- The method '_FilterModelFieldQuery.__call__()' takes now 3 arguments by keywords (same remark).
In 'creme_core.views.generic.base' :
- The method 'CustomFormMixin.get_custom_form_class()' is not a static method anymore.
- The default value of the attribute 'PermissionsMixin.permissions' is now an empty string (instead of 'None').
The HTML/CSS for forms have been heavily reworked :
- The HTML for 'django.forms.widgets.Select' is now wrapped in a tag "<div>".
- "<div>" tags are used instead of "<table>" in the blocks.
- The HTML id "editforms" has been removed.
- The CSS class "table_detail_view" is not use anymore.
- the CSS files "creme_core/css/blocks.css" have been removed from in the setting "CREME_CORE_CSS" (they will be removed in Creme 2.4)
In Makefile, some targets have been removed :
- "karma-ci" is no longer used in circleci script.
- These commands were broken with the new project layout :
"update", "media", "test", "test-cov", "serve", "serve-jobs", "shell".
Apps :
* Creme_config :
- There are several changes about Custom-Forms :
- In the views, the argument to retrieve the instance of 'CustomFormConfigItem' has been renamed "item_id" (instead of "form_id").
- The objects injected in the template of 'bricks.CustomFormsBrick' have changed (to get several items by descriptor) ;
So 'creme_config/bricks/custom-forms.html', the related CSS classes have changed too.
In the JS class 'creme.FormGroupsController' :
- The code has been updated to retrieve the new CSS classes correctly.
- The methods '_toggleItem()', 'items()' & 'item()' have been renamed respectively '_toggleCType()', 'ctypes()' & 'ctype()'.
- In 'forms.search' :
- These classes have been removed/replaced by new ones : _SearchForm, SearchAddForm, SearchEditForm.
The related views have been updated.
* Persons :
- The method 'forms.merge._PersonMergeForm._handle_addresses()' has been removed ;
work has been split cleanly between clean & save steps (notably by the new method '_clean_addresses()').
- The field 'AbstractContact.language' has changed :
- It has been renamed "languages".
- It is no tagged as <viewable=False> any more (we did not know if we should remove this field).
- It is now editable.
- A data migration hides it (i.e. with 'FieldsConfig') in existing installations when you upgrade.
- The class 'views.organisation.OrganisationCreationBase' has been removed (merged with 'OrganisationCreation').
* Reports :
- Some constants have been replaced by 'django.db.models.*Choices' :
- An 'IntegerChoices' class for : RGT_*, GROUP_TYPES.
- An 'TextChoices' class for : RGA_*, AGGREGATOR_TYPES.
- In 'core.graph' :
- The attribute 'cell_constraint.GHCCCustomField.customfield_type' has been replaced by "customfield_types".
- The method 'aggregator.ReportGraphAggregator.aggregrate()' has been renamed "aggregate".
- Several templatetags have been renamed (for consistency) :
- 'report_chart_json' became 'reports_chart_json'.
- 'report_chart_selector' became 'reports_chart_selector'.
- 'report_chart_labels' became 'reports_chart_labels'.
* Activities :
- The class 'bricks.PastActivitiesBrick' now inherits a new base class called '_RelatedActivitiesBrick'.
- The global dictionary 'views.activity._TYPES_MAP' has been transformed in the class attribute 'ActivityCreation.allowed_activity_types'.
* Billing :
- The constants 'DISCOUNT_*' have been replaced by an 'django.db.models.IntegerChoices' : 'model.Line.Discount'.
- The class 'forms.credit_note.CreditNoteRelatedForm' has been renamed "CreditNotesRelatedForm".
* Commercial :
- In the model 'AbstractStrategy', in the methods 'get_asset_score()' & 'get_charm_score()', the argument "segment" has been renamed "segment_desc".
* Emails :
- In 'constants' :
- 'MAIL_STATUS*' have been replaced by a 'django.db.models.IntegerChoices' : 'model._Email.Status'.
- 'MAIL_SYNC_STATUSES' has been replaced 'model._Email.SYNCHRONIZATION_STATUSES'.
- In the form-class, 'forms.mail.EntityEmailForm', the field "subject" is now required.
- In 'models.sending', some constants have been replaced by 'django.db.models.IntegerChoices' :
- 'SENDING_TYPE*' by 'EmailSending.Type'.
- 'SENDING_STATE*' by 'EmailSending.State'.
* Mobile :
- The templatetags without prefix have been prefixed :
- {% prepare_fields %} => {% mobile_prepare_fields %}
- {% document_class %} => {% mobile_document_class %}
- {% activity_card %} => {% mobile_activity_card %}
- {% get_footer %} => {% mobile_footer %}
- |orga_subjects => |mobile_organisation_subjects
* Projects :
- In 'models.AbstractProjectTask' :
- The field 'order' is not 'null=True' any more.
- The <related_name> of the field 'parent_tasks' has been renamed "children" (it was "children_set").
* Geolocation :
- The inner-constants in 'models.GeoAddress' have been replaced by an 'IntegerChoices' class :
UNDEFINED, MANUAL, PARTIAL, COMPLETE, STATUS_LABELS
* Events :
- The name of the class 'bricks.ResutsBrick' has been fixed to be 'ResultsBrick'.
- In 'forms.event', the global variables '_SYMMETRICS' & '_TYPES' have been removed.
* CTI :
- The function 'utils.print_phone()' has been renamed 'utils.print_phone_html()'.
* VCFs :
- In 'forms.vcf' :
- The constant 'IMG_UPLOAD_PATH' has been removed.
- In the class 'VcfImportForm' :
- The methods '_create_contact()', '_create_address()' & '_create_image()' have been removed.
- The method '_init_orga_field()' has been renamed '_init_orga_fields()'.
Javascript :
- The function 'creme.ajax.json.ajaxFormSubmit' has been removed.
- The jQuery package 'extensions/utils.js' has been reworked, and renamed as 'extensions/jquery.toggle-attr.js' :
- The extensions '$.fn.check()', '$.fn.uncheck()' & '$.fn.toggleCheck' have been removed.
- The extension '$.fn.toggleProp' has been added.
- The jQuery extension '$.fn.wait()' has ben removed (not useful anymore).
- The jQuery extension '$.toJSON()' has been removed ; use 'JSON.stringify()' instead.
- These unused dependencies have been removed :
- jquery.cookie.js
- jquery.highlight.js
- jquery.bind-first.js

Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)

The method 'creme_core.apps.CremeCoreConfig.tag_ctype()' has been removed.
The function 'creme_core.checks.check_secret_key()' has been removed.
In 'creme_core.core.job' :
- the functions '_build_*_command()' have been removed.
- the global variable 'COMMANDS' has been removed.
The class attribute 'creme_core.utils.meta._FilterModelFieldQuery._TAGS' has been removed.
There were several changes in 'creme.utils.loggers.CremeFormatter'.
In 'mediagenerator':
- In 'settings', some global variables have been removed: GENERATED_MEDIA_DIR, _media_dir.
- In 'utils', these functions have been removed: _load_generators(), _refresh_dev_names().
Apps :
* Recurrents :
- In 'registry' :
- The attribute 'RecurrentRegistry._apps' has been replaced by '_template_forms'.
- The classes 'TemplateRecurrentRegistry' & 'AppRecurrentRegistry' have been removed.
* VCFs :
- Several useless methods have been removed in 'vcf_lib.base'.

3.1

3.0

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.