Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
854a6ca3d5
116
ChangeLog
116
ChangeLog
@ -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:
|
||||
|
||||
|
||||
@ -972,9 +972,11 @@ if ($nboftargetok) {
|
||||
$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`;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -249,7 +249,7 @@ $tabfield[6] = "code,libelle,type,color,position";
|
||||
$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";
|
||||
@ -286,7 +286,7 @@ $tabfieldvalue[6] = "code,libelle,type,color,position";
|
||||
$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";
|
||||
@ -323,7 +323,7 @@ $tabfieldinsert[6] = "code,libelle,type,color,position";
|
||||
$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";
|
||||
|
||||
@ -1440,7 +1440,7 @@ if (empty($reshook))
|
||||
{
|
||||
if (GETPOST('type') < 0 && ! GETPOST('search_idprod'))
|
||||
{
|
||||
setEventMessages($langs->trans('ErrorChooseBetweenFreeAntryOrPredefinedProduct'), null, 'errors');
|
||||
setEventMessages($langs->trans('ErrorChooseBetweenFreeEntryOrPredefinedProduct'), null, 'errors');
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1278,6 +1278,15 @@ class Contrat extends CommonObject
|
||||
//// 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)
|
||||
|
||||
@ -5023,7 +5023,7 @@ abstract class CommonObject
|
||||
*/
|
||||
public function createFromCloneCommon(User $user, $fromid)
|
||||
{
|
||||
global $user;
|
||||
global $user, $langs;
|
||||
|
||||
$error = 0;
|
||||
|
||||
@ -5039,6 +5039,8 @@ abstract class CommonObject
|
||||
$object->id = 0;
|
||||
|
||||
// Clear fields
|
||||
$object->ref = "copy_of_".$object->ref;
|
||||
$object->title = $langs->trans("CopyOf")." ".$object->title;
|
||||
// ...
|
||||
|
||||
// Create clone
|
||||
@ -5046,7 +5048,8 @@ abstract class CommonObject
|
||||
|
||||
// Other options
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
$error++;
|
||||
$this->error = $object->error;
|
||||
$this->errors = $object->errors;
|
||||
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
@ -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)
|
||||
{
|
||||
@ -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.
|
||||
*
|
||||
|
||||
@ -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'].",";
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -13,7 +13,7 @@ FilesForObjectInitialized=Files for new object '%s' initialized
|
||||
FilesForObjectUpdated=Files for object '%s' updated (.sql files and .class.php file)
|
||||
ModuleBuilderDescdescription=Enter here all general information that describe your module
|
||||
ModuleBuilderDescspecifications=You can enter here a long text to describe the specifications of your module that is not already structured into other tabs. So you have within easy reach all the rules to develop. Also this text content will be included into the generated documentation (see last tab). You can use Markdown format, but it is recommanded to use Asciidoc format (Comparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown)
|
||||
ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A sql file, a page to list them, to create/edit/view a card and an API will be generated.
|
||||
ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A CRUD DAO class, SQL files, page to list record of objects, to create/edit/view a record and an API will be generated.
|
||||
ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module.
|
||||
ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module.
|
||||
ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file.
|
||||
|
||||
@ -217,6 +217,46 @@ if ($dirins && $action == 'initobject' && $module && $objectname)
|
||||
else
|
||||
{
|
||||
// Copy is ok
|
||||
if ($destfile == 'class/'.$objectname.'.txt')
|
||||
{
|
||||
// Regenerate left menu entry in descriptor
|
||||
$stringtoadd='';
|
||||
// TODO Loop on each .txt file in class dir.
|
||||
$stringtoadd.="
|
||||
\t\t\$this->menu[\$r++]=array(
|
||||
'fk_menu'=>'fk_mainmenu=mymodule', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'List MyObject',
|
||||
'mainmenu'=>'mymodule',
|
||||
'leftmenu'=>'mymodule_myobject',
|
||||
'url'=>'/mymodule/myobject_list.php',
|
||||
'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1100+\$r,
|
||||
'enabled'=>'\$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '\$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '\$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'1', // Use 'perms'=>'\$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
\t\t\$this->menu[\$r++]=array(
|
||||
'fk_menu'=>'fk_mainmenu=mymodule,fk_leftmenu=mymodule_myobject', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'New MyObject',
|
||||
'mainmenu'=>'mymodule',
|
||||
'leftmenu'=>'mymodule_myobject',
|
||||
'url'=>'/mymodule/myobject_card.php?action=create',
|
||||
'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>1100+\$r,
|
||||
'enabled'=>'\$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '\$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '\$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'1', // Use 'perms'=>'\$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
";
|
||||
$moduledescriptorfile=$dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
|
||||
// TODO Allow a replace with regex using dolReplaceRegexInFile
|
||||
dolReplaceInFile($moduledescriptorfile, array('END MODULEBUILDER LEFTMENU MYOBJECT */' => '*/'."\n".$stringtoadd."\n\t\t/* END MODULEBUILDER LEFTMENU MYOBJECT */"));
|
||||
|
||||
// Add module descriptor to list of files to replace "MyObject' string with real name of object.
|
||||
$filetogenerate[]='core/modules/mod'.$module.'.class.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1205,11 +1245,13 @@ elseif (! empty($module))
|
||||
print $form->textwithpicto($langs->trans("Label"), $langs->trans("YouCanUseTranslationKey"));
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Position").'</td>';
|
||||
print '<td class="center">'.$langs->trans("NotNull").'</td>';
|
||||
print '<td class="center">'.$langs->trans("SearchAll").'</td>';
|
||||
//print '<td>'.$langs->trans("DefaultValue").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DatabaseIndex").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Enabled").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Visible").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Position").'</td>';
|
||||
print '<td class="center">'.$langs->trans("SearchAll").'</td>';
|
||||
print '<td>'.$langs->trans("Comment").'</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
@ -1217,11 +1259,13 @@ elseif (! empty($module))
|
||||
print '<td><input class="text" name="propname" value=""></td>';
|
||||
print '<td><input class="text" name="proplabel" value=""></td>';
|
||||
print '<td><input class="text" name="proptype" value=""></td>';
|
||||
print '<td class="right"><input class="text right" size="2" name="propposition" value=""></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propnotnull" value=""></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propsearchall" value=""></td>';
|
||||
//print '<td><input class="text" name="propdefault" value=""></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propindex" value=""></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propenabled" value=""></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propvisible" value=""></td>';
|
||||
print '<td class="right"><input class="text right" size="2" name="propposition" value=""></td>';
|
||||
print '<td class="center"><input class="text" size="2" name="propsearchall" value=""></td>';
|
||||
print '<td><input class="text" name="propcomment" value=""></td>';
|
||||
print '<td align="center">';
|
||||
print '<input class="button" type="submit" name="add" value="'.$langs->trans("Add").'">';
|
||||
@ -1253,6 +1297,8 @@ elseif (! empty($module))
|
||||
$propsearchall=$propval['searchall'];
|
||||
//$propdefault=$propval['default'];
|
||||
$propindex=$propval['index'];
|
||||
$propenabled=$propval['enabled'];
|
||||
$propvisible=$propval['visible'];
|
||||
$propcomment=$propval['comment'];
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -1266,21 +1312,27 @@ elseif (! empty($module))
|
||||
print '<td>';
|
||||
print $proptype;
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print $propposition;
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $propnotnull?'X':'';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $propsearchall?'X':'';
|
||||
print '</td>';
|
||||
/*print '<td>';
|
||||
print $propdefault;
|
||||
print '</td>';*/
|
||||
print '<td class="center">';
|
||||
print $propindex?'X':'';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $propenabled?$propenabled:'';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $propvisible?$propvisible:'';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print $propposition;
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $propsearchall?'X':'';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $propcomment;
|
||||
print '</td>';
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
use Luracast\Restler\RestException;
|
||||
|
||||
/**
|
||||
* \file htdocs/modulebuilder/template/class/myobject_api_class.class.php
|
||||
* \file htdocs/modulebuilder/template/class/api_myobject.class.php
|
||||
* \ingroup mymodule
|
||||
* \brief File for API management of myobject.
|
||||
*/
|
||||
|
||||
@ -63,12 +63,12 @@ class MyObject extends CommonObject
|
||||
* @var array Array with all fields and their property
|
||||
*/
|
||||
public $fields=array(
|
||||
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'position'=>10, 'notnull'=>true, 'index'=>true, 'searchall'=>1, 'comment'=>'Reference of object'),
|
||||
'entity'=>array('type'=>'integer', 'label'=>'Entity', 'notnull'=>true, 'index'=>true),
|
||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'searchall'=>1),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'notnull'=>true, 'position'=>500),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'notnull'=>true, 'position'=>500),
|
||||
'status'=>array('type'=>'integer', 'label'=>'Status', 'index'=>true, 'position'=>1000),
|
||||
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>true, 'index'=>true, 'visible'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
||||
'entity'=>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>true, 'index'=>true, 'visible'=>0, 'position'=>20),
|
||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'visible'=>1, 'searchall'=>1),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'visible'=>-1, 'position'=>500),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'visible'=>-1, 'position'=>500),
|
||||
'status'=>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'visible'=>1, 'position'=>1000),
|
||||
);
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ class modMyModule extends DolibarrModules
|
||||
|
||||
// Example to declare a new Top Menu entry and its Left menu entry:
|
||||
/* BEGIN MODULEBUILDER TOPMENU */
|
||||
$this->menu[$r]=array( 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
$this->menu[$r++]=array('fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'top', // This is a Top menu entry
|
||||
'titre'=>'MyModule',
|
||||
'mainmenu'=>'mymodule',
|
||||
@ -238,12 +238,12 @@ class modMyModule extends DolibarrModules
|
||||
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// $r++;
|
||||
|
||||
/* END MODULEBUILDER TOPMENU */
|
||||
|
||||
// Example to declare a Left Menu entry into an existing Top menu entry:
|
||||
/* BEGIN MODULEBUILDER LEFTMENU MYOBJECT
|
||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=mymodule', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
$this->menu[$r++]=array( 'fk_menu'=>'fk_mainmenu=mymodule', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'List MyObject',
|
||||
'mainmenu'=>'mymodule',
|
||||
@ -255,8 +255,7 @@ class modMyModule extends DolibarrModules
|
||||
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
$r++;
|
||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=mymodule&fk_leftmenu=mymodule', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
$this->menu[$r++]=array( 'fk_menu'=>'fk_mainmenu=mymodule,fk_leftmenu=mymodule', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'New MyObject',
|
||||
'mainmenu'=>'mymodule',
|
||||
@ -268,7 +267,6 @@ class modMyModule extends DolibarrModules
|
||||
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
$r++;
|
||||
END MODULEBUILDER LEFTMENU MYOBJECT */
|
||||
|
||||
|
||||
|
||||
@ -123,7 +123,8 @@ foreach($object->fields as $key => $val)
|
||||
$arrayfields=array();
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
$arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>1);
|
||||
// If $val['visible']==0, then we never show the field
|
||||
if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled']);
|
||||
}
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user