' has been removed.
- In "creme_config/portal.html", the node '
' has been removed.
# In JavaScript :
- The signature of 'creme.utils.goTo()' has changed ; the argument are now (url, data, target) instead of (url, target).
- The class 'creme.ajax.Query' now sends an "error" event instead of a "cancel" one when an empty URL is given.
- The actions of 'creme.widget.ActionList' have been renamed :
- 'creme.widget.ActionButton' became 'creme.widget.SelectorAction'.
- 'creme.widget.ResetActionButton' became 'creme.widget.ResetSelectorAction'.
- 'creme.widget.CreateActionButton' became 'creme.widget.CreateSelectorAction'.
- The constructor of 'creme.search.SearchBox' has been completely reworked ;
'creme.search.SearchBox(
, , )' is replaced by 'creme.search.SearchBox({searchUrl: , advancedSearchUrl: ).bind()'
- The main menu controller has been reworked ; theses functions has been removed 'creme.menu.bindEvents', 'creme.menu.openQuickForm' & 'creme.menu.openCreateAnyDialog'.
- There are several changes in 'creme.component.Action' :
- In the method 'Action.after()', the arguments "done" of an action are given to the following one only if the option "passArgs" is .
- The "source" action is no longer given as first 'Action.start()' argument to the following action.
- 'creme.entity_cell.EntityCellsWidget(, )' is replaced by 'creme.entity_cell.EntityCellsWidget({samples: }).bind()'
- In 'creme.jobs', the functions 'decorateJobStatus()' & 'checkJobManager()' have been removed ; use components '*JobsMonitor' instead.
- In 'list_view.core' :
- "list_view('options', <...>)" no longer exists and is replaced by "list_view('prop', <...>)".
- These methods have been removed :
- The method 'countEntities()' (renamed to 'selectedRowsCount()').
- 'getSelectedEntities()' & 'getSelectedEntitiesAsArray()' (use 'selectedRows()' instead).
- 'getKdSubmit()' & 'setKdSubmit()'
- 'setSubmit' & 'getSubmit' (see new method 'submitState()').
- 'serializeMe()' (renamed to 'state()').
- 'setReloadUrl()' & 'getReloadUrl()' (use "list_view('prop', 'reloadUrl', [])" ).
- 'isLoading()' (use "list_view('prop', 'isLoading')" ).
- 'getActionBuilders()' (use "list_view('prop', 'actionBuilders', [])" ).
- These options have been removed :
- "o2m" (renamed to "multiple").
- "reload_url" (renamed to "reloadUrl").
- "selected_rows", "selectable_class", "selected_class", "checkbox_selector", "all_boxes_selector" & "entity_separator".
- "kd_submitHandler".
- "beforeSubmit", "afterSubmit" & "submitHandler".
- "user_page" & "id_container".
- In 'creme.lv_widget' :
- 'creme.lv_widget.initialize()' has moved to 'creme.lv_widget.ListViewLauncher._initController'.
- 'creme.lv_widget.listViewAction' has been replaced by 'creme.lv_widget.ListViewDialogAction'.
- Theses function have been removed : 'deleteFilter()', 'findList()' & 'handleSort()'.
- In 'creme.utils', these old inner-popup functions have been removed :
- innerPopupUUID()
- showInnerPopup()
- reloadDialog()
- innerPopupFormAction()
- closeDialog()
- handleDialogSubmit()
# The class 'creme_core.tests.views.base.CSVImportBaseTestCaseMixin' has been renamed 'MassImportBaseTestCaseMixin'.
# Apps :
* Creme_config :
- in 'urls' :
- The URL "creme_config__edit_home_bricks" takes now an argument.
- The URL "creme_config__delete_home_brick" has a different behaviour ; the argument "id" has been replaced by the argument "role".
- The URL "creme_config__delete_instance" has changed ; it takes an argument "object_id", & returns a form.
- In 'creme_config.views' :
- Almost all function-views have been replaced by class-based views.
- All the wizard-views now inherit 'creme_core.views.generic.wizard.CremeWizardView' ;
so the attribute "wizard_title" became "title", & "permission" became "permissions".
- The nested class 'views.bricks.RelationCTypeBrickWizard._FieldsStep' has been removed.
- The nested class 'views.fields_config.FieldsConfigWizard._ConfigStep' has been removed.
- In 'views.user_role' :
- The class 'CredentialsAdding' has been replaced by 'CredentialsAddingWizard'.
- The class 'CredentialsEdition' has been replaced by 'CredentialsEditionWizard'.
- The nested classes 'RoleCreationWizard._CredentialsStep' & 'RoleEditionWizard._ExportableCTypesStep' have been removed.
- In 'forms.user_role' :
- The function 'forms.user_role.EmptyMultipleChoiceField()' has been removed.
- Theses classes have been removed : 'CredentialsGeneralStep', 'UserRoleCredentialsStep' & 'AddCredentialsForm'.
- The method '_UserRoleWizardFormStep.partial_save()' has been removed.
- The class 'forms.bricks.BrickHomeLocationsForm' has been removed.
- In 'bricks' :
- Many changes in the class 'BrickHomeLocationsBrick' & its template.
- In 'GenericModelBrick', the variable "model_name" is not injected in the context anymore.
- The template-filter "|is_custom" has been renamed "|config_is_custom".
* Persons :
- The method 'AbstractContact.get_employers()' now returns Organisations managed by the Contact too, and excludes deleted Organisations.
- The templatetag "{% persons_contact_first_employer %}" now excludes deleted Organisations.
- In the form 'forms.contact.RelatedContactForm', the fields "orga_overview" & "relation" have been removed.
* Documents :
- The template "documents/frags/previous.html" has been replaced by "documents/lv-button-previous.html".
* Activities :
- The function-view 'views.activity.get_types()' has been replaced by the class 'TypesChoices'.
- The function-view 'views.calendar.delete_user_calendar()' has been replaced by the class 'CalendarDeletion'.
- These function-views in 'views.calendar' have been removed :
- update_activity_date() (use the class 'ActivityDatesSetting' instead).
- user_calendar() (use the class 'CalendarView' instead -- beware, the template context has changed).
- get_users_activities() (use the class 'ActivitiesData' instead -- beware, it's now a GET view & the JSON has slightly changed).
- 'constants.MAX_ELEMENT_SEARCH' has been removed ; use these attributes of 'CalendarView' instead : 'calendars_search_threshold' & 'floating_activities_search_threshold'.
* Products :
- The function-view 'views.product.remove_image()' has been replaced by the class 'ImageRemoving'.
* Billing :
- In the class 'function_fields._BaseTotalFunctionField' (& child classes), the class-attribute "cache_attr" has been removed.
- The view named "billing__delete_related_cnote" now accepts only POST requests.
- The function-view 'views.convert.convert()' has been removed ; use the class 'Conversion' instead.
- The function-view 'views.credit_note.delete_related_credit_note()' has been replaced by the class 'CreditNoteRemoving'.
- The function-view 'views.payment_information.set_default()' has been replaced by the class 'PaymentInformationAsDefault'.
- The conversion matrix has changed. These cases have been removed (they were not used in the UI):
- CreditNote => Invoice
- Invoice => SalesOrder
* Opportunities :
- The function-view 'views.billing.current_quote()' has been replaced by the class 'CurrentQuoteSetting'.
- The function-view 'views.billing.generate_new_doc()' has been replaced by the class 'BillingDocGeneration'.
- The dict 'views.billing._GEN_BEHAVIOURS' has been removed.
* Commercial :
- The function-view 'views.strategy.delete_evalorga()' has been replaced by the class 'OrganisationRemoving'.
* Reports :
- The registrations are made in "apps.py" now & the method 'FieldAggregationRegistry.register()' has only one argument now.
- The function-view 'views.graph.fetch_graph()' has been replaced by the class 'GraphFetching'. Beware this new view does not return the "graph_id" any more (because it was useless).
- The function-view 'views.graph.fetch_graph_from_instancebrick()' has been replaced by the class 'GraphFetchingForInstance'.
- The class 'ReportGraphForm' does not inherit 'CremeEntityForm' any more ('CremeModelForm' instead).
* Assistants :
- The function-view 'views.user_message.delete()' has been replaced by the class 'UserMessageDeletion'.
* Emails :
- The function-view 'views.campaign.delete_ml()' has been replaced by the class 'MailingListRemoving'.
- In 'views.mail':
- The class 'EntityEmailWizard' now inherits 'AbstractWizardView' (so "permission" became "permissions" etc...).
- The nested class 'EntityEmailWizard._EmailCreationFormStep' has been removed.
- In 'views.mailing_list':
- The function '_delete_aux()' has been removed.
- These function-views has been removed :
- delete_contact() (replaced by the class 'ContactRemoving').
- delete_organisation() (replaced by the class 'OrganisationRemoving').
- delete_child() (replaced by the class 'ChildRemoving').
- The function-view 'views.signature.delete()' has been replaced by the class 'SignatureDeletion'.
- The function-view 'views.template.delete_attachment()' has been replaced by the class 'AttachmentRemoving'.
- The form class 'forms.mail.EntityEmailForm' inherits 'CremeModelForm' and not 'CremeEntityForm' anymore.
- In 'bricks.EmailRecipientsBrick' & 'bricks.SendingsBrick', "ct_id" is not injected in the context anymore.
- In 'buttons.EntityEmailLinkButton', "entity_email_ct_id" is not injected in the context anymore.
* Events :
- The constants 'INV_STATUS_MAP' & 'PRES_STATUS_MAP' have moved from 'views.event' to 'constants'.
* Graphs :
- The function-view 'views.graph.delete_relation_type()' has been replaced by the class 'RelationTypeRemoving'.
- The function-view 'views.root_node.delete()' has been replaced by the class 'RootNodeDeletion'.
* Polls :
- The function-view 'views.poll_form.get_choices()' has been replaced by the class 'LineChoices'.
- In 'forms.poll_reply.PollRepliesCreateForm' :
- The attribute "instance" has been removed.
- The special behaviour (removing related field & keeping the value fixed) of initial data for "pform", "campaign" & "persons" has been removed.
* Projects :
- The function-view 'views.resource.delete()' has been replaced by the class 'ResourceDeletion'.
- The function-view 'views.task.delete_parent()' has been replaced by the class 'ParentRemoving'.
- The function-view 'views.task.delete_activity()' has been replaced by the class 'ActivityDeletion'.
- The class 'forms.resource.ResourceCreateForm' does not inherit 'CremeEntityForm' any more.
* SMS :
- The function-view 'views.campaign.delete_messaging_list()' has been replaced by the class 'MessagingListRemoving'.
- The function-views 'views.messaging_list._delete_aux()/delete_contact()' have been replaced by the class 'ContactRemoving'.
- The templatetags "phonenumber" & "formatphone" have been renamed "sms_phonenumber" & "sms_formatphone".
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# 'creme.urls.handler403' is now a function (it was a string).
# In 'creme_core.models' :
- The method 'auth.SetCredentials.set_value()' uses now keyword-arguments only.
- In 'entity_filter' :
- There were some changes in the JSON of 'EntityFilterCondition' for 'CustomFields':
- The key "value" became "values".
- The values are now always a list (old data generated by an old form which are not using list have been migrated).
- These functions have been removed : '_delete_relationtype_efc()' & '_delete_customfield_efc()'.
# The return value of 'creme_core.forms.fields.MultiRelationEntityField._build_rtype_cache()' has changed : the IDs of CremePropertyTypes are now stored in a list.
# In 'creme_core.views.entity_filter' these mixins have been removed : 'FilterCreationMixin' & 'FilterEditionMixin'.
# About the module 'creme_core.gui.listview' :
- It has been split in several .py files.
- These methods of 'ListViewState' have been removed: 'clear_research()', 'handle_research()', 'get_q_with_research()', '_build_condition()', '_build_date_range_dict()', '_date_or_None()'.
- The function 'simple_value()' has been removed.
# The list-views no longer support "whoami" in both POST & GET requests.
# In the templatetag library "creme_listview", these functions have benn removed: '_build_bool_search_widget()', '_build_date_search_widget()' & '_build_select_search_widget()'.
# In JavaScript, the class 'creme.action.ActionBuilderRegistry' has been renamed/moved as 'creme.component.FactoryRegistry'.
# Apps :
* Creme_config :
- There are many changes in 'registry'.
- These functions of 'views.user_settings' have been removed : '_set_usersetting()', 'set_theme()' & 'set_timezone()'.
* Activities :
- These method of 'models.AbstractActivity' are deprecated : '_get_linked_aux()' & '_get_linked_for_orga()'.
- These functions of 'views.calendar' have been removed : '_activity_2_dict()', '_filter_authorized_calendars()', '_get_datetime()' & '_get_one_activity_per_calendar()'.
- There are some changes in the template "activities/templates/activities/calendar.html" (see the new 'CalendarView' context).
- In JavaScript :
- Some changes which follow the changes of "calendar.html".
- There are some changes to use the view 'ActivitiesData': GET instead of POST, "color" key instead of "calendar_color".
- The function 'creme.activities.calendar.loadCalendarEventListeners()' takes an additional argument ("select_calendars_url").
* Mobile :
- The instances of 'MobileFavorite' are now unique for the couple ('entity', 'user').
* Crudity :
- In JavaScript, the class 'creme.crudity.CrudityHatController' replaces the function 'refreshWaitingActions()'.
== Version 2.0 ==
UPGRADE NOTE :
- You should create a all new virtual environment based on Python 3.5+
(e.g. "mkvirtualenv -p /usr/bin/python3XX" if you use 'mkvirtualenv')
and populate it with "pip install -r creme/requirements.txt" of course.
- Execute the well known commands "migrate", "generatemedia" & "creme_populate".
Users side :
------------
# A list-view action has been added : "clone" (for entities which support cloning of course).
# The style of the popup-dialogs has been improved (title & icon always in the header).
# The image viewer has been improved.
# Apps:
* Persons :
* A statistic has been added : count of prospects & suspects.
* Activities :
- A statistic has been added : average number of meetings/phone calls per month (since one year).
- The list-view button "Download as iCalendar" has been converted to a bulk action.
* Reports :
- You can now see the instances bricks related to a graph directly from the "Graphs" brick.
- A list-view action for Reports has been added : "export".
- The quick-search (in list-view) on the field groups the filters by apps.
* Emails :
- Sendings have now a true detail-view :
- The template used for a sending can now be viewed.
- A link to the entity related to a mail has been added in the emails's brick.
- A list-view action & a bulk-action have been added for Emails : "resend".
* Tickets :
- A statistic has been added : count of not closed tickets.
* Opportunities :
- The statistics of 'opportunities' have been improved.
* Documents :
- A list-view action has been added for Documents: "download".
* Billing :
- A list-view action has been added for Invoice & Quote : "download".
* Events :
- The view to link contact has been improved.
The user is redirected to the event's contacts list-view (& not the event detail-view any more) ; there are better title, submission label & icon too.
* Assistants :
- The Alerts/ToDos/... which are related to a deleted entity are not displayed on their home bricks any more.
Developers side :
-----------------
In this version, there are 2 main changes for developers :
- We now use instead of .
You can find the complete release notes of Python versions here :
https://docs.python.org/3/whatsnew/3.0.html
https://docs.python.org/3/whatsnew/3.1.html
https://docs.python.org/3/whatsnew/3.2.html
https://docs.python.org/3/whatsnew/3.3.html
https://docs.python.org/3/whatsnew/3.4.html
https://docs.python.org/3/whatsnew/3.5.html
The code has not been fixed to "just work" ; lots of changes have been done to be more consistent.
For example, several methods called 'itervalues()' have been deprecated because their name was referencing the old dictionary API.
Lots of <%s-format> string have been converted to <{}-format">.
- Views are going to class :
- Almost all generic views of 'creme_core' are now class-based (but not list-views yet) ; the generic function-views are now deprecated.
All apps have been updated to use these new classes ; the function-views using old generic views have been deprecated (or sometimes removed).
- Lots of function-based views have been converted.
NB: removed functions are indicated in this changelog ; for the deprecated ones there are warnings.
Other important changes:
- The list-view action (for single & bulk actions) system has been totally reworked (Python & JavaScript sides).
Actions are now classes inheriting 'creme_core.gui.actions.UIAction', & are registered with 'CremeAppConfig.register_actions()' in your 'apps.py'.
So it's easier to add/override/remove them from another app.
- The registration of FunctionFields has been reworked. It's now external to the models (done in files 'apps.py' with 'CremeAppConfig.register_function_fields()') ;
so it's easier to add/override/remove them from another app.
- A new module, 'creme_core.core.enumerable', allows to retrieve & customise the choices related to a model-field.
It's used by list-views, filter form or ReportGraph.
- The old popup system is almost ready to be removed ; it's now only used by list-views & deprecated generic views ;
beware to use the new templates for popup when you use the new generic class-based views for popup
(if you don't set the attribute "template_name", the default value will be OK).
- The "qfilter" argument for list-view uses a new format, more powerful than the old one.
It's a true serialization of Q objects ; so 'OR' combinations can be used for example (only 'AND' were possible with the old format).
Non breaking changes :
----------------------
# Deprecations :
- In 'creme_core.models' :
- The method 'entity.CremeEntity.allowed_unicode()' is deprecated ; use 'allowed_str()' instead.
- The class 'entity.EntityAction' is deprecated ; use 'creme_core.gui.actions.UIAction' and its registration mechanism instead.
- The function 'lock.mutex_autolock()' is deprecated ; use 'MutexAutoLock' as decorator instead.
- In 'creme_core.views' :
- The function-view 'generic.detailview.view_entity()' is deprecated ; use the class-based view 'EntityDetail' instead.
- In 'generic.add' :
- The function-view 'add_entity()' is deprecated ; use the class-based views 'CremeModelCreation' & 'EntityCreation' instead.
- The function view 'add_to_entity()' is deprecated ; use the class-based view 'AddingToEntity' instead.
- The function view 'add_model_with_popup()' is deprecated ; 'use the class-based view 'CremeModelCreationPopup' instead.
- In 'generic.edit' :
- The function-view 'edit_entity()' is deprecated ; use the class-based views 'CremeModelEdition' & 'EntityEdition' instead.
- The function-view 'edit_related_to_entity()' is deprecated ; use the class-based view 'RelatedToEntityEdition' instead.
- The function-view 'edit.edit_model_with_popup()' is deprecated ; use the class-based views 'CremeModelEditionPopup' & 'EntityEditionPopup' instead.
- In 'generic.listview' :
- In 'list_view()' & 'list_view_popup()', the format for the argument "qfilter" corresponding to 'get_q_from_dict()' is deprecated ;
use the new format which uses 'creme_core.utils.queries.Qserializer.dumps()' instead.
- The function '_clean_value()' is deprecated.
- The function-view 'generic.popup.inner_popup()' is deprecated ; use a class-based view instead.
- The function-view 'generic.portal.app_portal()' is deprecated.
- The function-view 'enumerable.json_list_enumerable()' is deprecated ; use the class-based view 'ChoicesView' instead.
- The function-view 'quick_forms.add()' is deprecated.
- The method 'creme_core.forms.creme_property._AddPropertiesForm._create_properties()' is deprecated.
- In the templatetag library "creme_core_tags" :
- {% get_field_verbose_name %} is deprecated ; use {% cell_4_regularfield %} from the lib "creme_cells" instead.
- {% get_viewable_fields %} is deprecated.
- The filter "|get_tag" is deprecated.
- The filter "|allowed_unicode" is deprecated ; use "|allowed_str" instead.
- The filter "|xrange" is deprecated ; use "|range" instead.
- The method 'creme_core.gui.menu.CreationFormsItem.verbose_unicode()' is deprecated ; use 'verbose_str()' instead.
- In 'creme_core.utils' :
- The function 'db.reorder_instances()' is deprecated ; use the class based-view 'creme_core.views.generic.order.ReorderInstances' instead.
- In 'queries.get_q_from_dict()', the "~" feature is deprecated ; use a 'django.db.models.query.Q' instead.
- The function 'chunktools.iter_splitlinechunks()' is deprecated (& broken if you pass bytes instead of str) ;
you can use the method 'django.core.files.base.File.__iter__()' instead for example.
- In 'creme_core.core' :
- The method 'reminders.ReminderRegistry.itervalues()' is deprecated ; use '__iter__()' instead.
- The class 'function_fields.FunctionFieldsManager' is deprecated ; use the new method 'CremeAppConfig.register_function_fields()' instead.
- 'creme_core.constants.MODELBLOCK_ID' is deprecated ; use 'MODELBRICK_ID' instead.
- The signal 'creme_core.signals.form_post_save' is deprecated.
- In 'creme_core.backends' :
- The method '_BackendRegistry.iterkeys()' is deprecated ; use the property '_BackendRegistry.extensions' instead.
- The method '_BackendRegistry.iterbackends()' is deprecated ; use the property '_BackendRegistry.backends' instead.
- These template files are deprecated :
- creme_core/generics/blockform/add_popup.html
- creme_core/generics/blockform/edit_popup.html
- creme_core/generics/blockform/link_popup.html
- creme_core/generics/blockformset/add_popup.html
- creme_core/generics/blockformset/base.html
- creme_core/generics/form/add_innerpopup.html
- creme_core/generics/form/edit_innerpopup.html
- creme_core/generics/inner_popup.html
- creme_core/generics/portal.html
- JavaScript:
- The function 'creme.utils.handleDialogSubmit()' is deprecated.
- The function 'creme.relations.addRelationTo' is now deprecated ; use 'creme.relations.AddRelationToAction' instead.
- Apps :
* Activities :
- These methods of 'models.AbstractActivity' are deprecated :
- display_review() (use instead)
- _get_linked_for_ctypes_aux()
- get_future_linked_for_ctypes()
- get_past_linked_for_ctypes()
- 'constants.DISPLAY_REVIEW_ACTIVITIES_BLOCKS' is deprecated ; use 'SETTING_DISPLAY_REVIEW' instead.
- The JavaScript function 'creme.activities.exportAsICal()' is deprecated ; use 'ExportAsICalAction' instead.
- These template files are deprecated :
- activities/view_activity_popup.html (use "activity-popup.html" instead).
- activities/add_popup_activity_form.html (use "forms/add-activity-popup.html" instead).
- activities/frags/ical_list_view_button.html
* Persons :
- In 'forms.contact.RelatedContactForm' :
- The use of initial values to fill "linked_orga" & "rtype" is deprecated ; use constructor argument instead.
- Leaving "linked_orga" argument empty is deprecated.
* Billing :
- 'constants.CURRENCY' is deprecated.
- The property 'models.AbstractTemplateBase.verbose_status' is deprecated.
- The method 'models.AbstractTemplateBase.get_verbose_status()' is deprecated ; use 'function_fields.TemplateBaseVerboseStatusField' instead.
- The method 'registry.AlgoRegistry.itervalues()' is deprecated ; use 'AlgoRegistry.algorithms' instead.
- The JavaScript function 'creme.billing.exportAs()' is deprecated ; use the action 'ExportDocumentAction' instead.
* Emails :
- The function 'views.sending.reload_mails_brick()' is deprecated ; use 'reload_sending_bricks()' instead.
- In 'forms.mail', the classes 'TemplateSelectionForm' & 'EntityEmailFromTemplateForm' are deprecated.
- These template files are deprecated :
- emails/popup_sending.html
- emails/view_email.html
- emails/view_entity_mail_popup.html
* Assistants :
- In the model 'Action' : the methods 'get_actions*()' are deprecated.
- In the model 'Alert' : the methods 'get_alerts*()' are deprecated.
- In the model 'Memo' : the methods 'get_memos*()' are deprecated.
- In the model 'ToDo' : the methods 'get_todos*()' are deprecated.
- In the model 'UserMessage' : the methods 'get_messages*()' are deprecated.
* Opportunities :
- The method 'models.AbstractOpportunity.get_weighted_sales()' is deprecated ; use 'function_fields.TurnoverField' instead.
- In 'forms.opportunity' :
- The class 'OpportunityCreateForm' is deprecated ; use 'OpportunityCreationForm' instead.
- The class 'OpportunityEditForm' is deprecated ; use 'OpportunityEditionForm' instead.
* Reports :
- The method 'report_aggregation_registry.FieldAggregationRegistry.itervalues()' is deprecated ; use the property 'FieldAggregationRegistry.aggregations' instead.
- The template file "reports/frags/report_export_filter.html" is deprecated ; use "forms/report-export-filter.html" instead.
* Commercial :
- The method 'models.CommercialApproach.get_approaches_for_ctypes()' is deprecated.
- The class 'forms.salesman.SalesManCreateForm' is deprecated.
* Geolocation :
- The function 'utils.get_setting()' is deprecated ; use 'SettingValue.objects.get_4_key()' instead.
* Tickets :
- The method 'models.AbstractTicket.get_resolving_duration()' is deprecated ; use 'function_fields.ResolvingDurationField' instead.
* SMS :
- The template file "sms/popup_sending.html" is deprecated.
# A new hint, indicating when a swapped URL has never been defined, has been added (see 'creme.creme_core.conf.urls.Swappable') ;
it could "break" an existing application (because the code stops on a fatal error at starting), but it would indicate an existing bug.
# The model 'creme_core.models.Relation' now explicitly avoids duplicates.
A new manager has been added, with 3 methods to handle this smoothly: safe_create(), safe_get_or_create() & safe_multi_save()
# A new models field has been created : EntityCTypeForeignKey.
It looks like a GenericForeignKey, but it references only CremeEntities ; it uses a true ForeignKey for the entities, so it's possible to use classical filtering on FKs.
# A specific manager has ben added to 'creme_core.models.SettingValue', with a method which keeps retrieved instances in a (per-request) cache.
# A generic view to help the disabling of a URL has been added : the class-based view 'creme_core.views.generic.placeholder.ErrorView'.
# A new collection has been added : 'creme_core.utils.collections.InheritedDataChain'.
It facilitates the writing of registries by models when data from parent classes are used too.
# Two templatetags to store safely JSON data have been added : {% jsondata %} & {% blockjsondata %}.
# A simple HTTP server has been added in unit tests to serve static files.
# The command "i18n_empty" has been improved :
- The context is now used.
For example, an empty entry with a context is not ignored because an entry with he same 'msgid' (but without context) is filled.
- The line numbers in the PO files are now displayed.
Breaking changes :
------------------
# Deprecated stuffs which have been removed :
- The app 'activesync' is not available any more (its code is still in the repository but has not been ported to Python 3).
- In all apps :
- The configurable portal views (i.e. not 'mobile', not 'creme_config') & their templates have been removed.
- The methods 'portal_display()' of Bricks have been removed.
- The method 'register_setting_key()' of classes inheriting 'CremeAppConfig' is not called automatically anymore.
- The middleware class 'creme_core.middleware.exceptions.Beautiful403Middleware' has been removed.
- In 'creme_core.models.bricks' :
- In 'BlockDetailviewLocation', the methods 'create()'/'create_empty_config()' & the attribute 'ZONES' have been removed.
- In 'BlockPortalLocation', the method 'create()' & 'create_empty_config()' have been removed.
- The method 'BlockMypageLocation.create()' has been removed.
- In 'creme_core.views' :
- The functions 'bricks.reload_portal()' & 'bricks.render_portal_brick()' have been removed.
- The function 'exceptions.server_error()' has been removed.
- The function 'file_handling.fetch_resources()' has been removed.
- In 'creme_core.forms.widgets' :
- These functions have been removed : widget_render_input(), widget_render_hidden_input(), widget_render_context().
- The method 'EnhancedSelectOptions.render_label()' has been removed.
- In 'creme_core.gui' :
- The old API (activated by 'settings.OLD_MENU == True') in 'menu' has been removed.
- In 'bricks' :
- In 'BricksManager', the methods 'get_dependencies_map()' & '_get_dependencies_ids()' have been removed.
- The method '_BrickRegistry.get_compatible_portal_blocks()' has been removed.
- The attribute 'Brick.target_apps' has been removed.
- In 'buttons.ButtonsRegistry.register()', registering 'Button' instances is no more possible.
In all apps the global buttons instances have been removed.
- In 'creme_core.utils.dates', these deprecated functions have been removed :
- get_dt_to_iso8601_str()
- get_dt_from_iso8601_str()
- get_dt_from_json_str()
- dt_to_json_str()
- get_dt_from_str()
- get_date_from_str()
- These constants of 'creme_core.constants' have been removed :
- SETTING_BLOCK_DEFAULT_STATE_IS_OPEN
- SETTING_BLOCK_DEFAULT_STATE_SHOW_EMPTY_FIELDS
- In 'creme_core.core.reminders.ReminderRegistry.register()', registering an instance is not possible anymore.
- In 'creme_core.registry' :
- The exception class 'NotRegistered' has been removed.
- In 'CremeRegistry', the methods 'register()' & 'get()' have been removed.
- In 'bricks.HistoryBrick', the method '_populate_users()' has been removed.
- In 'creme_core.templatetags' :
- These templatetags have been removed : {% timedelta_pprint %}, {% ctype_is_registered_for_import %}, {% get_button_menu %}.
- In 'creme_bricks', about the tag {% brick_display %}, the option "render='portal'" has been removed.
- The templatetag 'creme_listview.get_listview_columns_header' does not inject the variable "can_merge_entities" in the context any more.
- In 'creme_menu' :
- The old menu API has been removed.
- The tags {% get_prefered_menu %} & {% get_last_items_menu %} have been removed with their templates.
- In 'creme_search', the tag {% get_search_panel %} has been removed.
- The templatetags library "creme_quickforms" has been removed (its only templatetag was deprecated).
- In JavaScript :
- In 'creme.utils', the functions 'openQuickForms()' & 'confirmBeforeGo()' have been removed.
- In 'creme.menu' :
- The global variable 'actions' has been removed.
- The functions 'NavIt()' & 'HNavIt()' have been removed ; the lib "jquery.navIt.0.0.6.js" has been removed too.
- The function 'creme.menu.sideMenu()' has been removed ; the related lib "fg.menu" has been removed too.
- Apps :
* Creme_config :
- In 'views.bricks' :
- The class 'PortalBricksWizard' has been removed.
- The function 'edit_portal()' & 'delete_portal()' have been removed.
- In 'forms.bricks' :
- The method '_BrickLocationsForm._build_portal_locations_field()' has been removed.
- These classes have been removed: _BlockPortalLocationsForm, BlockPortalLocationsAddForm & BlockPortalLocationsEditForm.
- The function 'utils.generate_portal_url()' has been removed.
* Documents :
- In 'views.ajax', the functions 'get_child_documents()' & 'get_child_documents()' have been removed.
* Activities :
- In the view 'calendar.get_users_activities()', the URL argument "calendar_ids" has been removed.
- In 'bricks', the methods 'FutureActivitiesBrick._get_queryset_for_ctypes()' & 'PastActivitiesBrick._get_queryset_for_ctypes()' have been removed.
* Assistants :
- The method 'bricks._AssistantsBrick._get_contenttype_id()' has been removed.
- All the methods '_get_queryset_for_portal()' of the Bricks have been removed.
- The global variables 'reminders.reminder_alert' & 'reminders.reminder_todo' have been removed.
* Emails :
- The class 'bricks.SignaturesBrick' has been removed.
# The settings "OLD_MENU" & "LOGO_URL" have been removed.
# In the credentials system, the hack with the fake app "my_page" (access was always allowed) has been removed.
# In 'creme_core.models' :
- The classes 'entity.CremeEntity' & 'relation.Relation' now inherit 'base.CremeModel'.
- The class 'base.CremeAbstractEntity' has been removed.
- The global constant 'base._SEARCH_FIELD_MAX_LENGTH' has been moved to 'entity'.
- In the model 'Relation' :
- These fields have been removed : entity_type, header_filter_search_field, is_deleted, modified.
- These attributes have been removed : _real_entity, function_fields.
- These methods have been removed : _get_real_entity(), get_real_entity(), populate_real_entities().
- The method 'CremeEntity.get_actions()' has been removed ; use the new action system ('creme_core.gui.actions') instead.
- The attribute 'CremeEntity.function_fields' has been removed ; use 'creme_core.core.function_fields.function_field_registry' instead.
- The class 'entity._PrettyPropertiesField' has moved to 'creme_core.function_fields.PropertiesField'.
- The model 'relation.Relation' has now a UNIQUE constraint on ('type', 'subject_entity', 'object_entity') ;
a data migration removes duplicated relations, so beware to custom code which (accidentally) relies on duplicated Relation (e.g. with internal RelationType).
- The field 'creme_property.CremePropertyType.is_custom' is now.
- These models of 'bricks' have been renamed :
- BlockDetailviewLocation => BrickDetailviewLocation
- BlockPortalLocation => BrickPortalLocation
- BrickMypageLocation => BrickMypageLocation
- RelationBlockItem => RelationBrickItem
- InstanceBlockConfigItem => InstanceBrickConfigItem
- CustomBlockConfigItem => CustomBrickConfigItem
- BlockState => BrickState
- The field 'bricks.BrickPortalLocation.app_name' has been removed.
- The method 'bricks.BrickPortalLocation.create_or_update()' has been removed.
- The model 'PreferedMenuItem' has been removed.
# In 'creme_core.views' :
- These function-views have been replaced by class-based views :
- creme_property : type_detailview(), add_to_entity(), add_properties_bulk(), add_type(), edit_type()
- entity : inner_edit_field(), bulk_update_field(), trash()
- entity_filter : add(), edit()
- header_filter : add(), edit()
- index : home(), my_page()
- job : detailview(), edit(), list_all(), list_mine()
- quick_forms.add_from_widget()
- relation : add_relations(), add_relations_bulk()
- search.search()
# In 'creme_core.forms' :
- In 'fields' :
- The method 'CreatorEntityField._check_qfilter()' has been removed.
- Some error messages in 'RelationEntityField' get an argument.
- The class 'header_filter.HeaderFilterForm' has been removed ; use the 'HeaderFilterCreationForm' & 'HeaderFilterEditForm' instead.
- In 'entity_filter' :
- The constructor of 'EntityFilterCreateForm' takes a additional mandatory argument "ctype" (& it does not use the initial data to get the content type).
- The constructors of 'FieldConditionWidget' & 'RegularFieldsConditionsWidget' take now an additional first argument "model" (default: CremeEntity).
# In 'creme_core.gui' :
- With the method 'quick_forms.QuickFormsRegistry.register()' : if a form is already registered for the given model, an exception is raised (there was just a log).
- The method 'button_menu.ButtonsRegistry.get_buttons()' is now a generator.
# In 'creme_core.utils' :
- The decorator '@jsonify' has moved to the module 'creme_core.views.decorators'.
- A new default JSON encoder has been added : 'creme.creme_core.utils.serializers.json_encode()'.
The output of "@jsonify", "{% ...|jsonify %}" & "{% brick_action %}" has slightly changed for date/datetime/time formatting.
- The function 'safe_unicode_error()' has been removed.
- In 'collections.ClassKeyedMap', the methods 'items()', 'keys()' & 'values()' now return 'views' like regular Python3 dictionaries.
- The method 'date_range.DateRangeRegistry.register()' now raises an Exception for duplicates (previously it was just a log message).
- In 'date_period' :
- The method 'DatePeriodRegistry.register()' now raises an Exception for duplicates (previously it was just a log message).
- The method 'SimpleValueDatePeriod._ungettext()' must now return a '{number}' format string (it was a '%s' format).
- The function 'secure_filename.secure_filename()' uses only 'str' (not 'bytes').
- The module 'unicode_csv' has been removed ; use the standard module 'csv' instead.
# About context processors :
- The function 'creme_core.context_processors.get_old_menu()' & 'creme_core.context_processors.get_logo_url()' have been removed.
- The variable 'DEFAULT_THEME' is not injected in the templates context anymore (see processor 'get_css_theme()').
# In 'creme_core.core' :
- The constructor of 'entity_cell.EntityCellActions' takes an additional argument : "actions_registry".
- In the class 'reminders.ReminderRegistry' :
- The method 'register()' now raises a 'ReminderRegistry.RegistrationError' when an ID is duplicated (it was just a log message).
- The method 'unregister()' now raises a 'ReminderRegistry.RegistrationError' when an ID des not exist (it was just a log message).
- The method '__iter__()' now returns instances of Reminders (it was tuples (ID, instance_of_reminder)) like 'itervalues()'.
- The method 'setting_key._SettingKeyRegistry.unregister()' now raises an exception in an ID is not registered (it was a simple log message).
# The templatetag {% get_entity_actions %} (from "creme_widgets") has been removed ;
use {% listview_entity_actions %} & {% listview_header_actions %} (from "creme_listview") instead.
# In the template 'creme_core/view_property_type.html', the variable for bricks is now "bricks" (it was still "blocks").
# JavaScript :
- The function 'creme.dialogs.image()' now returns a 'creme.dialog.ImagePopover' instance.
- Use the event "brick-setup-actions" for custom brick action registration instead of "brick-before-bind".
- The method 'creme.widget.EntitySelector.multiple()' has been removed ; used 'isMultiple()' instead.
- The jQuery extension 'imageMagnifier' is not used any more and has been removed from the default configuration.
# Apps :
* Creme_config :
- Some URLs have changed (no problem if named URLs are used):
- "creme_config/blocks/relation_block/*" => "creme_config/bricks/rtype/*"
- "creme_config/blocks/instance_block/*" => "creme_config/bricks/instance/*".
- "creme_config/blocks/*" => "creme_config/bricks/*".
- In 'views':
- Many function-views have been replaced by Class-Based Views.
- The class 'user_role.UserRoleCreationWizard' has been renamed 'RoleCreationWizard'.
- The class 'user_role.UserRoleEditionWizard' has been renamed 'RoleEditionWizard'.
- The function 'bricks._edit_mypage()' has been removed.
- In 'forms' :
- The constructor of 'custom_fiels.CustomFieldsAddForm' takes an additional mandatory argument "ctype".
- The constructor of 'search.SearchAddForm' takes an additional mandatory argument "ctype".
- The method 'user.UserAssignationForm.save()' does not lock any more (this is done by the view 'UserDeletion', with another lock name).
- In 'bricks' :
- The forms do not use "self.initial" to initialize their attributes ("content_type", "role" & "superuser").
- In the class 'BrickMypageLocationsForm', the field "blocks" has been renamed "bricks".
- In 'user_role' :
- The constructor of 'AddCredentialsForm': the argument "role" has been replaced by an argument "instance".
- About 'UserRoleDeleteForm' :
- The constructor takes an additional argument "instance", & does not use the initial value "role_to_delete" any more.
- The method 'save()' does not use a lock (this is done by the view 'RoleDeletion', with another lock name).
- All views/forms/bricks/templates about 'PreferedMenuItem' have been removed.
- The class 'brick.BlockPortalLocationsBrick' has been removed with its related template.
- In 'templates'
- The template file "creme_config/portal.html" has changed (e.g. suppression of {% block before_statistics %}).
- The template "creme_config/generics/app_portal.html" has been replaced by "app-portal.html" to make some changes (e.g. use the variable "bricks" instead of "app_config_bricks").
- The template "creme_config/generics/model_portal.html" has been replaced by "model-portal.html" to make some changes (e.g. use the variable "bricks" instead of "model_brick").
- In 'bricks', these classes have been renamed :
- BlockDetailviewLocationsBrick => BrickDetailviewLocationsBrick
- BlockHomeLocationsBrick => BrickHomeLocationsBrick
- BlockDefaultMypageLocationsBrick => BrickDefaultMypageLocationsBrick
- BlockMypageLocationsBrick => BrickMypageLocationsBrick
- RelationBlocksConfigBrick => RelationBricksConfigBrick
- InstanceBlocksConfigBrick => InstanceBricksConfigBrick
- CustomBlocksConfigBrick => CustomBricksConfigBrick
* Persons :
- In the models 'Address' :
- The field "object_id" (PositiveIntegerField) have been replaced by the field "object" (EntityCTypeForeignKey).
- The field "owner" is not a 'GenericForeignKey' anymore ; it's a 'RealEntityForeignKey'.
- The related name for the field "content_type" has been removed.
- The URL "persons/contact/add_with_relation/" has been replaced by "persons/contact/add_related/" (but the name did not change) ;
the argument "callback_url" is not used any more.
- The function 'views.organisation.set_managed()' has been removed ; use the class-based view 'ManagedOrganisationsAdding' instead.
* Documents :
- In 'views' :
- The function-views 'document.abstract_add_related_document()' & 'add_related()' has been removed ; use the class-based view 'RelatedDocumentCreation' instead.
- The function-views 'folder.abstract_add_child_folder()' & 'add_child()' has been removed ; use the class-based view 'ChildFolderCreation' instead.
- In 'forms' :
- The class 'document.RelatedDocumentCreateForm' constructor takes an additional argument "entity" (& does not use the initial value with key="entity" any more).
- The class 'folder.ChildFolderForm' constructor takes an additional argument "entity" (& does not use the initial value with key="parent" any more).
- In the class 'fields.(Multi)ImageEntityField', the property "q_filter" is now a Q() instance (even if you set a dictionary).
* Activities :
- These function-views have been removed & replaced by class-based views :
- bricks.add_participant()
- bricks.add_subject()
- calendar.add_user_calendar()
- edit_user_calendar()
- link_user_calendar()
- The method 'forms.mass_import.RelatedExtractor._searched_contact()' returns now a Contact instance, & not a tuple anymore.
* Assistants :
- In 'models' Action/Alert/Memo/ToDo/UserMessage :
- The PositiveIntegerFields "entity_id" have been replaced by EntityCTypeForeignKeys "entity".
- The fields 'creme_entity' are not 'GenericForeignKeys' anymore ; they are 'RealEntityForeignKeys' now.
- The related names for the fields 'entity_content_type' have been removed.
- The class 'models.alert._GetAlerts' has moved to 'function_fields.AlertsField'.
- The class 'models.memo._GetMemos' has moved to 'function_fields.GetMemosField'.
- The class 'models.todo._GetTodos' has moved to 'function_fields.GetTodosField'.
- All views using 'creme_core.views.generic.add_to_entity()' has been removed & replaced by Class-Based Views.
The function-view 'user_message.add()' has been replaced too.
* Products :
- The function 'views.product.add_images()' has been removed ; use the class-based view 'ImagesAdding' instead.
- The function 'views.service.add_images()' has been removed ; use the class-based view 'ImagesAdding' instead.
* Billing :
- The URL for the list-view of CreditNotes has change (but its name did not change, so no breaking with 'reverse()').
- The class 'models.templatebase._VerboseStatusField' has moved to 'function_fields.TemplateBaseVerboseStatusField'.
- The function 'views.payment_information.add()' has been removed ; use the class-based view 'PaymentInformationCreation' instead.
- The function 'views.line.add_to_catalog()' has been removed ; use the class-based view 'AddingToCatalog' instead.
- The function 'views.payment_information.edit()' has been removed ; use the class-based view 'PaymentInformationEdition' instead.
- The method 'registry.AlgoRegistry.register()' now raises an Exception on duplicated IDs (it was a simple log message).
- The templates "billing/frags/button_convert2invoice.html" & "billing/frags/button_convert2order.html" do not use the variable "has_perm" any more.
* Opportunities :
- The class 'models._TurnoverField' has moved to 'function_fields.TurnoverField'.
- The JavaScript function 'creme.opportunities.setCurrentQuote()' has been removed.
* Emails :
- The URL for the views "emails__view_sending" has changed (the prefix "campaign/" has been removed) ; there is no breaking if you use 'reverse()'.
- The field 'models.LightWeightEmail.body' contains now JSON data instead of pickled data.
- These function views have been replaced by class-based views :
- campaign.add_ml()
- crudity.synchronisation()
- mail.view_lightweight_mail()
- mailing_list : add_contacts(), add_contacts_from_filter(), add_children(), add_organisations(), add_organisations_from_filter()
- recipient : add(), add_from_csv()
- sending : add(), detailview()
- signature : add(), edit()
- template.add_attachment()
* Commercial :
- The URL named "commercial__edit_segment_desc" has changed & takes only one argument now.
- In the model 'CommercialApproach' :
- The field 'ok_or_in_futur' has been removed.
- The PositiveIntegerField 'entity_id' has been replaced by the EntityCTypeForeignKey 'entity'.
- The field 'creme_entity' is not a 'GenericForeignKey' anymore ; it's a 'RealEntityForeignKey'.
- The related name for the field 'entity_content_type' has been removed.
- The static method 'get_approaches()' does not return instances related to deleted (i.e. in the trash) entities when not entity PK is given.
- In views, these function-views have been removed & replaced by class-based views :
- act : add_pattern_component(), add_objective(), add_objectives_from_pattern(), _add_objective(), edit_objective()
add_child_pattern_component(), add_parent_pattern_component(), create_objective_entity().
- strategy : add_segment(), edit_segment(), link_segment(), add_asset(), edit_asset(), add_charm(), edit_charm(), add_evalorga(), orga_evaluation(), orga_synthesis()
- market_segment : add(), edit(), delete(), listview()
- The function 'views.strategy._orga_view()' has been removed.
- The function 'views.act._add_subpattern_component()' has been removed.
- The constructor of 'forms.market_segment.SegmentReplacementForm' takes an additional argument "instance".
* Reports :
- In 'views' :
- In 'report.set_selected()', a new POST argument is mandatory: "report_id".
So the JavaScript function 'creme.reports.expandSubReport()' takes an additional argument "report_id".
- The function-view 'report.edit_fields' has been removed ; use the class-based view 'FieldsEdition' instead.
- The function-view 'report.reorder_field()' has been removed ; use the class-based view 'MoveField' instead.
The related URL has changed (the name remains the same, but the report's ID must be added in arguments).
- The function-view 'export.preview()' has been removed ; use the class-based-view 'Preview' instead.
- In the constructor of 'forms.report.ReportFieldsForm', the argument "entity" has been renamed "instance".
- The attribute 'report_aggregation_registry.FieldAggregation.pattern' must now be a {}-format string.
- In the class 'core.graph.ReportGraphHand' (& so child classes), the methods 'fetch()' & '_fetch()' take a mandatory argument "user".
- In JavaScript:
- These functions have been removed : creme.reports.load(), creme.reports.loadHeaderFilters() & creme.reports.loadEntityFilters().
- The signature of 'creme.reports.exportReport(filterform_url, preview_url, export_url)' has changed to 'creme.reports.exportReport(filterform_url)'.
- The signature of 'creme.reports.PreviewController(preview_url, export_url)' has changed to 'creme.reports.PreviewController({previewUrl: ..., exportUrl: ...})'.
* Geolocation :
- In 'bricks.GoogleDetailMapBrick', the context variable "geoaddresses" is not JSON-ified any more.
* Tickets :
- The class 'models._ResolvingDurationField' has moved to 'function_fields.ResolvingDurationField'.
- The button 'buttons.Linked2TicketButton' does not inject the variable "ticket_ct" any more.
* Crudity :
- In the class 'models.WaitingAction', the methods 'get_data()' & 'set_data()' have been removed ; use the property 'WaitingAction.data' instead.
- The function-view 'views.actions.portal()' has been removed ; use the class-based view 'Portal' instead.
- The function-view 'views.history.history()' has been removed ; use the class-based view 'History' instead.
- The function 'utils.strip_html_()' has been removed ; use 'strip_html()' instead.
- The unused function 'utils.unescape()' has been removed.
* Graphs :
- The function 'views.graph.add_relation_types()' has been removed ; use the class-based view 'RelationTypesAdding' instead.
- The function 'views.root_nodes.add()' has been removed ; use the class-based view 'RootNodesAdding' instead.
- The function 'views.root_node.edit()' has been removed ; use the class-based view 'RootNodeEdition' instead.
* Projects :
- These function-views have been replaced by class-based views :
- resource : add(), edit()
- task : abstract_add_activity(), add_activity(), task.add_parent()
- In 'forms.task.RelatedActivityCreateForm', the constructor takes an argument "entity" now.
* Polls :
- These function views have been replaced by class-based views :
- poll_form : add_line(), add_section(), add_line_to_section(), add_section_child(),
edit_line_conditions(), edit_line(), edit_section(), stats()
- poll_preply : link_to_person(), edit_line()
- In 'forms.poll_form':
- The method 'PollFormSectionCreateForm.save()' does not use any more ; use the constructor argument "line" instead.
- The constructor of 'PollFormLineCreateForm' takes now an optional argument "section" & does not use any more.
- The constructor of 'poll_form.PollFormLineEditForm' does not raise a 404 error when the related line is disabled any more.
- The constructor of 'PollFormLineConditionsForm' takes an additional argument "line" & does not use any more.
- In the class 'core.EnumPollLineType', the attributes '_description' & '_description_del' use now '{foo}' format.
* Events :
- The constructor of 'forms.event.RelatedOpportunityCreateForm' takes 2 additional arguments "event" & "contact" ; the initial values with keys "event" & "contact" are not used any more.
* Vcfs :
- In 'forms.vcf', 'VcfImportForm.HOME_ADDR_PREFIX' & 'VcfImportForm.WORK_ADDR_PREFIX' moved at the root of the module.
* CTI :
- The function-view 'views.respond_to_a_call()' has been removed ; use the class-based view 'AnswerToACall' instead.
- In 'views._build_related_phonecall()', the title format in now a '{entity}' format string.
* SMS :
- The function-view 'views.sending.detailview()' has been removed ; use the class-based view 'Messages' instead.
Internal breaking changes :
---------------------------
(they should not cause problem if you have not deeply modified the source code of Creme)
# In 'creme_core.models' :
- In 'history', the attributes '_HLTPropertyCreation._fmt' & '_HLTRelation._fmt' use now {}-format strings.
- In 'entity_filter._ConditionOperator', "key_pattern" (argument and property) is now a {}-format string.
# In 'creme_core.views' :
- The functions 'entity_filter._set_current_efilter()' & 'header_filter._set_current_hf()' have been removed.
- The function 'index._render_home()' has been removed.
# In 'creme_core.forms': 'base._CUSTOM_NAME' & 'bulk._CUSTOMFIELD_FORMAT' are now {}-format strings.
# In the attribute 'creme_core.core.entity_cell.EntityCellCustomField._CF_PATTERNS', values are now {}-format strings.
# The class 'creme_core.backends.csv_import.CSVImportBackend' does not inherit 'UnicodeReader' any more.
# In the constructor of 'creme_core.gui.bricks.SpecificRelationsBrick', the argument "relationblock_item" has been renamed "relationblock_item".
# In 'creme_core.templatetags' :
- The return of 'creme_bricks.brick_action()' has slightly changed ("data" key is now a dict/None, not a string any more).
- In the function 'creme_listview._build_select_search_widget()' : the argument "choices" uses the new dictionary format
for choices (see 'creme_core.core.enumerable.Enumerator') & the "values" of the widget context uses a new format adapted for grouped choices ;
the template 'creme_core/templatetags/listview_columns_header.html' has changed to use this new format.
# The functions 'python_subprocess()' in 'creme_core.utils.system.nt' & 'creme_core.utils.system.posix' have been removed (replaced by the one in 'creme_core.utils.system').
# The signal with uid "creme_core-blockmypagelocation._copy_default_config" is now "creme_core-brickmypagelocation._copy_default_config".
# Some patterns in 'creme_core.utils.url.TemplateURLBuilder' have changed to be {}-format strings.
# In JavaScript, all "_action_*" methods in 'ListViewActionBuilders' have been renamed to "_build_*" (see 'ActionBuilderRegistry' API).
# Apps :
* Creme_config :
- The function 'views.bricks._get_configurable_ctype()' has been removed.
- The function 'views.generics_views._popup_title()' has been removed.
- In the constructor of 'registry._ConfigRegistry', the argument "block_registry" has been renamed "brick_registry".
* Persons :
- The method 'forms.merge._PersonMergeForm._save_address()' has been replaced by '_handle_addresses()'.
* Billing :
- The function 'function_fields.hook_organisation()' has been removed.
* Emails :
- The function 'views.sending._get_sending()' is deprecated.
- The template "emails/bricks/html-body.html" needs a context variable "body_url" now.
* Crudity :
- The field 'models.WaitingAction.raw_data' is now a BinaryField.
- The global variable 'builders.infopath.XSL_VIEW_FIELDS_TEMPLATES_PATH' is now a {}-format string.
- The method 'builders.infopath.InfopathFormBuilder._render()' is not a generator anymore & takes a mandatory argument "file_name".
- In JavaScript, the brick-actions no longer use the argument "__selector".
* Assistants :
- In 'signals' : 'MODELS', 'dispose_instances()' & 'handle_merge()' have been removed.
* Commercial :
- In 'signals', the function 'dispose_comapps()' & 'handle_merge()' have been removed.
* Geolocation :
- The method 'management.commands.geolocation.CSVPopulator._open()' has been removed.
== Version 1.8 ==
UPGRADE NOTE :
- You should create a all new virtual environment (and populate it with "pip install -r creme/requirements.txt" of course).
- If you have the list of installed apps in your file local_settings.py/project_settings.py, remove "creme.media_managers".
If you defined your own 'MIDDLEWARE_CLASSES', 'LOGIN_REDIRECT_URL', 'LOGIN_URL', 'INSTALLED_DJANGO_APPS', see the "Breaking changes" section.
- Execute the well known commands "migrate", "generatemedia" & "creme_populate".
Users side :
------------
# The version of Django has been upgraded to 1.11.
# Some features about data confidentiality have added :
- A history of consultation for Contacts's detail-view (other types can be in the history by adding some simple code).
- A sandbox feature has been added to the credentials system. It is currently used with a new button which reserves given entities to superusers.
- A history line is created when data from list-views are exported ; stored information are :
- Number of exported entities.
- HeaderFilter used.
- EntityFilter used.
# The app 'media_managers' has been removed.
# A new model, FileRef, can keep a reference temporary files (like files created for XLS export).
A new file cleaner job use them to remove the temporary files, and files related to removed Documents.
# The passwords are now validated (thanks to the new Django 1.9's password validation system -- see settings.AUTH_PASSWORD_VALIDATORS).
- They have to be sufficiently different from the user's information.
- They must be at least 8 characters long.
- They cannot belong to a a black-list of common passwords.
- They cannot be entirely alphanumeric.
# We use our own fork of 'django-generator', because the vanilla one does not support Django 1.9+.
- Some useless (in our workflow) features have been removed, in order to get less code to support.
- The annoying error messages about "URL not found" have been removed.
# The old menu ("settings.OLD_MENU = True") is now deprecated.
Developers side :
-----------------
You should probably read the following releases notes for Django versions :
https://docs.djangoproject.com/en/1.11/releases/1.9/
https://docs.djangoproject.com/en/1.11/releases/1.10/
https://docs.djangoproject.com/en/1.11/releases/1.11/
Non breaking changes :
----------------------
# Deprecations :
- From Django 1.10 :
- The module 'django.core.urlresolvers' is deprecated (use 'django.urls' instead).
- In 'creme_core.models.CremeUser', 'is_authenticated()' & 'is_anonymous()' as method are deprecated (use them as property).
- The direct assignment to the forward side of a many-to-many set is deprecated (use the method 'set()' instead).
- From Django 1.11 :
- The view 'django.contrib.auth.views.login()' is now deprecated ; so we use the class-based view 'LoginView'.
- The middleware class 'creme_core.middleware.exceptions.Beautiful403Middleware' is deprecated.
- In 'creme_core.views' :
- The function 'exceptions.server_error()' is deprecated (use 'django.views.defaults.server_error()' instead).
- The function 'file_handling.fetch_resources()' is deprecated (it was not used for a long time).
- The functions 'bricks.reload_portal()' & 'bricks.render_portal_brick()' are deprecated.
- In 'creme_core.models' :
- In 'bricks.BlockDetailviewLocation' :
- The methods 'create_empty_config()' & the attribute 'ZONES' are deprecated.
- The method 'create()' is deprecated (use create_if_needed() instead).
- In 'bricks.BlockPortalLocation' :
- The method 'create()' is deprecated (use create_or_update() instead).
- The method 'create_empty_config()' is deprecated.
- The method 'bricks.BlockMypageLocation.create()' is deprecated (use 'bricks.BlockMypageLocation.objects.create()' instead).
- In 'creme_core.forms.widgets' :
- These functions are now deprecated : widget_render_input(), widget_render_hidden_input(), widget_render_context().
- The method 'EnhancedSelectOptions.render_label()' is deprecated.
- In 'creme_core.gui' :
- The old menu API is deprecated.
- In 'bricks' :
- In 'BricksManager', the methods 'get_dependencies_map()' & '_get_dependencies_ids()' are now deprecated.
- The attribute 'Brick.target_apps' is deprecated.
- The method '_BrickRegistry.get_compatible_portal_blocks()' is deprecated.
- In 'buttons.ButtonsRegistry.register()', registering 'Button' instances is deprecated (register classes instead).
In all apps with global buttons instances, these ones are deprecated.
- The method 'HistoryBrick._populate_users()' is deprecated (use 'HistoryLine.populate_users()' instead).
- In 'creme_core.core.reminders.ReminderRegistry.register()', registering an instance is deprecated; register a class instead.
- In 'creme_core.registry' :
- The exception class 'NotRegistered' is now deprecated.
- The methods 'register()' & 'get()' of 'CremeRegistry' are now deprecated.
- In 'creme_core.templatetags' :
- {% timedelta_pprint %} is deprecated (use {% date_timedelta_pprint %} instead).
- In the library 'creme_bricks', in {% brick_display %}, the option "render='portal'" is deprecated.
- In the library 'creme_menu' :
- The tags activated by are deprecated.
- {% get_last_items_menu %} & {% get_prefered_menu %} are deprecated (their template too).
- {% get_button_menu %} is deprecated (use {% menu_buttons_display %} instead).
- {% ctype_is_registered_for_import %} (use the filter "ctype_can_be_mass_imported" (from the library 'creme_ctype') instead).
- In the library 'creme_search', the tag {% get_search_panel %} (& is template) is deprecated.
- The templatetags library "creme_quickforms" is deprecated.
- In JavaScript :
- The function 'creme.utils.confirmBeforeGo()' is deprecated.
- In 'creme.menu' :
- The variable 'actions' is deprecated.
- The functions 'sideMenu()', 'NavIt()' & 'HNavIt()' are deprecated.
- In all apps, the methods 'portal_display()' of Bricks are deprecated.
- Apps :
* Creme_config :
- The function 'utils.generate_portal_url()' is deprecated.
- In 'views.bricks' :
- The class-view 'PortalBricksWizard' is deprecated.
- The function-views 'delete_portal()' & 'edit_portal()' are deprecated.
- In 'forms.bricks' :
- The classes '_BlockPortalLocationsForm', 'BlockPortalLocationsAddForm' & 'BlockPortalLocationsEditForm' are deprecated.
- The method '_BrickLocationsForm._build_portal_locations_field()' is deprecated.
* Documents :
- In 'views.ajax', the function 'get_child_documents()' & 'get_child_documents()' are deprecated.
* Activities :
- In the view 'calendar.get_users_activities()', the URL argument "calendar_ids" is deprecated (use the GET parameter "calendar_id" instead).
- In 'bricks', the methods 'FutureActivitiesBrick._get_queryset_for_ctypes()' & 'PastActivitiesBrick._get_queryset_for_ctypes()' are deprecated.
* Assistants :
- The method 'bricks._AssistantsBrick._get_contenttype_id()' is deprecated.
- All the methods '_get_queryset_for_portal()' of the Bricks are deprecated.
- The global variables 'reminders.reminder_alert' & 'reminders.reminder_todo' are deprecated.
* Emails :
- 'bricks.SignaturesBrick' is deprecated.
# Django 1.11 raises UnorderedObjectListWarning warnings when the pagination is made on a unordered queryset ; some models were missing a Meta.ordering.
# A model FileRef has been added ; it provides a way to remove an old bug with deletion of model referencing files.
The related files were automatically delete when instances were deleted, so it caused problems when the DB deletion was rollbacked.
Now a FileRef, which references the file, is created at deletion (so it's creation is cancelled on a rollback) and the new file cleaner Job will delete these FileRef instance (& the related file).
FileRef will be useful in the future for files created dynamically (like in export views).
# Some template filters have been added in 'creme_core_tags' : lt, lte, gt, gte, eq.
# The test runner now creates a mock/temporary 'settings.MEDIA_ROOT' directory. So the files created in unit tests (e.g. uploaded files) are not spoiling the real 'upload/' directory.
This temporary directory is removed at the end of tests ; there is no need to take care about deleting only the tests files any more.
# In JavaScript :
- The option "validator" in 'creme.dialog.FormDialog' now accepts the value "innerpopup" to continue to handle old-styled-popup HTML (