Skip to content

Commit

Permalink
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 22, 2017
2 parents f97ecd0 + 4803f2d commit 854a6ca
Show file tree
Hide file tree
Showing 22 changed files with 253 additions and 39 deletions.
116 changes: 116 additions & 0 deletions ChangeLog
Expand Up @@ -9,10 +9,126 @@ English Dolibarr ChangeLog

***** ChangeLog for 6.0.0 compared to 5.0.* *****

NEW: Add experimental BlockeLog module (to log business events in a non reversible log file).
NEW: Add a payment module for Stripe.
NEW: Add module "Product variant" (like red, blue for the product shoes)
NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC)
NEW: Add a tracking id into mass emailing.
NEW: Add calculation function for Loan schedule
NEW: Add "depends on" and "required by" into module informations
NEW: Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO
NEW: Add key __USERID__ and __ENTITYID__ as key for dynamic filters.
NEW: Add last activation author and ip of modules
NEW: Add mass actions (pdf merge and delete) for interventions
NEW: Add module resources import/export
NEW: Add option PROJECT_THIRDPARTY_REQUIRED
NEW: Add page statistics for project tasks
NEW: add property to show warnings when activating modules
NEW: add rapport file for supplier paiement
NEW: Add statistics on supplier tab.
NEW: Add tooltip help on shipment weight and volume calculation
NEW: An external module can hook and add mass actions
NEW: Better reponsive design
NEW: Bookmarks are into a combo list.
NEW: Bulk actions available on supplier orders
NEW: Can add a background image on login page
NEW: Can change customer from POS
NEW: Can clone expense report on another user
NEW: Can control constants values into file integrity checker
NEW: Can define default values for create forms.
NEW: Can define default filters for list pages.
NEW: Can define default sort order for list pages.
NEW: Can deploy an external module from the module setup area.
NEW: Can disable all overwrote translations in one click.
NEW: Can edit background color for odd and even lines in tables
NEW: Can filter on code in dictionnaries
NEW: Can filter on year and product tags on the product statistic page
NEW: Can import users
NEW: Can read time spent of others (hierarchy only or all if granted)
NEW: Can send an email to a user from its card.
NEW: Can send email to multiple destinaries from the mailform combo list.
NEW: Can set margins of PDFs
NEW: Can set number of dump to keep with job "local database backup"
NEW: Can sort customer balance summary on date.
NEW: Can sort thumbs visible on product card.
NEW: Can use a credit note into a "down payment/deposit".
NEW: Can use dol_fiche_end without showing bottom border.
NEW: Can use translations into all substitutions (watermark, freetext...)
NEW: Change to allow a specific numbering rule for invoice with POS module.
NEW: convert exceiss received to reduc
NEW: custom dir is enabled dy default on first install.
NEW: Description of feature of a module visible into a dedicated popup.
NEW: Direct open of card after a search if one record only found.
NEW: download button
NEW: Enable bulk actions delete on supplier invoices.
NEW: Extrafields support formulas to be computed using PHP expressions.
NEW: Feature to crop/resize images available on user and expense reports.
NEW: Filechecker can include custom dir and report added files.
NEW: fix listview class and add a demo for product list
NEW: [FP17] Accountancy - Add select field in list of accounts
NEW: get amount base on hourly rate for ficheinter
NEW: hidden Easter egg to display commitstrip strip on login page
NEW: Include an hourglass icon when we click on online payment button
NEW: Index upload files into database.
NEW: Introduce mass action on product list ('delete' for the moment)
NEW: Introduce mass actions on contacts
NEW: Introduce option MAIN_HTTP_CONTENT_SECURITY_POLICY
NEW: It's easier to switch between sandbox and live for paypal
NEW: Mass action delete available on project and tasks
NEW: Move login information on home page into a widget
NEW: new demo entry page
NEW: No external check of version without explicit click in about page.
NEW: ODT docs for USER USERGROUP CONTRACT and PRODUCT class
NEW: odt usergroup
NEW: On invoices generated by template, we save if invoice come from a source template.
NEW: option to copy into attachement files of events, files send by mail (with auto event creation)
NEW: PDF with numbertoword
NEW: Permit multiple file upload in linked documents
NEW: PHP 7.1 compatibility
NEW: Reduce memory usage by removing deprecated constant loading.
NEW: Report page and menu for suppliers paiements
NEW: Show by default README.md file found into root dir of ext module.
NEW: Show company into combo list of projects
NEW: show files in the bank statement + download
NEW: Show local taxes in facture list
NEW: Show local taxes in supplier facture list
NEW: Small PDF template for products
NEW: Option SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT
NEW: The substitution keys available for emailing edition are now visible into a popup.
NEW: Uniformize behaviour: Action to make order is an action button.
NEW: Use autocompletion on the "Add widget list".
NEW: Use html5 type "number" on select field for year and duration.
NEW: Can use pdktk to concat mass pdf because tcpdf generate avoid to split large file into multiple smaller file (all have same size) encounter issue with mailer provider virtual delivery service
NEW: Default theme of v6 is cleaner.
NEW: When down payment is entered, discount to reuse into final invoice is automatically created. This save one click into invoice workflow.
NEW: Add UI to configure MEMBER_NEWFORM_FORCETYPE
NEW: #2763 Go to document block after clicking in Generate document button
NEW: #6280: Generate PDF after creating an invoice from a customer order
NEW: #6915 Simplest change.
NEW: Uniformize the look and feel with v6 new look.

For developers:
NEW: Add a lot of API REST: dictionaryevents, memberstypes, ...
NEW: Big refactorization of multicompany transverse mode.
NEW: getEntity function use true $shared value by default.
NEW: Add font-awesome css.
NEW: Add function ajax_autoselect
NEW: Add function dolMd2Html
NEW: Add hook doUpgrade2
NEW: Add hook "formatNotificationMessage"
NEW: Add index and constraints keys on supplier proposal detail table
NEW: Add phpunit to check the engine is defined into sql create files.
NEW: Add project and Hook to Loan
NEW: Add REST API to push a file.
NEW: Allow extrafields list select to be dependands on other standard list and not only other extrafields list
NEW: Architecture to manage search criteria persistance (using save_lastsearch_values=1 on exit links and restore_lastsearch_values=1 in entry links)
NEW: data files are now also parsed by phpunit for sql syntax
NEW: Hook to allow inserting custom product head #6001
NEW: Introduce fields that can be computed during export in export profiles.
NEW: Introduce function dol_compress_dir
NEW: Removed commande_pdf_create, contract_pdf_create,expedition_pdf_create, facture_pdf_create, delivery_order_pdf_create, task_pdf_create, project_pdf_create, propale_pdf_create, supplier_invoice_pdf_create, supplier_order_pdf_create, supplier_proposal_pdf_create deprecated functions
NEW: tooltip can be on hover or on click with textwithpicto function.
NEW: Upgrade jquery to 3.3.1 and jquery-ui to 1.12

WARNING:

Expand Down
4 changes: 3 additions & 1 deletion build/makepack-dolibarr.pl
Expand Up @@ -972,9 +972,11 @@
$ret=`$cmd`;
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/actions_mymodule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_myobject.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject_api_class.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`;
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_fedora.spec
Expand Up @@ -162,6 +162,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_generic.spec
Expand Up @@ -242,6 +242,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_mandriva.spec
Expand Up @@ -159,6 +159,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
Expand Down
1 change: 1 addition & 0 deletions build/rpm/dolibarr_opensuse.spec
Expand Up @@ -170,6 +170,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
Expand Down
6 changes: 3 additions & 3 deletions htdocs/admin/dict.php
Expand Up @@ -249,7 +249,7 @@
$tabfield[7] = "code,libelle,country,accountancy_code,deductible";
$tabfield[8] = "code,libelle,country_id,country".(! empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?',position':'');
$tabfield[9] = "code,label,unicode";
$tabfield[10]= "country_id,country,code,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note";
$tabfield[10]= "country_id,country,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note";
$tabfield[11]= "element,source,code,libelle,position";
$tabfield[12]= "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder";
$tabfield[13]= "code,libelle,type,accountancy_code";
Expand Down Expand Up @@ -286,7 +286,7 @@
$tabfieldvalue[7] = "code,libelle,country,accountancy_code,deductible";
$tabfieldvalue[8] = "code,libelle,country".(! empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?',position':'');
$tabfieldvalue[9] = "code,label,unicode";
$tabfieldvalue[10]= "country,code,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note";
$tabfieldvalue[10]= "country,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note";
$tabfieldvalue[11]= "element,source,code,libelle,position";
$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder";
$tabfieldvalue[13]= "code,libelle,type,accountancy_code";
Expand Down Expand Up @@ -323,7 +323,7 @@
$tabfieldinsert[7] = "code,libelle,fk_pays,accountancy_code,deductible";
$tabfieldinsert[8] = "code,libelle,fk_country".(! empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?',position':'');
$tabfieldinsert[9] = "code_iso,label,unicode";
$tabfieldinsert[10]= "fk_pays,code,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note";
$tabfieldinsert[10]= "fk_pays,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note";
$tabfieldinsert[11]= "element,source,code,libelle,position";
$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder";
$tabfieldinsert[13]= "code,libelle,type,accountancy_code";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture/card.php
Expand Up @@ -1440,7 +1440,7 @@
{
if (GETPOST('type') < 0 && ! GETPOST('search_idprod'))
{
setEventMessages($langs->trans('ErrorChooseBetweenFreeAntryOrPredefinedProduct'), null, 'errors');
setEventMessages($langs->trans('ErrorChooseBetweenFreeEntryOrPredefinedProduct'), null, 'errors');
$error ++;
}
}
Expand Down
9 changes: 9 additions & 0 deletions htdocs/contrat/class/contrat.class.php
Expand Up @@ -1278,6 +1278,15 @@ function update($user=null, $notrigger=0)
//// End call triggers
}
}

if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}

// Commit or rollback
if ($error)
Expand Down
7 changes: 5 additions & 2 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -5023,7 +5023,7 @@ public function createCommon(User $user, $notrigger = false)
*/
public function createFromCloneCommon(User $user, $fromid)
{
global $user;
global $user, $langs;

$error = 0;

Expand All @@ -5039,14 +5039,17 @@ public function createFromCloneCommon(User $user, $fromid)
$object->id = 0;

// Clear fields
$object->ref = "copy_of_".$object->ref;
$object->title = $langs->trans("CopyOf")." ".$object->title;
// ...

// Create clone
$result = $object->createCommon($user);

// Other options
if ($result < 0) {
$error ++;
$error++;
$this->error = $object->error;
$this->errors = $object->errors;
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
}
Expand Down
21 changes: 19 additions & 2 deletions htdocs/core/lib/files.lib.php
Expand Up @@ -448,12 +448,12 @@ function dol_filemtime($pathoffile)
* Make replacement of strings into a file.
*
* @param string $srcfile Source file (can't be a directory)
* @param array $arrayreplacement Array with strings to replace
* @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...)
* @param string $destfile Destination file (can't be a directory). If empty, will be same than source file.
* @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666'
* @param int $indexdatabase Index new file into database.
* @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK
* @see dolCopyr
* @see dolCopyr dolReplaceRegExInFile
*/
function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0)
{
Expand Down Expand Up @@ -514,6 +514,23 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0,
return 1;
}

/**
* Make replacement of strings into a file.
*
* @param string $srcfile Source file (can't be a directory)
* @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...)
* @param string $destfile Destination file (can't be a directory). If empty, will be same than source file.
* @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666'
* @param int $indexdatabase Index new file into database.
* @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK
* @see dolCopyr dolReplaceInFile
*/
function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0)
{
// TODO

}

/**
* Copy a file to another file.
*
Expand Down
2 changes: 2 additions & 0 deletions htdocs/core/lib/modulebuilder.lib.php
Expand Up @@ -77,6 +77,8 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask)
$i++;
$typephp='';
$texttoinsert.= "\t\t'".$key."' => array('type'=>'".$val['type']."', 'label'=>'".$val['label']."',";
$texttoinsert.= " 'visible'=>".$val['visible'].",";
$texttoinsert.= " 'enabled'=>".$val['enabled'].",";
if ($val['position']) $texttoinsert.= " 'position'=>".$val['position'].",";
if ($val['notnull']) $texttoinsert.= " 'notnull'=>".$val['notnull'].",";
if ($val['index']) $texttoinsert.= " 'index'=>".$val['index'].",";
Expand Down
11 changes: 7 additions & 4 deletions htdocs/install/mysql/data/llx_c_tva.sql
Expand Up @@ -133,10 +133,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 3
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '0','0','VAT Rate 0',1);

-- INDIA (id country=117)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '12.5','0','VAT standard rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1172, 117, '4','0','VAT reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1173, 117, '1','0','VAT super-reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1174, 117, '0','0','VAT Rate 0',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '12.5','0','VAT standard rate',0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1172, 117, '4','0','VAT reduced rate',0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1173, 117, '1','0','VAT super-reduced rate',0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1174, 117, '0','0','VAT Rate 0',0);

insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1176, 117, 'IGST+CGST', 8, 8, '1', 0, '0', 0, 'IGST+CGST', 1);
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1177, 117, 'SGST', 0, 0, '0', 16, '1', 0, 'SGST', 1);

-- IRELAND (id country=8)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (81, 8, '0','0','VAT Rate 0',1);
Expand Down
3 changes: 3 additions & 0 deletions htdocs/install/mysql/migration/5.0.0-6.0.0.sql
Expand Up @@ -577,3 +577,6 @@ ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_url varchar(255);
-- VPGSQL8.2 CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_website FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
-- VPGSQL8.2 CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_website_page FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();


insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1176, 117, 'IGST-CGST', 8, 8, '1', 0, '0', 0, 'IGST-CGST', 1);
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1177, 117, 'SGST', 0, 0, '0', 16, '1', 0, 'SGST', 1);
4 changes: 4 additions & 0 deletions htdocs/langs/en_IN/main.lang
Expand Up @@ -24,3 +24,7 @@ LinkToProposal=Link to quotation
LinkToSupplierProposal=Link to supplier quotation
SearchIntoCustomerProposals=Customer quotations
SearchIntoSupplierProposals=Supplier quotations

AmountVAT=Amount tax IGST
AmountLT1=Amount tax CGST
AmountLT2=Amount tax SGST
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/admin.lang
Expand Up @@ -1058,7 +1058,7 @@ RestoreDesc2=Restore archive file (zip file for example) of documents directory
RestoreDesc3=Restore the data, from a backup dump file, into the database of the new Dolibarr installation or into the database of this current installation (<b>%s</b>). Warning, once restore is finished, you must use a login/password, that existed when backup was made, to connect again. To restore a backup database into this current installation, you can follow this assistant.
RestoreMySQL=MySQL import
ForcedToByAModule= This rule is forced to <b>%s</b> by an activated module
PreviousDumpFiles=Available database backup dump files
PreviousDumpFiles=Generated database backup files
WeekStartOnDay=First day of week
RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Programs version %s differs from database version %s)
YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password.
Expand Down

0 comments on commit 854a6ca

Please sign in to comment.