4.0.0

v4.0.0

For users:
NEW: Add recurring invoice feature and automatic generation of invoices.
NEW: Add module "Loan" as stable.
NEW: Add module "Supplier commercial proposal" (price request) with stable status.
NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties. 
NEW: Can select fields to show on list also for list of customer orders, supplier orders, shipments, proposals and invoices.
NEW: Show into badge on tab head, the number of dedicated contacts for all objects.
NEW: Add a checkbox to select/unselect all lines on page that support mass actions (like invoice list page)
NEW: Add a new method for margin calculation. Added margin on "cost price" in addition to margin on WAP price and margin on "best supplier price".
NEW: Add an explanation message on shipment page to explain you can't make shipment if order is not validated
NEW: Add date_rum into table of thirdparty bank account.
NEW: The probability of lead/opportunity can be defined per lead.
NEW: Added Malta VAT into migration script
NEW: Add Expense report into accountancy report
NEW: Add Expense report to approve into workboard 
NEW: Selection of boxes is moved on top of home page
NEW: Add filter on a keyword, status and nature into list of modules.
NEW: Add hidden option BANK_DISABLE_CHECK_DEPOSIT to disable check deposit feature.
NEW: Add hidden option MAIN_PUBLIC_NOTE_IN_ADDRESS
NEW: Add index on invoice status 
NEW: Add constant MAIN_LOGTOHTML to 0 into setup by default to save time when we need to make debug on hosted instance.
NEW: Add list of billed
NEW: Add minimum stock and desired stock into import/export profiles. 
NEW: Add state into thirdparty export fields.
NEW: Add more trackable events (create, submit and receive supplier order).
NEW: Add hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
NEW: Add picto on module list to show warning and if module is an external module.
NEW: Add product type filter on turnover report
NEW: Add state into list of fields available for personalized fields of thirdparties
NEW: Add statistics for interventions module
NEW: Add statistics on number of projets on home page
NEW: Add statistics and late records into dashboard for supplier proposals.
NEW: Add the admin info on combo of type of contact
NEW: Add the event BILL_PAYED to the list of supported events for module notification.
NEW: Add total weight and volume on PDF. 
NEW: Add hidden option to hide column qty ordered on shipments.
NEW: Add view of virtual stock into product list (when appropriate)
NEW: Add warning on tasks when they are late (add also the warning tolerance parameter)
NEW: Add weight/volume for one product into shipment export
NEW: Add width and height on product table
NEW: allow a document to be linked to project from another customer on config
NEW: allow project to be shared across entities (for multicompany module)
NEW: All variant of ckeditor config can be tested into the setup page of module.
NEW: Can change dynamically number of records visible into lists.
NEW: Can change type of extrafields (for some combinations only).
NEW: Can define number of first and last line to import into import wizard.
NEW: Can edit next execution date of a cron job.
NEW: Can edit value date of a vat payment after recording it.
NEW: Can filter modules on publisher.
NEW: Can filter on employee status when building emailing from users.
NEW: Can reopen an closed shipment.
NEW: Can search on shipments into the quick search box.
NEW: Can select language from a combo list on page to overwrite a translation.
NEW: Can select number of lines on page list for projects and tasks.
NEW: Can use ^ and $ (to say start with or end with like regex syntax) into search fields when search field is text. Bonus: ^$ can filter all lines with field not defined.
NEW: Clean and enhance code for cron engine
NEW: Can decrease stock on shipment closing/classifying (only if module lot is not enabled for the moment)
NEW: Disabled users are striked.
NEW: Enhance navigation of project module
NEW: fichinter lines ordered by rang AND DATE
NEW: hidden conf to use input file multiple from mail form
NEW: hidden feature: SUPPLIER_ORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
NEW: Hidden option MAIN_LANDING_PAGE to choose the first page to show after login works as a "global" option (llx_const) and as a "per user" option (llx_user_param).
NEW: Holiday is a now a RH module. All RH module provides by default visilibity on users of its hierarchy.
NEW: If error is reported during migration process, you can ignore it to avoid to be locked.
NEW: if nb total of lines provided in print barre_liste, display in title
NEW: If option to see non stable modules is on, add a filter into module list to filter on level (deprecated, experimental, development)
NEW: Include number of linked files into badge counter of "Linked files" tab.
NEW: Include sales representative into export of thirdparties
NEW: Indicator on workboard are red/green if late or not.
NEW: Into GED module, filename is truncated only if there is not enough space into table
NEW: Introduce a predefined job to run database backup
NEW: Introduce option MAIN_WEIGHT_DEFAULT_UNIT and MAIN_VOLUME_DEFAULT_UNIT to force output unit for weight and volume.
NEW: Introduce position of records into dictionnary of type of contacts
NEW: Link on a user in leave page reach to leave tab of user.
NEW: List of user in agenda view per user show photo thumb.
NEW: Margins module - Check/update buying price on invoice lines
NEW: Merge all admin tools (system and module admin tools) into same entry "Admin tools", so now things are clear: All features restricted to an admin user is inside "setup" (for setup) or "admin tools" (for action tools) instead of 3 different entries.
NEW: Merge all boxes "related objects" into one. This save a lot of room on most card and avoid often horizontal scoll.
NEW: Moved code that deals with bank categories to BankCateg. Created BankCateg::fetchAll function
NEW: Move HRM dictionary from module to core dictionaries.
NEW: Mutualize code to manage email substitution variables. Show available variables into page to edit email templates.
NEW: Mutualize code: Use one call of function "addThumbs", when possible, to generate thumbs files instead of several call of "vignette" function.
NEW: On translation admin page, admin can overwrite a translation value.
NEW: Option MAIN_LIST_FILTER_ON_DAY is supported on proposal list.
NEW: Add reputation field for price supplier.
NEW: Selection of fields is available on member list.
NEW: Show a badge with number of withdraw requests done on the withdraw tab of invoice.
NEW: Add option to show detail per warehouse into reassort.
NEW: Show total number of modules into the module list.
NEW: Survey system has now a status like other objects. You can close or reopen a survey.
NEW: The note on time spent can be entered when using the "view per day".
NEW: Use ellipsis truncation on too large left menu text.
NEW: When a new field to show into lists is selected, the form is automatically submited and field added.
NEW: When creating a template invoice from a draft invoice, if there is link to contract on draft invoice, link is kept on template invoice.
NEW: When emailing is not sent completely, show progression.
NEW: Experimental module Accountancy Expert.
NEW: Experimental module Multicurency

For developers:
NEW: Add entity field in llx_societe_remise_except and llx_societe_remise.
NEW: Rest API token is no more reset at each call. We can reset it with param reset=1 on login call.
NEW: Add html id/class to locate value in the DOM html
NEW: Add a css class style called 'reposition', so when clicking on a link with this class will move scrollbarr to be placed at same page location.
NEW: TimeZone can be supplied to mktime
NEW: hook in shipment card
NEW: Deprecated Societe::set_prospect_level, Societe::set_commnucation_level, Societe::set_OutstandingBill functions
NEW: A module can add, into its import profiles, a sql request to execute at end of import. This allow to update dernormalized data after import.
NEW: Add hook pdf_build_address 
NEW: Add a parameter on graph function to show a generic graph when no data are available.
NEW: Add $object in parameter of pdf_build_address so we could include hook into the function.
NEW: Add a tool for developers to purge database with no loose of setup
NEW: Can disable a module by renaming dir of module into module.disabled (this save time for maintenance when working with FTP).
NEW: Created AccountLine::insert function and started using it for transaction creation
NEW: Created Account::__toString, Account::getFieldsToShow and Account::getAccountNumberOrder to refactor the way account number was shown
NEW: Created FormBank::getIBANLabel function to get the label of "IBAN" depending on bank account country
NEW: prepare for additional warehouse statuses
NEW: project sharing in select_projetcs_list function
NEW: Removed deprecated CommonObject::client property. Please use CommonObject::thirdparty instead
NEW: Removed unused FormOrder::selectSourcesCommande function
NEW: Renamed ActionComm::add function to ActionComm::create
NEW: Rename Form::select_date to Form::selectDate and Form::form_date to Form::formDate
NEW: Rename path for generic media files
NEW: More phpunit tests. Include some REST API into automatic tests.
NEW: Move Expense report menu from module to menu files.


WARNING: 

Dolibarr 4.0 should be compatible with PHP 7 but more feedbacks are still expected to confirm that.

Following changes may create regression for some external modules, but were necessary to make
Dolibarr better:
- Function log() of class CommandeFournisseur has been removed. Using it is no more required.
- Class Resource was renamed into DolResource to avoid conflict with a reserved PHP word.
- Method commonobject->add_thumb() has been renamed into commonobject->addThumbs().
- Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount() 
- Property ->client that was deprecated 6 years ago, is replaced in all core code with ->thirdparty.
- File '/core/tpl/document_actions_pre_headers.tpl.php' were renamed into '/core/actions_linkedfiles.inc.php'.
So if you included it into your module, change your code like this to be compatible with all version:
  $res=@include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';

v4.0.1

FIX: #2853
FIX: #2991
FIX: #3128
FIX: #5699
FIX: #5734
FIX: #5742 error on project list if an extra field separator is added.
FIX: #5746 chrome php Try a fix. Not sure it solved all problems reported
FIX: #5748 Bug: Error updating to 4.0.1 with Postgresql. Field must be varchar.
FIX: #5750 Bug: CmailFile::server_parse enters an infinite loop if $server_response is false
FIX: #5752 Bug VAT NPR not propagated during proposal cloning
FIX: #5763 Bug: Cannot Create Supplier Price Request
FIX: #5770 Dolibarr doesn't modify correctly the hour of a task
FIX: #5776
FIX: #5802 Incoterms not set
FIX: #5813 Bug: Incoterms not being read correctly
FIX: #5818
FIX: alignement of intervention status
FIX: Clean of search fields
FIX: Creation of donation should go back on card after creation
FIX: Date visible on project overview
FIX: Execute a dedicated job from its id may results of launching other jobs too.
FIX: Failed to export contact categories with contact extra fields
FIX: inversion customer/supplier price
FIX: link "back to list" was not visible.
FIX: Lost filter on opportunities
FIX: Mandatory field payment term was not css highlighted.
FIX: Menu users not visible on dolidroid.
FIX: SEC for HTB23302
FIX: The email test sender in email setup was broken
FIX: Translation of "Name" is not a good choice for floow-up.
FIX: Update of maxnbrun on job list failed.
FIX: Value of payment term and project are not set on correct default value when invoice generated from template.
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
FIX: Vat not visible in dictionnary

v4.0.2

FIX: #5340
FIX: #5779
FIX: #5849
FIX: #5866
FIX: #5907
FIX: Addline if $txlocaltax1 is empty
FIX: Avoid error 500 if phpexcel is disabled
FIX: Avoid errors on debian
FIX: Can edit the customer ref even if order is not draft.
FIX: Documents not moved in new directory if we change reference of the task.
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is child of an already linked to object
FIX: Extra fields of task not copied on project cloning
FIX: Hidden option PRODUCT_MAX_VISIBLE_PHOTO
FIX: Link on supplier invoice in widget was not clickable
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thirdparty list
FIX: Nber of attached files were not reported in event report of email sent
FIX: only show projects of related third if external user
FIX: Search provider by price
FIX: Solve backup when using mysqldump that return warning
FIX: Sql error in widget of product for stock alerts
FIX: updateligne if $txlocaltax1 is null

v4.0.3

FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
FIX: #5958 no discount on supplier command made by replenishment
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
FIX: #5972 #5734
FIX: #6007
FIX: #6010
FIX: #6029
FIX: #6043 - Payment mode not visible on supplier invoice list
FIX: #6051
FIX: #6062
FIX: #6088
FIX: A draft can be deleted by a user with create permission.
FIX: bad permission to see contract on home page
FIX: bad permission to see contract statistics
FIX: Bcc must not appears to recipient when using SMTPs lib
FIX: Consistent description for add or edit product
FIX: delete contract extrafields on contract deletion
FIX: Deposits and credit notes weren't added in the received and pending columns
FIX: export extrafields must not include separe type
FIX: Export of opportunity status must be code, not id.
FIX: False positive on services not activated
FIX: Filter was wrong or lost during navigation
FIX: HT and TTC price should always be displayed together
FIX: if a supplier price reference is changed after creating an order, we can't clone order.
FIX: in export. Error when using a separate extrafields.
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: javascript error when using on mobile/smartphone
FIX: javascript xss injection and a translation
FIX: Label of project is in field title not label.
FIX: List of people able to validate an expense report was not complete.
FIX: Missing field
FIX: Module gravatar was not triggered on thirdparty and contact card
FIX: Must use external link into a forged email content.
FIX: Pb in management of date end of projects
FIX: Regression when deleting product
FIX: rendering of output of estimated amount on project overview page.
FIX: Sanitize title of ajax_dialog
FIX: Security to restrict email sending was not efficient
FIX: Setting supplier as client when accept a supplier proposal
FIX: Some statistics not compatible with multicompany module.
FIX: the time spent on project was not visible in its overwiew
FIX: Update intervention lline crash with PgSQL
FIX: wrong test on dict.php
FIX: wrong var name

v4.0.4

FIX: #6227 Document models table header "Unit" is shown in 2 lines in Spanish
FIX: #6230
FIX: #6237
FIX: #6245 Thirdparty link in supplier invoices list, links to "comm/card" instead of "fourn/card" page
FIX: #6253 Supplier invoice list filter does not respect "thirdparty" filter
FIX: #6277
FIX: project list and ajax completion return wrong list.
FIX: bug margin calculation by user with multicompany
FIX: Can make a stock transfert on product not on sale/purchase.
FIX: extrafield input for varchar was not working with special char within (ie double quotes)
FIX: javascript error
FIX: link for not found photo when using gravatar. Must use external url.
FIX: Protection so even if link is output for external user, links is disabled.
FIX: repair tool was ko to restore extrafields with type select.
FIX: Security access problem with external users on projects/tasks
FIX: We must not drop extrafield column if there is still record on other entities.
FIX: regression with sedning email when introducing security options to restrict nb of email sending.

v4.0.5

FIX: #6234
FIX: #6259
FIX: #6330
FIX: #6360
FIX: #6411
FIX: #6443
FIX: #6444
FIX: #6453
FIX: #6503: SQL error in "Last pending payment invoices"
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
FIX: #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
FIX: #6533 #6590
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
FIX: add entity param to document link
FIX: Can use quote into supplier ref on order line add
FIX: Change the customer code only if error on duplicate
FIX: Creation of credit note on invoice with deposit stole the discount.
FIX: delete bank class lines when we delete bank_categ
FIX: deletion of bank tag
FIX: detail of deposit and credit not was not visible into final invoice
FIX: Error management during bank account creation
FIX: error management in bank account deletion.
FIX: event status is not modified when assign an user
FIX: forgotten fk_facture_fourn attribute on supplierinvoice line object
FIX: If bank module on, field must be required to register payment of expense report.
FIX: load multicurrency informations on supplier order and bill lines fetch
FIX: Missing total on project overview.
FIX: multicurrency_subprice
FIX: param billed when we change page
FIX: protection against infinite loop on hierarchy
FIX: Supplier Order list filter by project
FIX: the dolCopyDir fails if target dir does not exists.
FIX: use param for http links

v4.0.6

FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
FIX: #6636 Complete fix
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
FIX: #6671 Cannot remove thirdparty type with "#" in its name
FIX: #6673 Missing "nature" table header in thirdparty list
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
FIX: #6813
FIX: Correction with author and validator user on orders
FIX: doactions hook missing in invoice model page
FIX: dont get empty "Incoterms : - " string if no incoterm
FIX: dont lose supplier ref if no supplier price in database
FIX: forgotten parameter for right multicompany use
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
FIX: limit+1 dosn't show Total line
FIX: supplier order line were always created with rang = 0