Merge branch 'develop' into hotfix/docker-ziparchive
10
.github/ISSUE_TEMPLATE/custom.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Custom issue template
|
||||
about: Describe this issue template's purpose here.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
22
.gitignore
vendored
@ -1,5 +1,7 @@
|
||||
htdocs/conf/conf.php
|
||||
htdocs/conf/conf.php.old
|
||||
htdocs/conf/conf.php.sav
|
||||
htdocs/conf/conf.php.back
|
||||
documents/
|
||||
custom2/
|
||||
test/report/
|
||||
@ -8,21 +10,33 @@ default.properties
|
||||
.settings/
|
||||
.buildpath
|
||||
.gitmodules
|
||||
dolibarr_install.log
|
||||
upgrade.log
|
||||
doxygen_warnings.log
|
||||
/.project
|
||||
/.pydevproject
|
||||
/.vscode
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
Thumbs.db
|
||||
/dolibarr_genesis.mp4
|
||||
# Log files
|
||||
dolibarr_install.log
|
||||
upgrade.log
|
||||
doxygen_warnings.log
|
||||
# Vagrant generated files
|
||||
.vagrant
|
||||
# Composer installed repositories
|
||||
/htdocs/includes/**/.git
|
||||
# Composer autoloader and unwanted files
|
||||
composer.phar
|
||||
htdocs/includes/autoload.php
|
||||
htdocs/includes/bin/
|
||||
htdocs/includes/composer/
|
||||
/.pydevproject
|
||||
htdocs/includes/doctrine/
|
||||
htdocs/includes/jakub-onderka/
|
||||
htdocs/includes/phpdocumentor/
|
||||
htdocs/includes/phpspec/
|
||||
htdocs/includes/phpunit/
|
||||
htdocs/includes/sebastian/
|
||||
htdocs/includes/squizlabs/
|
||||
htdocs/includes/symfony/
|
||||
htdocs/includes/webmozart/
|
||||
|
||||
@ -8,3 +8,7 @@ linters:
|
||||
|
||||
fixers:
|
||||
enable: true
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- 'htdocs/includes/*'
|
||||
|
||||
93
.travis.yml
@ -29,12 +29,12 @@ addons:
|
||||
- pgloader
|
||||
|
||||
php:
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- nightly
|
||||
|
||||
env:
|
||||
@ -59,22 +59,22 @@ matrix:
|
||||
- php: nightly
|
||||
# We exclude some combinations not usefull to save Travis CPU
|
||||
exclude:
|
||||
- php: '5.6'
|
||||
env: DB=mariadb
|
||||
- php: '7.0'
|
||||
env: DB=mariadb
|
||||
- php: '7.1'
|
||||
env: DB=mariadb
|
||||
- php: '7.2'
|
||||
env: DB=mariadb
|
||||
- php: '5.6'
|
||||
env: DB=postgresql
|
||||
- php: '7.3'
|
||||
env: DB=mariadb
|
||||
- php: '7.0'
|
||||
env: DB=postgresql
|
||||
- php: '7.1'
|
||||
env: DB=postgresql
|
||||
- php: '7.2'
|
||||
env: DB=postgresql
|
||||
- php: '7.3'
|
||||
env: DB=postgresql
|
||||
- php: nightly
|
||||
env: DB=postgresql
|
||||
|
||||
@ -125,7 +125,7 @@ install:
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \
|
||||
[ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ]; then
|
||||
[ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
|
||||
composer -n require phpunit/phpunit ^5 \
|
||||
jakub-onderka/php-parallel-lint ^0 \
|
||||
jakub-onderka/php-console-highlighter ^0 \
|
||||
@ -200,6 +200,7 @@ before_script:
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/dolibarr_9 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev
|
||||
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
@ -209,7 +210,6 @@ before_script:
|
||||
#echo 'select * from information_schema.table_constraints;' | psql travis
|
||||
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo
|
||||
|
||||
- |
|
||||
@ -222,6 +222,7 @@ before_script:
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
|
||||
@ -230,7 +231,6 @@ before_script:
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
echo
|
||||
@ -248,7 +248,7 @@ before_script:
|
||||
# enable php-fpm
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- |
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
@ -285,7 +285,7 @@ script:
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
set +e
|
||||
echo
|
||||
|
||||
@ -299,9 +299,69 @@ script:
|
||||
set +e
|
||||
echo
|
||||
|
||||
# TODO: Check Javascript (jshint?)
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
|
||||
# TODO: Check CSS (csslint?)
|
||||
#- |
|
||||
# echo "Installing Dolibarr"
|
||||
# cd htdocs/install
|
||||
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
|
||||
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
|
||||
# if [ "$?" -ne "0" ]; then
|
||||
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
|
||||
# cat $TRAVIS_BUILD_DIR/install.log
|
||||
# exit 1
|
||||
# fi
|
||||
# cd ../..
|
||||
# rm $INSTALL_FORCED_FILE
|
||||
# #cat $TRAVIS_BUILD_DIR/install.log
|
||||
# set +e
|
||||
# echo
|
||||
|
||||
- |
|
||||
echo "Setting up database to test migrations"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
|
||||
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis
|
||||
#echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis
|
||||
#echo 'select * from information_schema.table_constraints;' | psql travis
|
||||
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
@ -341,9 +401,12 @@ script:
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||
# Enable modules not enabled into original dump
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo $?
|
||||
|
||||
@ -410,3 +410,9 @@ source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.zapier]
|
||||
file_filter = htdocs/langs/<lang>/zapier.lang
|
||||
source_file = htdocs/langs/en_US/zapier.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
6
COPYING
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
16
COPYRIGHT
@ -2,10 +2,10 @@
|
||||
License
|
||||
-------
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as
|
||||
Dolibarr is released under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of the License,
|
||||
or (at your option) any later version (GPL-3+).
|
||||
More information: http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
More information: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
Dolibarr uses some external libraries released under different licenses. This is compatibility summary:
|
||||
|
||||
@ -15,13 +15,13 @@ PHP libraries:
|
||||
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.83 MIT License Yes Detect mobile devices browsers
|
||||
Mobiledetect 2.8.33 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
@ -33,10 +33,11 @@ Restler 3.0.0RC6 LGPL-3+ Yes
|
||||
Sabre 3.2.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 6.41 MIT licence Yes Library for Stripe module
|
||||
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
|
||||
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
JS libraries:
|
||||
Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
jQuery 3.4.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||
@ -54,7 +55,6 @@ jQuery Timepicker 1.1.0 GPL and MIT License Yes
|
||||
jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
|
||||
Image libraries:
|
||||
Octicons 8.1 MIT Yes
|
||||
@ -64,7 +64,7 @@ Fontawesome 5.7.2 Font Awesome Free licence Yes
|
||||
|
||||
|
||||
For licenses compatibility informations:
|
||||
http://www.gnu.org/licenses/licenses.en.html
|
||||
https://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Copyright / Authors
|
||||
|
||||
361
ChangeLog
@ -3,13 +3,209 @@ English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
***** ChangeLog for 11.0.0 compared to 10.0.0 *****
|
||||
***** ChangeLog for 12.0.0 compared to 11.0.0 *****
|
||||
For Users:
|
||||
|
||||
|
||||
For Developers:
|
||||
For Developers or integrators:
|
||||
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* PHP 5.5 is no more supported. Minimum PHP is now 5.6+.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 11.0.0 compared to 10.0.0 *****
|
||||
For Users:
|
||||
|
||||
NEW: Module BOM is now stable.
|
||||
NEW: Module MO - Manufacturing Order available with experimental status.
|
||||
NEW: Can set the Address/Contact by default on third parties.
|
||||
NEW: Add a dictionary to edit list of Social networks.
|
||||
NEW: A nicer dashboard for open elements on Home page.
|
||||
NEW: Add task widget and add task progress bar
|
||||
NEW: Support of deployment of metapackages
|
||||
NEW: Menu "Export accounting document" to generate a zip with all documents requested by a bookkeeper is now stable.
|
||||
NEW: Add button "Save and Stay" in website editor of pages.
|
||||
NEW: Accountancy - Can add specific widget in this accountancy area.
|
||||
NEW: Accountancy - Add export model LDCompta V9 & higher
|
||||
NEW: Accountancy - Add permission on export, delete operations in ledger
|
||||
NEW: add ability to edit price without tax before adding a line of a predefined product.
|
||||
NEW: Add a tab to setup "Opening hours" of company (information only).
|
||||
NEW: Add attendee to ical export + cleanup.
|
||||
NEW: Add bank data of users into the expense report exports.
|
||||
NEW: add clone customers prices in clone product or service.
|
||||
NEW: Add column of module source and POS terminal in the invoice list.
|
||||
NEW: Add column last modification date into the table of targets for emailing.
|
||||
NEW: Add column VAT rate in product list
|
||||
NEW: add constant DISPATCH_FORCE_QTY_INPUT
|
||||
NEW: Add constant MAIN_DISABLE_GLOBAL_WORKBOARD to disable workboard in home page
|
||||
NEW: add country code in import product model
|
||||
NEW: Add 'Direct Cash Payment' button in TakePOS
|
||||
NEW: Add odt support to supplier orders
|
||||
NEW: Add feature to search a string into website containers
|
||||
NEW: Add GET and POST /supplierinvoices/payments REST API endpoints.
|
||||
NEW: Show progress bar for declared progression of tasks.
|
||||
NEW: Add last change date in page "Other setup". Can sort page on name/date.
|
||||
NEW: Add link to export targets of an emailings into a CSV file.
|
||||
NEW: Add link to the public interface on the ticket card.
|
||||
NEW: Add location into event tooltip. Use full day for fullday events
|
||||
NEW: add MAIN_LANGUAGES_ALLOWED constant to limit languages displayed.
|
||||
NEW: add MAIN_SHOW_COMPANY_NAME_IN_BANNER_ADDRESS constant.
|
||||
NEW: add mass actions in shipment list.
|
||||
NEW: add minimum stock filter in load warehoues for product form.
|
||||
NEW: add name_alias in fields used for quick search.
|
||||
NEW: add new rule fetchidfromcodeandlabel for categories import.
|
||||
NEW: add office phone for salespresentatives
|
||||
NEW: add office phone & job on user tooltips
|
||||
NEW: Add option MAIN_PDF_FORCE_FONT_SIZE
|
||||
NEW: Add option MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS
|
||||
NEW: Add option WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL
|
||||
NEW: Add pagination on list of object of a category
|
||||
NEW: add parent category id or label in import category module
|
||||
NEW: add parent id or ref column in warehouse import
|
||||
NEW: Add search into template
|
||||
NEW: Add shipment widget
|
||||
NEW: Add statistics on product into contracts
|
||||
NEW: Add status of warehouse in the tooltip of a warehouse.
|
||||
NEW: add supplier's product list
|
||||
NEW: add units fields in buying price tab of product card
|
||||
NEW: Add units in select products lines
|
||||
NEW: Add upload document on account statement
|
||||
NEW: Add widgets for BOMs and MOs.
|
||||
NEW: Amount invoiced column in proposal list
|
||||
NEW: Ask the new label and new dates in confirm popup when cloning tax
|
||||
NEW: auto set closing date and user on invoice
|
||||
NEW: Avoid wrap between picto and text on getNomUrl
|
||||
NEW: Balance Stripe connect account for supplier
|
||||
NEW: Bank Add an option for colorize background color of debit or credit movement
|
||||
NEW: Beautify the select box of warehouses
|
||||
NEW: Add birthday widget for members
|
||||
NEW: Widgets uses fiscal year.
|
||||
NEW: Can change supplier when cloning a Purchase Order.
|
||||
NEW: can choose lines to keep while creating order from origin
|
||||
NEW: Can crop/resize image attached on a bank record
|
||||
NEW: Can edit date or RUM mandate.
|
||||
NEW: Can edit link to the translation page in website module
|
||||
NEW: Can edit the price of predefined product during adding in documents
|
||||
NEW: Can enter price tax incl on vendor proposal and purchase orders
|
||||
NEW: Can filter on description on bank account transaction lists.
|
||||
NEW: Can filter on label on invoice in accounting vendor binding pages
|
||||
NEW: Can load multilang translation in same step than fetch_lines
|
||||
NEW: Can restrict access using DAV module to some host IPs only
|
||||
NEW: Can restrict API usage to some IP only
|
||||
NEW: Can select website templates from available default templates with a preview.
|
||||
NEW: Can set a squarred icon on your company setup
|
||||
NEW: can specify hour start end for selectDate and step for minutes
|
||||
NEW: Categories/Tags are also available on warehouses
|
||||
NEW: Check if a resource is in use in an event
|
||||
NEW: Compute column value from others columns in import module
|
||||
NEW: Copy linked categories on product clone process.
|
||||
NEW: Default mode for Stripe is STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION
|
||||
NEW: Digitaria model for numbering accountancy thirdparty
|
||||
NEW: Display membership in takepos if member linked to the thirdparty
|
||||
NEW: Display supplier in objectline if defined
|
||||
NEW: Add default duration of subscriptions on members type
|
||||
NEW: Email template for Takepos (to send invoice)
|
||||
NEW: Expense request and holiday validator fields
|
||||
NEW: Export ledger table in Charlemagne format
|
||||
NEW: Extend option ORDER_ADD_ORDERS_WITH_PARENT_PROD_IF_INCDEC for all virtual product stats (renamed into PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)
|
||||
NEW: Value "None" to unbind an invoice line and its accounting account is more visible
|
||||
NEW: FCKeditor setup for tickets
|
||||
NEW: The default theme of TakePOS work better on smartphones.
|
||||
NEW: GeoIP v2 support is natively provided -> So IPv6 is supported
|
||||
NEW: List by closing date on order list and proposal list
|
||||
NEW: Look and feel v11: Some setup pages are by default direclty in edit mode.
|
||||
NEW: Management of retained warranty on situation invoices
|
||||
NEW: Mass email action on invoice list use billing contact if exists
|
||||
NEW: more living colors for charts and option for "color bind" people
|
||||
NEW: Supports multiple payments in a TakePOS sale
|
||||
NEW: multiselect with checkbox in categories/tags search for product list
|
||||
NEW: Option to allow to create members from third-party
|
||||
NEW: Platform compliance with Stripe Connect
|
||||
NEW: print / send email form in TakePOS
|
||||
NEW: Public holidays are now in a dictionary table (no more hard coded per country)
|
||||
NEW: Better performance by reducing the $companystatic calls on some pages.
|
||||
NEW: Replace the "info" tab on contract with the more complete "agenda" tab.
|
||||
NEW: Save user of last modification in donation record.
|
||||
NEW: Show html combo list instead input text for extrafields typed as list.
|
||||
NEW: Show POS application and the terminal used on invoice card.
|
||||
NEW: Add categories/tags for stocks.
|
||||
NEW: Support Net Measure in product's card.php
|
||||
NEW: Extrafields separator can be collapsed or not
|
||||
NEW: Extrafields support on Leave requests.
|
||||
NEW: Extrafields support on Salaries.
|
||||
NEW: Extrafields support in Product supplier prices.
|
||||
NEW: Add extrafields for warehouses
|
||||
NEW: Add extrafields in export of expense report (and holiday)
|
||||
NEW: The integrity checker now show also the expected size of files.
|
||||
NEW: The order method in purchase order is now mandatory when recording an order.
|
||||
NEW: update / delete stripe account for supplier
|
||||
NEW: Use the gender of member for picto in member lists.
|
||||
NEW: Use the squarre logo as favicon of pages
|
||||
NEW: VAT list - Add date start & date end in filters
|
||||
NEW: widget box for supplier orders awaiting reception
|
||||
NEW: Update translations
|
||||
NEW: #4301
|
||||
|
||||
For Developers or integrators:
|
||||
|
||||
NEW: Compatible with PHP 7.4
|
||||
NEW: Code for extrafields uses the new array $extrafields->attributes
|
||||
NEW: Can set a filter on object linked in modulebuilder.
|
||||
NEW: Can defined a position of numbering submodules for thirdparties
|
||||
NEW: Add option multiselect for developers on the selector of language.
|
||||
NEW: Add a manifest.json.php file for web app.
|
||||
NEW: Support of deployement of metapackages
|
||||
NEW: Removed deprecated code that create linked object from ->origin
|
||||
NEW: experimental zapier for dolibarr
|
||||
NEW: Accountancy - Add hook bookkeepinglist on general ledger
|
||||
NEW: Can update product type with the update method.
|
||||
NEW: add API shipment mode dictionnary
|
||||
NEW: Add API to get Country by code and iso
|
||||
NEW: Add API to get objects by ref, ref_ext, ...
|
||||
NEW: Add anonymous telemetry
|
||||
NEW: Add a category to a contact in API
|
||||
NEW: Add fk projet on stock movement
|
||||
NEW: Add hidden option to set fields for the quick search on products.
|
||||
NEW: add hook on commongeneratedocument
|
||||
NEW: Add hook on fileupload.class.php to enable modules to override…
|
||||
NEW: Add hooks on index pages
|
||||
NEW: adding 'formObjectOptions' hooks loading at card.php of adherents module
|
||||
NEW: Add method getStructuredData for website
|
||||
NEW: Add payments GET and POST REST API endpoints for supplierinvoices.
|
||||
NEW: Add POST /bankaccounts/transfer REST API endpoint.
|
||||
NEW: add "printBucktrackInfo" hook, an external module can add info
|
||||
NEW: Add trigger DIRECT_DEBIT_ORDER_CREATE on widthdraw is missing
|
||||
NEW: API to post documents for "product" and Delete document
|
||||
NEW: add new function "setEntity()" and better compatibility with Multicompany
|
||||
NEW: Can add a button "Create" after combo of object with modulebuilder.
|
||||
NEW: contacts type dictionnary in api_setup.class.php
|
||||
NEW: Look and feel v11: Introduce CSS "trforbreak"
|
||||
NEW: list of measuring units API
|
||||
NEW: get social networks dictionary by API
|
||||
NEW: Get thirdparty's salesrepresentatives by API
|
||||
NEW: get user connected informations in REST API
|
||||
NEW: mode for list thirdparty API (add easy filter for supplier only)
|
||||
NEW: purchase_prices API
|
||||
NEW: Provides more complete demo data
|
||||
NEW: Module builder can generate CSS of JS file.
|
||||
NEW: Use a dedicated css for the pencil to edit a field.
|
||||
NEW: multilangs in fetch_lines
|
||||
NEW: Add more complete info for triggers actioncom
|
||||
NEW: add multicurrency rate at currency list API
|
||||
NEW: Add 2 hidden options to set the default sorting (sort and order) on document page.
|
||||
NEW: Add hidden option to update supplier buying price during receptions.
|
||||
NEW: Add hidden option PROPOSAL_SHOW_INVOICED_AMOUNT (not reliable if one invoice is done on several order or several proposal)
|
||||
NEW: Add hidden option SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT for add possibility to update supplier buying price in the reception on a supplier order
|
||||
NEW: Add hidden option THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER to copy extrafields from third party to order.
|
||||
NEW: Add hidden options to send by email even for object with draft status.
|
||||
NEW: Update jquery library to 3.4.1
|
||||
NEW: Upgrade ACE editor to v1.4.6
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
@ -22,10 +218,139 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Removed deprecated method actioncomm->add(), use create() instead
|
||||
* If you have developed your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...)
|
||||
* Removed function dol_micro_time. Use native PHP microtime instead.
|
||||
* The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE.
|
||||
* The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS.
|
||||
* If your logo is no more visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible again.
|
||||
* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'.
|
||||
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
|
||||
* All properties 'type_libelle' were renamed into 'type_label'.
|
||||
* Renamed property of thirdparty "statut_commercial" into "status_prospect_label"
|
||||
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
|
||||
|
||||
|
||||
***** ChangeLog for 10.0.5 compared to 10.0.4 *****
|
||||
FIX: 10.0: add URL param "restore_last_search_values=1" to all backlinks pointing to lists
|
||||
FIX: 10.0: do not display single-letter values (indicating duration unit without value) in product list
|
||||
FIX: #12473
|
||||
FIX: #12481 : fix ticket creation from thirdparty, mission $socid var
|
||||
FIX: #12482
|
||||
FIX: #12644
|
||||
FIX: #12665 Mass invoice validation with stock management
|
||||
FIX: #12688
|
||||
FIX: #12745
|
||||
FIX: add and modify category translate form with posted values on errors
|
||||
FIX: add URL param "restore_last_search_values=1" to all backlinks that point to a list
|
||||
FIX: CommandeFournisseurLigne update function must not be able to return other value than 1 if success
|
||||
FIX: contact card state address selected after filling address
|
||||
FIX: dol_string_nohtmltag when there is html with windows EOL "<br>\r\n"
|
||||
FIX: filter language is an array
|
||||
FIX: first col at wrong position in Export 2007 (new)
|
||||
FIX: getrights() request
|
||||
FIX: Invoice Situation integration into Margin
|
||||
FIX: missing nl2br conversion
|
||||
FIX: not fee in payout list
|
||||
FIX: product_fourn_price_id was assigned too late for logPrice() function
|
||||
FIX: Reduce number of request for list of products
|
||||
FIX: set due date in object in create invoice
|
||||
FIX: units traductions for selectUnits() function
|
||||
FIX: when we need to bill several orders, order lines unit is not on bill lines
|
||||
NEW: 9.0: allow users to use the mysqldump '--quick' option
|
||||
|
||||
***** ChangeLog for 10.0.4 compared to 10.0.3 *****
|
||||
FIX: The pdf templates were using the large logo making PDF too large (and edition of proposal, order, invoice VERY slow)
|
||||
FIX: #12258
|
||||
FIX: #12319 Restore feature ACCOUNTANCY_AUTOFILL_ACCOUNT_WITH_GENERIC.
|
||||
FIX: #12356
|
||||
FIX: #12372
|
||||
FIX: #12385
|
||||
FIX: Advisory ID: usd20190053
|
||||
FIX: Advisory ID: usd20190067
|
||||
FIX: Avoid fatal error when creating thumb from PDF
|
||||
FIX: compatibility with Multicompany
|
||||
FIX: display job of contact list
|
||||
FIX: Extrafields missing in export of expense report
|
||||
FIX: Hook getAccessForbiddenMessage was missing parameters
|
||||
FIX: limit 20 prevent to see all products/services
|
||||
FIX: Search on leave request ref
|
||||
FIX: security check. A user can see holiday with link without permissions
|
||||
FIX: Set unpaid of expense report
|
||||
FIX: shipping extrafields line
|
||||
FIX: the SELECT examine more than MAX_JOIN_SIZE rows #12305
|
||||
FIX: triggers: directories read with opendir() never closed
|
||||
FIX: we need to be able to recalculate tva only if invoice not in accountancy
|
||||
FIX: wrong invoice id for fetchObjetctLinked
|
||||
|
||||
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
|
||||
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
|
||||
The unit were not saved correctly in database making calculation on shipments wrong.
|
||||
Update to this version must be done if you use them and have installed version 10.0.0, 10.0.1 or 10.0.2 and set some products after installing or upgrading to one of this version.
|
||||
Once update is done you must then edit (manually) the product that has bad unit to set the correct unit to have features restored.
|
||||
|
||||
FIX: #11702
|
||||
FIX: #11861 No consistent code to manage measuring units
|
||||
FIX: #11942
|
||||
FIX: #12026
|
||||
FIX: #12040
|
||||
FIX: #12041
|
||||
FIX: #12054
|
||||
FIX: #12083
|
||||
FIX: #12088
|
||||
FIX: CVE-2019-17578 CVE-2019-17577 CVE-2019-17576
|
||||
FIX: Clean the + of categories on the product view only in POS module
|
||||
FIX: access to public interface when origin email has an alias.
|
||||
FIX: Alias name is not into the email recipient label.
|
||||
FIX: allow standalone credit note even if no invoice
|
||||
FIX: an admin can not access his own permissions after enabling advanced permissions
|
||||
FIX: Attachement of linked files on ticket when sending a message
|
||||
FIX: avoid non numeric warning
|
||||
FIX: Bad currency var used in stripe for connect
|
||||
FIX: Bad list of ticket on public interface for ticket emailcollector
|
||||
FIX: Can't modify vendor invoice if transfered into accountancy
|
||||
FIX: change product type must be allowed if we activate hidden conf
|
||||
FIX: colspan on VAT quadri report
|
||||
FIX: CSS
|
||||
FIX: Debug feature orderstoinvoice for suppliers
|
||||
FIX: do not output return code on screen after a select of bank account
|
||||
FIX: Edit of ticket module parameters erased others
|
||||
FIX: empty cache when we want to load specific warehouses in select
|
||||
FIX: escape email alias
|
||||
FIX: expedition.class.php
|
||||
FIX: Export of leave request show the number of open days
|
||||
FIX: Filtering the HTTP Header "Accept-Language".
|
||||
FIX: Filter on project on ticket list
|
||||
FIX: Filter "Open all" of ticket was ko.
|
||||
FIX: Force downlaod of file with .noexe as octet-stream mime type
|
||||
FIX: form not closed.
|
||||
FIX: hidden conf to prevent from changing product_type
|
||||
FIX: If product account not suggested during bind, it is not preselected
|
||||
FIX: If we share invoice, we need to see discount created from a deposit on each entity
|
||||
FIX: Import of product using units
|
||||
FIX: label of thirdparty is wrong on open project list
|
||||
FIX: Look and feel v10
|
||||
FIX: missing begin()
|
||||
FIX: missing "$this->id" in "fetch" function
|
||||
FIX: navigation on ticket tab of projects
|
||||
FIX: new invoice with generic thirdparty in takepos
|
||||
FIX: Pb in units of shipments
|
||||
FIX: regression with option to hide picto on top menu
|
||||
FIX: selection of project i am contact of.
|
||||
FIX: Send email from expense report card.
|
||||
FIX: shipping card: missing user error messages when classifying closed or billed
|
||||
FIX: SQL injection on qty
|
||||
FIX: stripe payment when there is a quote into address
|
||||
FIX: Substitution of __PROJECT_XXX__ not done
|
||||
FIX: TakePOS no invoice validation control and good payment translate
|
||||
FIX: the access of the bank account of one user
|
||||
FIX: top menu right padding
|
||||
FIX: Update of leave request when CSRF with token is on
|
||||
FIX: Var not enough sanitized
|
||||
FIX: wrong test
|
||||
FIX: XSS
|
||||
FIX: Payment from POS ware not recorded.
|
||||
FIX: Can validate invoice with amount including tax of zero for the case of having a final invoice with
|
||||
VAT that includes a deposit without vat.
|
||||
|
||||
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
|
||||
|
||||
FIX: #10460 compatibility with MariaDB 10.4
|
||||
FIX: #11401 Adherent unknown language key
|
||||
FIX: #11422 Can't edit his own events with standard rights
|
||||
@ -43,17 +368,17 @@ FIX: #11752
|
||||
FIX: #11789 FIX: #11790
|
||||
FIX: #11804 list of tickets from a customer card display ALL tickets
|
||||
FIX: #11834
|
||||
FIX: Add char $ and ; in sanitizing of filenames.
|
||||
FIX: Add comment before protected functions
|
||||
FIX: Add log and type of content in dolWebsiteOutput and
|
||||
FIX: Add repair.php option 'restore' to restore user picture after v10
|
||||
FIX: add char $ and ; in sanitizing of filenames
|
||||
FIX: add comment before protected functions
|
||||
FIX: add log and type of content in dolWebsiteOutput and
|
||||
FIX: add repair.php option 'restore' to restore user picture after v10
|
||||
FIX: amount opened on thirdparty card dont care of credit note not converted
|
||||
FIX: Api of documents work with value 'thirdparty'
|
||||
FIX: API of documents work with value 'thirdparty'
|
||||
FIX: author in message / ticket API
|
||||
FIX: avoid sql error if fk_project is empty during update
|
||||
FIX: avoid SQL error if fk_project is empty during update
|
||||
FIX: avoid Warning: A non-numeric value encountered
|
||||
FIX: bad consistency in list of invoice for direct debit order.
|
||||
FIX: Bad error management in zip compress and web site export
|
||||
FIX: bad consistency in list of invoice for direct debit order
|
||||
FIX: bad error management in zip compress and web site export
|
||||
FIX: bad substitution for extrafields type checkbox
|
||||
FIX: better help message with multicompany
|
||||
FIX: calculation of $products_dispatched
|
||||
@ -62,11 +387,11 @@ FIX: Can't delete a draft leave even if it should
|
||||
FIX: Can't save setup of mailman module
|
||||
FIX: column jabberid missing
|
||||
FIX: Confirmation of deletion
|
||||
FIX: Consistency in direct debit order lists.
|
||||
FIX: Consistency in direct debit order lists
|
||||
FIX: Content send before header warning
|
||||
FIX: credit note can be split
|
||||
FIX: credit note used on list
|
||||
FIX: Css was saved on wrong website.
|
||||
FIX: CSS was saved on wrong website
|
||||
FIX: delivery extrafields
|
||||
FIX: Disabling a website does not put it offline
|
||||
FIX: display only stripe sources for customer
|
||||
@ -83,13 +408,13 @@ FIX: Fatal situation if payment removed on expense report. Action
|
||||
FIX: filepath of generated documents doesn't handle products with special characters
|
||||
FIX: for MAIN_MAXTABS_IN_CARD = $i card
|
||||
FIX: gzip and bzip2 must use option -f
|
||||
FIX: It was possible to create cashfence without entering data.
|
||||
FIX: it was possible to create cashfence without entering data
|
||||
FIX: javascript error when using dol_use_jmobile=1
|
||||
FIX: logout redirect to takepos.php
|
||||
FIX: Look and feel v10
|
||||
FIX: Make protected all pfd models functions
|
||||
FIX: management of extrafields in modulebuilder
|
||||
FIX: Missing div for buttons in tax, loan, various payment modules
|
||||
FIX: missing div for buttons in tax, loan, various payment modules
|
||||
FIX: missing include (dol_convert_file not found)
|
||||
FIX: Missing some replacements in website module
|
||||
FIX: missing test on permission on button to delete ledger record
|
||||
@ -113,13 +438,13 @@ FIX: Return code of pdf_einstein.modules.php and proformat
|
||||
FIX: round for application fee in stripe
|
||||
FIX: Sens of the balance (Debit - Credit in accountancy not contrary)
|
||||
FIX: Several pb in export of documents
|
||||
FIX: SQL syntax error and CSRF check on vat reports
|
||||
FIX: SQL syntax error and CSRF check on VAT reports
|
||||
FIX: takepos layout clear or focus search
|
||||
FIX: too many record in sql request. Whena criteria is a filter, we must
|
||||
FIX: too many record in sql request. When a criteria is a filter, we must
|
||||
FIX: Translation of month
|
||||
FIX: USEDOLIBARREDITOR not always set
|
||||
FIX: VAT number for Monaco (it uses FR)
|
||||
FIX: vulenrability in uploading file found by 美创科技安全实验室
|
||||
FIX: vulnerability in uploading file found by 美创科技安全实验室
|
||||
FIX: wrong display (and hidden input) for already dispatched quantity
|
||||
FIX: wrong parameters (same error in branch 9, 10, develop)
|
||||
FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES
|
||||
|
||||
90
README-FR.md
@ -1,18 +1,17 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||

|
||||

|
||||
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## LICENCE
|
||||
|
||||
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
|
||||
|
||||
|
||||
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
### Configuration simple
|
||||
@ -23,7 +22,7 @@ Si vous avez peu de compétences techniques et que vous souhaitez installer Doli
|
||||
- DoliDeb pour Debian ou Ubuntu
|
||||
- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
|
||||
|
||||
Les packages peuvent être téléchargés à partir de [site web officiel] (https://www.dolibarr.org/).
|
||||
Les packages peuvent être téléchargés à partir de [site web officiel](https://www.dolibarr.org/).
|
||||
|
||||
### Configuration avancée
|
||||
|
||||
@ -31,50 +30,47 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
|
||||
|
||||
- Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
|
||||
|
||||
git clone https://github.com/dolibarr/dolibarr -b x.y (où x.y est la version principale comme 3.6, 9.0, ...)
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (où x.y est la version principale comme 3.6, 9.0, ...)
|
||||
|
||||
- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
|
||||
|
||||
|
||||
- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
|
||||
|
||||
- Depuis votre navigateur, allez à la page "install/" de dolibarr
|
||||
|
||||
L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
|
||||
L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
ou
|
||||
|
||||
`http://localhost/dolibarr/install/`
|
||||
|
||||
ou
|
||||
|
||||
`http://yourdolibarrvirtualhost/install/`
|
||||
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
|
||||
ou
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
|
||||
ou
|
||||
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
|
||||
- Suivez les instructions de l'installateur
|
||||
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
|
||||
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
|
||||
fournis dans ce nouveau package.
|
||||
|
||||
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
|
||||
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
*Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
Voir fichier ChangeLog.
|
||||
|
||||
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
### Modules principaux (tous optionnels):
|
||||
### Modules principaux (tous optionnels)
|
||||
|
||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||
- Gestion de catalogue de produits et services
|
||||
@ -83,7 +79,7 @@ Voir fichier ChangeLog.
|
||||
- Gestion des factures clients/fournisseurs et paiements
|
||||
- Gestion des virements bancaires SEPA
|
||||
- Gestion des comptes bancaires
|
||||
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock
|
||||
@ -96,7 +92,7 @@ Voir fichier ChangeLog.
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- …
|
||||
|
||||
### Autres modules:
|
||||
### Autres modules
|
||||
|
||||
- Gestion de marque-pages
|
||||
- Gestion des promesses de dons
|
||||
@ -111,7 +107,7 @@ Voir fichier ChangeLog.
|
||||
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers:
|
||||
### Divers
|
||||
|
||||
- Multi-langue.
|
||||
- Multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
@ -119,66 +115,60 @@ Voir fichier ChangeLog.
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
|
||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- La tax espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- La tax espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- …
|
||||
|
||||
### Extension
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
|
||||
- Dolibarr ne contient pas de module de Gestion de la paie.
|
||||
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUER
|
||||
|
||||
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
|
||||
|
||||
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
|
||||
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
- Facebook: <https://www.facebook.com/dolibarr.fr>
|
||||
- Google+: <https://plus.google.com/+DolibarrFrance>
|
||||
- Twitter: <https://www.twitter.com/dolibarr_france>
|
||||
- [Facebook](https://www.facebook.com/dolibarr.fr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr_france)
|
||||
|
||||
ou sur les réseaux anglophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
|
||||
93
README.md
@ -1,10 +1,7 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||
|
||||
|7|8|9|10|develop|
|
||||
|----------|----------|----------|----------|----------|
|
||||
||||||
|
||||

|
||||
|
||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||
|
||||
@ -16,7 +13,6 @@ You can use it as a standalone application or as a web application to be able to
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
@ -25,7 +21,6 @@ See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) fil
|
||||
|
||||
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
|
||||
|
||||
|
||||
## INSTALLING
|
||||
|
||||
### Simple setup
|
||||
@ -42,66 +37,64 @@ Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
|
||||
|
||||
git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is main version like 3.6, 9.0, ...)
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
|
||||
|
||||
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
|
||||
|
||||
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
|
||||
|
||||
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
|
||||
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
|
||||
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
or
|
||||
|
||||
`http://localhost/dolibarr/install/`
|
||||
|
||||
or
|
||||
|
||||
`http://yourdolibarrvirtualhost/install/`
|
||||
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
|
||||
or
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
|
||||
or
|
||||
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
### Saas/Cloud setup
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See https://saas.dolibarr.org). However, this third solution is not free.
|
||||
|
||||
|
||||
|
||||
## UPGRADING
|
||||
|
||||
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main application/modules (all optional)
|
||||
|
||||
- Customers, Prospects and/or Suppliers directory
|
||||
- Customers, Prospects (Leads) and/or Suppliers directory
|
||||
- Products and/or Services catalog
|
||||
- Commercial proposals management
|
||||
- Customer and Supplier Orders management
|
||||
- Invoices and payment management
|
||||
- Standing orders management (European SEPA)
|
||||
- Bank accounts management
|
||||
- Accounting management
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Opportunities and/or project management
|
||||
- Projects management
|
||||
- Contracts management
|
||||
- Stock management
|
||||
- Warehouse/Stock management
|
||||
- Shipping management
|
||||
- Interventions management
|
||||
- Employee's leave requests management
|
||||
@ -111,7 +104,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Foundations members management
|
||||
- Mass emailing
|
||||
- Surveys
|
||||
- Point of Sale
|
||||
- Point of Sale (POS)
|
||||
- …
|
||||
|
||||
### Other application/modules
|
||||
@ -131,33 +124,37 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
### Other general features
|
||||
|
||||
- Localization in most major languages.
|
||||
- Multi-Users and groups with finely grained rights.
|
||||
- Multi-currency.
|
||||
- Multi-company by adding of an external module.
|
||||
- Very user friendly and easy to use.
|
||||
- Localization in most major languages
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-currency
|
||||
- Multi-company by adding of an external module
|
||||
- Very user friendly and easy to use
|
||||
- customizable Dashboard
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
- APIs.
|
||||
|
||||
- APIs
|
||||
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- …
|
||||
|
||||
### System Environment / Requirements
|
||||
|
||||
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
|
||||
### Extending
|
||||
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
@ -167,37 +164,31 @@ These are features that Dolibarr does **not** yet fully support:
|
||||
- No native embedded Webmail
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine libraries.
|
||||
|
||||
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
1
build/.gitignore
vendored
@ -5,6 +5,5 @@
|
||||
/dolibarr-*.tgz
|
||||
/dolibarr-*.rpm
|
||||
/dolibarr-*.zip
|
||||
/dolibarr-*.tgz
|
||||
/*.exe
|
||||
/html
|
||||
|
||||
@ -36,7 +36,7 @@ Note: Prerequisites to build autoexe DoliWamp package:
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolybarr-doxygen-build.pl
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
Note:
|
||||
|
||||
@ -338,7 +338,7 @@ License: GPL-2+
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
FROM php:7.0-apache
|
||||
FROM php:7.2-apache
|
||||
|
||||
ENV HOST_USER_ID 33
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev\
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd \
|
||||
@ -11,22 +11,28 @@ RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev lib
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install ldap \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& apt-get purge -y libjpeg-dev libldap2-dev
|
||||
&& docker-php-ext-install calendar \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-install intl \
|
||||
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
|
||||
|
||||
RUN echo '172.17.0.1 docker.host' >> /etc/hosts
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@ -23,3 +23,6 @@ The URL to go to the Dolibarr is :
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
Setup the database connection during the installation process, please use mariad
|
||||
b (name of the database container) as database host.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
build: mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
usermod -u $HOST_USER_ID www-data
|
||||
groupmod -g $HOST_USER_ID www-data
|
||||
|
||||
chown -hR www-data:www-data /var/www
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -f /usr/local/etc/php/php.ini ]; then
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
|
||||
3
build/docker/mariadb/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM mariadb:latest
|
||||
# Enable comented out UTF8 charset/collation options
|
||||
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
|
||||
@ -36,7 +36,7 @@ $SOURCE="../..";
|
||||
$result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" );
|
||||
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
|
||||
while (<IN>) {
|
||||
if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
|
||||
if ( $_ =~ /define\('DOL_VERSION', '([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
|
||||
}
|
||||
close IN;
|
||||
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
# Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot
|
||||
|
||||
$file=$ARGV[0];
|
||||
if (! $file)
|
||||
if (! $file)
|
||||
{
|
||||
print "Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot\n";
|
||||
exit;
|
||||
@ -75,7 +75,7 @@ while (<FILE>)
|
||||
{
|
||||
$insidedquote=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$ignore="";
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# http://www.gnu.org/software/libiconv for the list of possible encodings.
|
||||
# https://www.gnu.org/software/libiconv for the list of possible encodings.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
||||
@ -587,7 +587,7 @@ INPUT = ../../htdocs ../../scripts
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
# also the default input encoding. Doxygen uses libiconv (or the iconv built
|
||||
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
|
||||
# into libc) for the transcoding. See https://www.gnu.org/software/libiconv for
|
||||
# the list of possible encodings.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
@ -737,7 +737,7 @@ REFERENCES_LINK_SOURCE = YES
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code
|
||||
# will point to the HTML generated by the htags(1) tool instead of doxygen
|
||||
# built-in source browser. The htags tool is part of GNU's global source
|
||||
# tagging system (see http://www.gnu.org/software/global/global.html). You
|
||||
# tagging system (see https://www.gnu.org/software/global/global.html). You
|
||||
# will need version 4.8.6 or higher.
|
||||
|
||||
USE_HTAGS = NO
|
||||
|
||||
29
build/exakat/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
== Install exakat ==
|
||||
mkdir exakat
|
||||
cd exakat
|
||||
curl -o exakat.phar http://dist.exakat.io/index.php?file=latest
|
||||
curl -o apache-tinkerpop-gremlin-server-3.3.5-bin.zip http://dist.exakat.io/apache-tinkerpop-gremlin-server-3.3.5-bin.zip
|
||||
unzip apache-tinkerpop-gremlin-server-3.3.5-bin.zip
|
||||
mv apache-tinkerpop-gremlin-server-3.3.5 tinkergraph
|
||||
rm -rf apache-tinkerpop-gremlin-server-3.3.5-bin.zip
|
||||
cd tinkergraph ./bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin 3.3.5
|
||||
cd ..
|
||||
|
||||
php exakat.phar version
|
||||
php exakat.phar doctor
|
||||
|
||||
== Init project ==
|
||||
php
|
||||
|
||||
|
||||
Edit config.ini file to exclude some dirs:
|
||||
ignore_dirs[] = "/htdocs/includes";
|
||||
ignore_dirs[] = "/scripts";
|
||||
ignore_dirs[] = "/build";
|
||||
ignore_dirs[] = "/dev";
|
||||
ignore_dirs[] = "/documents";
|
||||
|
||||
|
||||
== Analyze project ==
|
||||
php
|
||||
@ -1,8 +0,0 @@
|
||||
README (English)
|
||||
##################################################
|
||||
DOLIWAMP Package tools
|
||||
##################################################
|
||||
|
||||
This directory contains files used by makepack-dolibarr.pl
|
||||
script to build the all-in-on .EXE package DoliWamp, ready
|
||||
to be distributed (for Windows).
|
||||
@ -3,5 +3,8 @@
|
||||
DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP).
|
||||
It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also all prerequisites like the web server, and the database in one auto-install process.
|
||||
|
||||
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
|
||||
to be distributed (for Windows).
|
||||
|
||||
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
|
||||
|
||||
|
||||
@ -402,7 +402,7 @@ $cfg['RecodingEngine'] = 'auto';
|
||||
|
||||
// Specify some parameters for iconv used in charset conversion. See iconv
|
||||
// documentation for details:
|
||||
// http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
|
||||
// https://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
|
||||
$cfg['IconvExtraParams'] = '//TRANSLIT';
|
||||
|
||||
// Available charsets for MySQL conversion. currently contains all which could
|
||||
|
||||
@ -145,7 +145,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
@ -164,7 +164,7 @@ foreach ($files as $filetmp) {
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
@ -207,7 +207,7 @@ foreach ($files as $filetmp) {
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
|
||||
10
build/gource/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# Command to run gource on Dolibarr git project.
|
||||
|
||||
cd ~/git/dolibarr
|
||||
gource -a 0.5 -c 4 -i 0 --max-files 0 --dir-name-depth 2 --max-file-lag 0.1 --max-user-speed 150 --user-friction 1 --user-scale 3 --file-filter svgs --file-filter _source --file-filter tests --file-show-filter htdocs --date-format "%d %b %Y" -logo doc/images/appicon_64.png --highlight-users --highlight-colour FFFF88 -s 0.5 -1280x720 -r 25 -title 'Dolibarr ERP CRM Genesis' --stop-at-end --filename-time 2 --user-image-dir build/gource/avatars --hide filenames
|
||||
|
||||
|
||||
# To build a mp4 video
|
||||
# Change -crf 1 to -crf 50 for max compression (best is 5)
|
||||
cd ~/git/dolibarr
|
||||
gource -a 0.5 -c 4 -i 0 --max-files 0 --dir-name-depth 2 --max-file-lag 0.1 --max-user-speed 150 --user-friction 1 --user-scale 3 --file-filter svgs --file-filter _source --file-filter tests --file-show-filter htdocs --date-format "%d %b %Y" -logo doc/images/appicon_64.png --highlight-users --highlight-colour FFFF88 -s 0.4 -1280x720 -r 25 -title 'Dolibarr ERP CRM Genesis' --stop-at-end --filename-time 2 --user-image-dir build/gource/avatars --hide filenames -o - | ffmpeg -y -r 25 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset slow -pix_fmt yuv420p -crf 5 -threads 0 -bf 0 dolibarr_genesis.mp4
|
||||
1
build/gource/avatars/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/*.png
|
||||
1
build/gource/avatars/README.md
Normal file
@ -0,0 +1 @@
|
||||
Directory that will be filled with avatars images of developers for gource
|
||||
49
build/gource/getavatars.pl
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/perl
|
||||
#fetch Gravatars
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use LWP::Simple;
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
|
||||
my $size = 90;
|
||||
my $output_dir = './avatars';
|
||||
|
||||
die("no .git/ directory found in current path\n") unless -d './avatars';
|
||||
|
||||
mkdir($output_dir) unless -d $output_dir;
|
||||
|
||||
open(GITLOG, q/git log --pretty=format:"%ae|%an" |/) or die("failed to read git-log: $!\n");
|
||||
|
||||
my %processed_authors;
|
||||
|
||||
while(<GITLOG>) {
|
||||
chomp;
|
||||
my($email, $author) = split(/\|/, $_);
|
||||
|
||||
next if $processed_authors{$author}++;
|
||||
|
||||
my $author_image_file = $output_dir . '/' . $author . '.png';
|
||||
|
||||
#skip images we have
|
||||
next if -e $author_image_file;
|
||||
|
||||
#try and fetch image
|
||||
|
||||
my $grav_url = "http://www.gravatar.com/avatar/".md5_hex(lc $email)."?d=404&size=".$size;
|
||||
|
||||
warn "fetching image for '$author' $email ($grav_url)...\n";
|
||||
|
||||
my $rc = getstore($grav_url, $author_image_file);
|
||||
|
||||
sleep(1);
|
||||
|
||||
if($rc != 200) {
|
||||
unlink($author_image_file);
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
close GITLOG;
|
||||
|
||||
@ -461,15 +461,18 @@ if ($nboftargetok) {
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.editorconfig`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.codeclimate`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.git*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.pydevproject`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.scrutinizer.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.stickler.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/phpstan.neon`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
|
||||
@ -24,17 +24,15 @@
|
||||
"vendor-dir" : "htdocs/includes"
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.3.0",
|
||||
"php" : ">=5.5.0",
|
||||
"ext-curl" : "*",
|
||||
"ccampbell/chromephp" : "4.1.0",
|
||||
"ckeditor/ckeditor" : "4.6.2",
|
||||
"mike42/escpos-php" : "1.2.1",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.17",
|
||||
"ckeditor/ckeditor" : "4.12.1",
|
||||
"mike42/escpos-php" : "2.2",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.33",
|
||||
"phpoffice/phpexcel" : "1.8.1",
|
||||
"restler/framework" : "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf" : "^6.2",
|
||||
"atgp/factur-x" : "^1.0",
|
||||
"luracast/restler": "^3.0"
|
||||
"luracast/restler" : "^3.0"
|
||||
},
|
||||
"require-dev" : {
|
||||
"jakub-onderka/php-parallel-lint" : "^0",
|
||||
@ -50,13 +48,12 @@
|
||||
"ext-mssql" : "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite" : "To use with SQLite (experimental)",
|
||||
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick" : "Image manipulation (TCPDF)",
|
||||
"ext-imagick" : "Generation of thumbs from PDF",
|
||||
"ext-mcrypt" : "(Required but maybe built-in PHP)",
|
||||
"ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
|
||||
"ext-mbstring" : "Handle non UTF-8 databases",
|
||||
"ext-mbstring" : "Handle non UTF-8 characters",
|
||||
"ext-soap" : "Native SOAP",
|
||||
"ext-zip" : "ODT and Excel support",
|
||||
"ext-xml" : "Excel support",
|
||||
"firephp/firephp-core" : "Logging to Firebug console support"
|
||||
"ext-zip" : "ODT, Excel and file compression support",
|
||||
"ext-xml" : "Excel support"
|
||||
}
|
||||
}
|
||||
}
|
||||
665
composer.lock
generated
@ -52,6 +52,36 @@ Replace call to serialize_val with no bugged value
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
* Replace in tcpdf.php:
|
||||
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
with
|
||||
|
||||
if (isset($this->imagekeys)) {
|
||||
foreach($this->imagekeys as $file) {
|
||||
// unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
|
||||
|
||||
if (strpos($filename, '://') === false) {
|
||||
|
||||
with
|
||||
|
||||
if (strpos($filename, '//') === 0)
|
||||
{
|
||||
// Share folder on a (windows) server
|
||||
// e.g.: "//[MyServerName]/[MySharedFolder]/"
|
||||
//
|
||||
// nothing to change
|
||||
}
|
||||
elseif (strpos($filename, '://') === false)
|
||||
|
||||
* To avoid to have QRcode changed because generated with a random mask, replace
|
||||
define('QR_FIND_FROM_RANDOM', 2);
|
||||
with
|
||||
@ -67,7 +97,7 @@ define('QR_FIND_FROM_RANDOM', false);
|
||||
zapfdingbats.php (for special chars like form checkboxes)
|
||||
|
||||
* Optionnaly, made freemono the default monotype font if we removed courier
|
||||
In htdocs/includes/tcpdf/tcpdf.php
|
||||
In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
- protected $default_monospaced_font = 'courier';
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
|
||||
@ -137,20 +167,7 @@ with:
|
||||
|
||||
RESTLER:
|
||||
--------
|
||||
|
||||
* Add 2 lines into file AutoLoader.php to complete function
|
||||
private function alias($className, $currentClass)
|
||||
{
|
||||
...
|
||||
to get
|
||||
|
||||
private function alias($className, $currentClass)
|
||||
{
|
||||
if ($className == 'Luracast\Restler\string') return;
|
||||
if ($className == 'Luracast\Restler\mixed') return;
|
||||
...
|
||||
|
||||
Change also content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
|
||||
+With swagger 2:
|
||||
|
||||
|
||||
7
dev/examples/zapier/.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
build
|
||||
docs
|
||||
node_modules
|
||||
*.log
|
||||
.environment
|
||||
.env
|
||||
.zapierapprc
|
||||
7
dev/examples/zapier/.travis.yml
Normal file
@ -0,0 +1,7 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 8.10.0
|
||||
before_script: 'npm install -g zapier-platform-cli'
|
||||
script: 'zapier test'
|
||||
notifications:
|
||||
email: false
|
||||
56
dev/examples/zapier/action.json
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"table_rowid": "id",
|
||||
"id": 6764,
|
||||
"ref": null,
|
||||
"type_id": "5",
|
||||
"type_code": "AC_RDV",
|
||||
"type": null,
|
||||
"type_color": null,
|
||||
"code": null,
|
||||
"label": "azerty",
|
||||
"datec": null,
|
||||
"datem": null,
|
||||
"authorid": null,
|
||||
"usermodid": null,
|
||||
"datep": 1555365600,
|
||||
"datef": 1555538399,
|
||||
"durationp": 172799,
|
||||
"fulldayevent": 1,
|
||||
"punctual": 1,
|
||||
"percentage": "-1",
|
||||
"location": "",
|
||||
"transparency": 1,
|
||||
"priority": 0,
|
||||
"userassigned": {
|
||||
"1": {
|
||||
"id": "1",
|
||||
"transparency": 1
|
||||
}
|
||||
},
|
||||
"userownerid": "1",
|
||||
"userdoneid": null,
|
||||
"usertodo": null,
|
||||
"userdone": null,
|
||||
"socid": null,
|
||||
"contactid": null,
|
||||
"elementtype": "",
|
||||
"icalname": null,
|
||||
"icalcolor": null,
|
||||
"actions": [],
|
||||
"email_msgid": null,
|
||||
"email_from": null,
|
||||
"email_sender": null,
|
||||
"email_to": null,
|
||||
"email_tocc": null,
|
||||
"email_tobcc": null,
|
||||
"email_subject": null,
|
||||
"errors_to": null,
|
||||
"import_key": null,
|
||||
"linkedObjectsIds": null,
|
||||
"fk_project": 0,
|
||||
"modelpdf": null,
|
||||
"note_public": null,
|
||||
"note_private": null,
|
||||
"note": "wxcvbn",
|
||||
"duree": 0
|
||||
}
|
||||
77
dev/examples/zapier/authentication.js
Normal file
@ -0,0 +1,77 @@
|
||||
/*jshint esversion: 6 */
|
||||
const testAuth = (z , bundle) => {
|
||||
const url = bundle.authData.url+'/api/index.php/login';
|
||||
// Normally you want to make a request to an endpoint that is either specifically designed to test auth, or one that
|
||||
// every user will have access to, such as an account or profile endpoint like /me.
|
||||
// In this example, we'll hit httpbin, which validates the Authorization Header against the arguments passed in the URL path
|
||||
const promise = z.request({
|
||||
url: url,
|
||||
});
|
||||
|
||||
// This method can return any truthy value to indicate the credentials are valid.
|
||||
// Raise an error to show
|
||||
return promise.then((response) => {
|
||||
if (response.status === 401) {
|
||||
throw new Error('The Session Key you supplied is invalid');
|
||||
}
|
||||
return response;
|
||||
});
|
||||
};
|
||||
|
||||
const getSessionKey = (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/login';
|
||||
|
||||
const promise = z.request({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
body: {
|
||||
login: bundle.authData.login,
|
||||
password: bundle.authData.password,
|
||||
}
|
||||
});
|
||||
|
||||
return promise.then((response) => {
|
||||
if (response.status === 401) {
|
||||
throw new Error('The login/password you supplied is invalid');
|
||||
}
|
||||
const json = JSON.parse(response.content);
|
||||
return {
|
||||
sessionKey: json.success.token || 'secret'
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
type: 'session',
|
||||
// Define any auth fields your app requires here. The user will be prompted to enter this info when
|
||||
// they connect their account.
|
||||
fields: [
|
||||
{
|
||||
key: 'url',
|
||||
label: 'Url of service',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
key: 'login',
|
||||
label: 'Login',
|
||||
required: true,
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
key: 'password',
|
||||
label: 'Password',
|
||||
required: true,
|
||||
type: 'password'
|
||||
}
|
||||
],
|
||||
// The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this
|
||||
// method whenever a user connects their account for the first time.
|
||||
test: testAuth,
|
||||
// The method that will exchange the fields provided by the user for session credentials.
|
||||
sessionConfig: {
|
||||
perform: getSessionKey
|
||||
},
|
||||
// assuming "login" is a key returned from the test
|
||||
connectionLabel: '{{login}}'
|
||||
};
|
||||
90
dev/examples/zapier/creates/thirdparty.js
Normal file
@ -0,0 +1,90 @@
|
||||
/*jshint esversion: 6 */
|
||||
// create a particular thirdparty by name
|
||||
const createThirdparty = async (z, bundle) => {
|
||||
const apiurl = bundle.authData.url + '/api/index.php/thirdparties';
|
||||
|
||||
const response = await z.request({
|
||||
method: 'POST',
|
||||
url: apiurl,
|
||||
body: JSON.stringify({
|
||||
name: bundle.inputData.name,
|
||||
name_alias: bundle.inputData.name_alias,
|
||||
ref_ext: bundle.inputData.ref_ext,
|
||||
ref_int: bundle.inputData.ref_int,
|
||||
address: bundle.inputData.address,
|
||||
zip: bundle.inputData.zip,
|
||||
town: bundle.inputData.town,
|
||||
country_code: bundle.inputData.country_code,
|
||||
country_id: bundle.inputData.country_id,
|
||||
country: bundle.inputData.country,
|
||||
phone: bundle.inputData.phone,
|
||||
email: bundle.inputData.email,
|
||||
client: bundle.inputData.client,
|
||||
fournisseur: bundle.inputData.fournisseur,
|
||||
code_client: bundle.inputData.code_client,
|
||||
code_fournisseur: bundle.inputData.code_fournisseur,
|
||||
sens: 'fromzapier'
|
||||
})
|
||||
});
|
||||
const result = z.JSON.parse(response.content);
|
||||
// api returns an integer when ok, a json when ko
|
||||
return result.response || {id: response};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
key: 'thirdparty',
|
||||
noun: 'Thirdparty',
|
||||
|
||||
display: {
|
||||
label: 'Create Thirdparty',
|
||||
description: 'Creates a thirdparty.'
|
||||
},
|
||||
|
||||
operation: {
|
||||
inputFields: [
|
||||
{key: 'name', required: true},
|
||||
{key: 'name_alias', required: false},
|
||||
{key: 'address', required: false},
|
||||
{key: 'zip', required: false},
|
||||
{key: 'town', required: false},
|
||||
{key: 'email', required: false},
|
||||
{key: 'client', type: 'integer', required: false},
|
||||
{key: 'fournisseur', type: 'integer', required: false},
|
||||
{key: 'code_client', required: false},
|
||||
{key: 'code_fournisseur', required: false}
|
||||
],
|
||||
perform: createThirdparty,
|
||||
|
||||
sample: {
|
||||
id: 1,
|
||||
name: 'DUPOND',
|
||||
name_alias: 'DUPOND Ltd',
|
||||
address: 'Rue des Canaries',
|
||||
zip: '34090',
|
||||
town: 'MONTPELLIER',
|
||||
phone: '0123456789',
|
||||
fax: '2345678901',
|
||||
email: 'robot@domain.com',
|
||||
client: 1,
|
||||
fournisseur: 0,
|
||||
code_client: 'CU1903-1234',
|
||||
code_fournisseur: 'SU1903-2345'
|
||||
},
|
||||
|
||||
outputFields: [
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'address', label: 'Address'},
|
||||
{key: 'zip', label: 'Zip'},
|
||||
{key: 'town', label: 'Town'},
|
||||
{key: 'phone', label: 'Phone'},
|
||||
{key: 'fax', label: 'Fax'},
|
||||
{key: 'email', label: 'Email'},
|
||||
{key: 'client', label: 'Customer/Prospect 0/1/2/3'},
|
||||
{key: 'fournisseur', label: 'Supplier 0/1'},
|
||||
{key: 'code_client', label: 'Customer code'},
|
||||
{key: 'code_fournisseur', label: 'Supplier code'}
|
||||
]
|
||||
}
|
||||
};
|
||||
73
dev/examples/zapier/index.js
Normal file
@ -0,0 +1,73 @@
|
||||
/*jshint esversion: 6 */
|
||||
const triggerThirdparty = require('./triggers/thirdparty');
|
||||
const triggerOrder = require('./triggers/order');
|
||||
const triggerAction = require('./triggers/action');
|
||||
|
||||
const searchThirdparty = require('./searches/thirdparty');
|
||||
|
||||
const createThirdparty = require('./creates/thirdparty');
|
||||
|
||||
const authentication = require('./authentication');
|
||||
|
||||
// To include the session key header on all outbound requests, simply define a function here.
|
||||
// It runs runs before each request is sent out, allowing you to make tweaks to the request in a centralized spot
|
||||
const includeSessionKeyHeader = (request, z, bundle) => {
|
||||
if (bundle.authData.sessionKey) {
|
||||
request.headers = request.headers || {};
|
||||
request.headers['DOLAPIKEY'] = bundle.authData.sessionKey;
|
||||
}
|
||||
return request;
|
||||
};
|
||||
|
||||
// If we get a response and it is a 401, we can raise a special error telling Zapier to retry this after another exchange.
|
||||
const sessionRefreshIf401 = (response, z, bundle) => {
|
||||
if (bundle.authData.sessionKey) {
|
||||
if (response.status === 401) {
|
||||
throw new z.errors.RefreshAuthError('Session apikey needs refreshing.');
|
||||
}
|
||||
}
|
||||
return response;
|
||||
};
|
||||
|
||||
// We can roll up all our behaviors in an App.
|
||||
const App = {
|
||||
// This is just shorthand to reference the installed dependencies you have. Zapier will
|
||||
// need to know these before we can upload
|
||||
version: require('./package.json').version,
|
||||
platformVersion: require('zapier-platform-core').version,
|
||||
|
||||
authentication: authentication,
|
||||
|
||||
// beforeRequest & afterResponse are optional hooks into the provided HTTP client
|
||||
beforeRequest: [
|
||||
includeSessionKeyHeader
|
||||
],
|
||||
|
||||
afterResponse: [
|
||||
sessionRefreshIf401
|
||||
],
|
||||
|
||||
// If you want to define optional resources to simplify creation of triggers, searches, creates - do that here!
|
||||
resources: {
|
||||
},
|
||||
|
||||
// If you want your trigger to show up, you better include it here!
|
||||
triggers: {
|
||||
[triggerThirdparty.key]: triggerThirdparty,
|
||||
[triggerOrder.key]: triggerOrder,
|
||||
[triggerAction.key]: triggerAction
|
||||
},
|
||||
|
||||
// If you want your searches to show up, you better include it here!
|
||||
searches: {
|
||||
[searchThirdparty.key]: searchThirdparty,
|
||||
},
|
||||
|
||||
// If you want your creates to show up, you better include it here!
|
||||
creates: {
|
||||
[createThirdparty.key]: createThirdparty,
|
||||
}
|
||||
};
|
||||
|
||||
// Finally, export the app.
|
||||
module.exports = App;
|
||||
405
dev/examples/zapier/package-lock.json
generated
Normal file
@ -0,0 +1,405 @@
|
||||
{
|
||||
"name": "Dolibarr",
|
||||
"version": "1.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "8.10.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz",
|
||||
"integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==",
|
||||
"optional": true
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
|
||||
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"browser-stdout": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
|
||||
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
|
||||
"dev": true
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
|
||||
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.15.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
|
||||
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"content-disposition": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
|
||||
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
||||
},
|
||||
"diff": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",
|
||||
"integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow=="
|
||||
},
|
||||
"encoding": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
|
||||
"requires": {
|
||||
"iconv-lite": "~0.4.13"
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
|
||||
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "1.0.6",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"growl": {
|
||||
"version": "1.10.5",
|
||||
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
|
||||
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"he": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
|
||||
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
|
||||
"dev": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"dev": true
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
||||
},
|
||||
"json-tryparse": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/json-tryparse/-/json-tryparse-1.0.5.tgz",
|
||||
"integrity": "sha1-Khy6CLTjEjNo+p+2o01GQwBFeyc="
|
||||
},
|
||||
"jsonschema": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz",
|
||||
"integrity": "sha1-PO3o4+QR03eHLu+8n98mODy8Ptk="
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.38.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
|
||||
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.22",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
|
||||
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
|
||||
"requires": {
|
||||
"mime-db": "~1.38.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
},
|
||||
"mocha": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
|
||||
"integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browser-stdout": "1.3.1",
|
||||
"commander": "2.15.1",
|
||||
"debug": "3.1.0",
|
||||
"diff": "3.5.0",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"glob": "7.1.2",
|
||||
"growl": "1.10.5",
|
||||
"he": "1.1.1",
|
||||
"minimatch": "3.0.4",
|
||||
"mkdirp": "0.5.1",
|
||||
"supports-color": "5.4.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz",
|
||||
"integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==",
|
||||
"requires": {
|
||||
"encoding": "^0.1.11",
|
||||
"is-stream": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
|
||||
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
|
||||
},
|
||||
"should": {
|
||||
"version": "13.2.3",
|
||||
"resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
|
||||
"integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-equal": "^2.0.0",
|
||||
"should-format": "^3.0.3",
|
||||
"should-type": "^1.4.0",
|
||||
"should-type-adaptors": "^1.0.1",
|
||||
"should-util": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"should-equal": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
|
||||
"integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-type": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"should-format": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
|
||||
"integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-type": "^1.3.0",
|
||||
"should-type-adaptors": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"should-type": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
|
||||
"integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
|
||||
"dev": true
|
||||
},
|
||||
"should-type-adaptors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
|
||||
"integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"should-type": "^1.3.0",
|
||||
"should-util": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"should-util": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz",
|
||||
"integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
|
||||
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"zapier-platform-core": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/zapier-platform-core/-/zapier-platform-core-8.0.1.tgz",
|
||||
"integrity": "sha512-vuAe7JkFQ88AeQ//NwwNEh8ZjiZr30GRWtwYo7Wo/nx1cqZwq+CRc9zJU2WRrhJfJOtOOTUF6w+pArBTtMOC5A==",
|
||||
"requires": {
|
||||
"@types/node": "8.10.20",
|
||||
"bluebird": "3.5.0",
|
||||
"content-disposition": "0.5.2",
|
||||
"dotenv": "5.0.1",
|
||||
"form-data": "2.3.2",
|
||||
"lodash": "4.17.11",
|
||||
"node-fetch": "1.7.1",
|
||||
"oauth-sign": "0.9.0",
|
||||
"semver": "5.6.0",
|
||||
"zapier-platform-schema": "8.0.1"
|
||||
}
|
||||
},
|
||||
"zapier-platform-schema": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/zapier-platform-schema/-/zapier-platform-schema-8.0.1.tgz",
|
||||
"integrity": "sha512-97KJ0xVLtpU4BiXVaMTPQpiA0T6CQIEzWfzAWwJAWbu5336+6DMFUzDWN4bANBeD3CIsRHHPcZkP8n/17U05ag==",
|
||||
"requires": {
|
||||
"jsonschema": "1.1.1",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
24
dev/examples/zapier/package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "Dolibarr",
|
||||
"version": "1.0.0",
|
||||
"description": "An app for connecting Dolibarr to the Zapier platform.",
|
||||
"repository": "Dolibarr/dolibarr",
|
||||
"homepage": "https://www.dolibarr.fr/",
|
||||
"author": "Frédéric France <frederic.france@netlogic.fr>",
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "mocha --recursive"
|
||||
},
|
||||
"engines": {
|
||||
"node": "8.10.0",
|
||||
"npm": ">=5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"zapier-platform-core": "8.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^5.2.0",
|
||||
"should": "^13.2.0"
|
||||
}
|
||||
}
|
||||
66
dev/examples/zapier/searches/thirdparty.js
Normal file
@ -0,0 +1,66 @@
|
||||
module.exports = {
|
||||
key: 'thirdparty',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Thirdparty',
|
||||
display: {
|
||||
label: 'Find a Thirdparty',
|
||||
description: 'Search for thirdparty.'
|
||||
},
|
||||
|
||||
// `operation` is where we make the call to your API to do the search
|
||||
operation: {
|
||||
// This search only has one search field. Your searches might have just one, or many
|
||||
// search fields.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'name',
|
||||
type: 'string',
|
||||
label: 'Name',
|
||||
helpText: 'Name to limit to the search to (i.e. The company or %company%).'
|
||||
}
|
||||
],
|
||||
|
||||
perform: (z, bundle) => {
|
||||
const url = bundle.authData.url + '/api/index.php/thirdparties/';
|
||||
|
||||
// Put the search value in a query param. The details of how to build
|
||||
// a search URL will depend on how your API works.
|
||||
const options = {
|
||||
params: {
|
||||
sqlfilters: "t.nom like \'%"+bundle.inputData.name+"%\'"
|
||||
}
|
||||
};
|
||||
|
||||
return z.request(url, options).then(response => JSON.parse(response.content));
|
||||
},
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
name: 'DOE',
|
||||
firstname: 'John',
|
||||
authorId: 1,
|
||||
directions: '1. Boil Noodles\n2.Serve with sauce',
|
||||
style: 'italian'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'firstname', label: 'Firstname'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'style', label: 'Style'}
|
||||
]
|
||||
}
|
||||
};
|
||||
17
dev/examples/zapier/test/index.js
Normal file
@ -0,0 +1,17 @@
|
||||
require('should');
|
||||
|
||||
const zapier = require('zapier-platform-core');
|
||||
|
||||
// Use this to make test calls into your app:
|
||||
const App = require('../index');
|
||||
const appTester = zapier.createAppTester(App);
|
||||
|
||||
describe('My App', () => {
|
||||
|
||||
it('should test something', (done) => {
|
||||
const x = 1;
|
||||
x.should.eql(1);
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
156
dev/examples/zapier/triggers/action.js
Normal file
@ -0,0 +1,156 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'action',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getAction = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const action = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
ref: bundle.cleanedRequest.ref,
|
||||
ref_client: bundle.cleanedRequest.ref_client,
|
||||
name: bundle.cleanedRequest.name,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
usertodo__name: bundle.cleanedRequest.usertodo__name,
|
||||
location: bundle.cleanedRequest.location,
|
||||
label: bundle.cleanedRequest.label,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
module: bundle.cleanedRequest.module,
|
||||
datep: bundle.cleanedRequest.datep,
|
||||
datef: bundle.cleanedRequest.datef,
|
||||
fulldayevent: bundle.cleanedRequest.fulldayevent,
|
||||
transparency: bundle.cleanedRequest.transparency,
|
||||
icalname: bundle.cleanedRequest.icalname,
|
||||
icalcolor: bundle.cleanedRequest.icalcolor,
|
||||
note: bundle.cleanedRequest.note,
|
||||
note_public: bundle.cleanedRequest.note_public,
|
||||
note_private: bundle.cleanedRequest.note_private,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [action];
|
||||
};
|
||||
|
||||
const getFallbackRealAction = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/agendaevents/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/actions',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your actions separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'action',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Action',
|
||||
display: {
|
||||
label: 'New Agenda',
|
||||
description: 'Trigger when a new agenda with action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a user could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
helpText: 'Which action of agenda this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
delete: "Delete",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getAction,
|
||||
performList: getFallbackRealAction,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
name: 'Best Spagetti Ever',
|
||||
authorId: 1,
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'usertodo__name', label: 'UserToDo Name'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
148
dev/examples/zapier/triggers/order.js
Normal file
@ -0,0 +1,148 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'order',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getOrder = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const order = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
ref: bundle.cleanedRequest.ref,
|
||||
ref_client: bundle.cleanedRequest.ref_client,
|
||||
name: bundle.cleanedRequest.name,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
directions: bundle.cleanedRequest.directions,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
note_public: bundle.cleanedRequest.note_public,
|
||||
note_private: bundle.cleanedRequest.note_private,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [order];
|
||||
};
|
||||
|
||||
const getFallbackRealOrder = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/orders/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/orders',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your orders separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'order',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Order',
|
||||
display: {
|
||||
label: 'New Order',
|
||||
description: 'Trigger when a new order with action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a user could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
helpText: 'Which action of order this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getOrder,
|
||||
performList: getFallbackRealOrder,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
name: 'Best Spagetti Ever',
|
||||
authorId: 1,
|
||||
directions: '1. Boil Noodles\n2.Serve with sauce',
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'directions', label: 'Directions'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'module', label: 'Module'},
|
||||
{key: 'action', label: 'Action'}
|
||||
]
|
||||
}
|
||||
};
|
||||
175
dev/examples/zapier/triggers/thirdparty.js
Normal file
@ -0,0 +1,175 @@
|
||||
const subscribeHook = (z, bundle) => {
|
||||
// `z.console.log()` is similar to `console.log()`.
|
||||
z.console.log('suscribing hook!');
|
||||
|
||||
// bundle.targetUrl has the Hook URL this app should call when an action is created.
|
||||
const data = {
|
||||
url: bundle.targetUrl,
|
||||
event: bundle.event,
|
||||
module: 'company',
|
||||
action: bundle.inputData.action
|
||||
};
|
||||
|
||||
const url = bundle.authData.url + '/api/index.php/zapierapi/hook';
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data)
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const unsubscribeHook = (z, bundle) => {
|
||||
// bundle.subscribeData contains the parsed response JSON from the subscribe
|
||||
// request made initially.
|
||||
z.console.log('unsuscribing hook!');
|
||||
|
||||
// You can build requests and our client will helpfully inject all the variables
|
||||
// you need to complete. You can also register middleware to control this.
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id,
|
||||
method: 'DELETE',
|
||||
};
|
||||
|
||||
// You may return a promise or a normal data structure from any perform method.
|
||||
return z.request(options).then((response) => JSON.parse(response.content));
|
||||
};
|
||||
|
||||
const getThirdparty = (z, bundle) => {
|
||||
// bundle.cleanedRequest will include the parsed JSON object (if it's not a
|
||||
// test poll) and also a .querystring property with the URL's query string.
|
||||
const thirdparty = {
|
||||
id: bundle.cleanedRequest.id,
|
||||
name: bundle.cleanedRequest.name,
|
||||
name_alias: bundle.cleanedRequest.name_alias,
|
||||
firstname: bundle.cleanedRequest.firstname,
|
||||
address: bundle.cleanedRequest.address,
|
||||
zip: bundle.cleanedRequest.zip,
|
||||
town: bundle.cleanedRequest.town,
|
||||
email: bundle.cleanedRequest.email,
|
||||
client: bundle.cleanedRequest.client,
|
||||
fournisseur: bundle.cleanedRequest.fournisseur,
|
||||
code_client: bundle.cleanedRequest.code_client,
|
||||
code_fournisseur: bundle.cleanedRequest.code_fournisseur,
|
||||
authorId: bundle.cleanedRequest.authorId,
|
||||
createdAt: bundle.cleanedRequest.createdAt,
|
||||
action: bundle.cleanedRequest.action
|
||||
};
|
||||
|
||||
return [thirdparty];
|
||||
};
|
||||
|
||||
const getFallbackRealThirdparty = (z, bundle) => {
|
||||
// For the test poll, you should get some real data, to aid the setup process.
|
||||
const module = bundle.inputData.module;
|
||||
const options = {
|
||||
url: bundle.authData.url + '/api/index.php/thirdparties/0',
|
||||
};
|
||||
|
||||
return z.request(options).then((response) => [JSON.parse(response.content)]);
|
||||
};
|
||||
|
||||
// const getModulesChoices = (z/*, bundle*/) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const options = {
|
||||
// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices',
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
// const getModulesChoices = () => {
|
||||
|
||||
// return {
|
||||
// orders: "Order",
|
||||
// invoices: "Invoice",
|
||||
// thirdparties: "Thirdparty",
|
||||
// contacts: "Contacts"
|
||||
// };
|
||||
// };
|
||||
|
||||
// const getActionsChoices = (z, bundle) => {
|
||||
// // For the test poll, you should get some real data, to aid the setup process.
|
||||
// const module = bundle.inputData.module;
|
||||
// const options = {
|
||||
// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`,
|
||||
// };
|
||||
|
||||
// return z.request(options).then((response) => JSON.parse(response.content));
|
||||
// };
|
||||
|
||||
// We recommend writing your triggers separate like this and rolling them
|
||||
// into the App definition at the end.
|
||||
module.exports = {
|
||||
key: 'thirdparty',
|
||||
|
||||
// You'll want to provide some helpful display labels and descriptions
|
||||
// for users. Zapier will put them into the UX.
|
||||
noun: 'Thirdparty',
|
||||
display: {
|
||||
label: 'New Thirdparty',
|
||||
description: 'Trigger when a new thirdpaty action is done in Dolibarr.'
|
||||
},
|
||||
|
||||
// `operation` is where the business logic goes.
|
||||
operation: {
|
||||
|
||||
// `inputFields` can define the fields a user could provide,
|
||||
// we'll pass them in as `bundle.inputData` later.
|
||||
inputFields: [
|
||||
{
|
||||
key: 'action',
|
||||
type: 'string',
|
||||
helpText: 'Which action of thirdparty this should trigger on.',
|
||||
choices: {
|
||||
create: "Create",
|
||||
modify: "Modify",
|
||||
validate: "Validate",
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
type: 'hook',
|
||||
|
||||
performSubscribe: subscribeHook,
|
||||
performUnsubscribe: unsubscribeHook,
|
||||
|
||||
perform: getThirdparty,
|
||||
performList: getFallbackRealThirdparty,
|
||||
|
||||
// In cases where Zapier needs to show an example record to the user, but we are unable to get a live example
|
||||
// from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of
|
||||
// returned records, and have obviously dummy values that we can show to any user.
|
||||
sample: {
|
||||
id: 1,
|
||||
createdAt: 1472069465,
|
||||
name: 'DOE',
|
||||
name_alias: 'DOE Ltd',
|
||||
firstname: 'John',
|
||||
authorId: 1,
|
||||
action: 'create'
|
||||
},
|
||||
|
||||
// If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom
|
||||
// field definitions. The result will be used to augment the sample.
|
||||
// outputFields: () => { return []; }
|
||||
// Alternatively, a static field definition should be provided, to specify labels for the fields
|
||||
outputFields: [
|
||||
{key: 'id', label: 'ID'},
|
||||
{key: 'createdAt', label: 'Created At'},
|
||||
{key: 'name', label: 'Name'},
|
||||
{key: 'name_alias', label: 'Name alias'},
|
||||
{key: 'firstname', label: 'Firstame'},
|
||||
{key: 'authorId', label: 'Author ID'},
|
||||
{key: 'action', label: 'Action'},
|
||||
{key: 'client', label: 'Customer/Prospect 0/1/2/3'},
|
||||
{key: 'fournisseur', label: 'Supplier 0/1'},
|
||||
{key: 'code_client', label: 'Customer code'},
|
||||
{key: 'code_fournisseur', label: 'Supplier code'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -152,7 +152,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
|
||||
$fuser = new User($db);
|
||||
$fuser->fetch(mt_rand(1, 2));
|
||||
$fuser->getRights();
|
||||
|
||||
|
||||
$result=$object->create($fuser);
|
||||
if ($result >= 0)
|
||||
{
|
||||
|
||||
@ -61,8 +61,8 @@ $user->getrights();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
|
||||
@ -176,7 +176,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
|
||||
$fuser = new User($db);
|
||||
$fuser->fetch(mt_rand(1, 2));
|
||||
$fuser->getRights();
|
||||
|
||||
|
||||
$object->contactid = $contids[$socids[$socid]][0];
|
||||
$object->socid = $socids[$socid];
|
||||
$object->datep = $dates[mt_rand(1, count($dates)-1)];
|
||||
@ -200,7 +200,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
|
||||
}
|
||||
$xnbp++;
|
||||
}
|
||||
|
||||
|
||||
$result=$object->valid($fuser);
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
@ -64,22 +64,34 @@ $user->getrights();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$productsid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; }
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$societesid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
} else { print "err"; }
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||
$resql=$db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql); $i = 0;
|
||||
while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; }
|
||||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
$commandesid[$i] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
} else { print "err"; }
|
||||
|
||||
|
||||
@ -116,7 +128,6 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
$contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)];
|
||||
if ( $contact->create($user) )
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +64,10 @@ $sqls=array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."paiement_facture where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."paiement where rowid NOT IN (SELECT fk_paiement FROM ".MAIN_DB_PREFIX."paiement_facture)",
|
||||
),
|
||||
'supplier_payment'=>array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn where fk_facturefourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."paiementfourn where rowid NOT IN (SELECT fk_paiementfourn FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn)",
|
||||
),
|
||||
'bank'=>array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')",
|
||||
@ -103,6 +107,7 @@ $sqls=array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__'",
|
||||
),
|
||||
'supplier_invoice'=>array(
|
||||
'@supplier_payment',
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."facture_fourn_det WHERE fk_facture_fourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__'",
|
||||
),
|
||||
|
||||
BIN
dev/initdemo/documents_demo/adherent/1/photos/person5.jpeg
Normal file
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
dev/initdemo/documents_demo/adherent/3/photos/person9.jpeg
Normal file
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
BIN
dev/initdemo/documents_demo/adherent/4/photos/person2.jpeg
Normal file
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
BIN
dev/initdemo/documents_demo/categorie/2/3/32/photos/Fruits.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
BIN
dev/initdemo/documents_demo/categorie/4/3/34/photos/Pies.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
BIN
dev/initdemo/documents_demo/categorie/5/3/35/photos/Other.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
BIN
dev/initdemo/documents_demo/produit/POS-CARROT/FR-CAR-Carrot.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.7 KiB |