Skip to content

Commit

Permalink
Merge branch 'develop' into dev_fix_folder_for_product_lot
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Jul 18, 2024
2 parents da18696 + 7fef62e commit 22fe18f
Show file tree
Hide file tree
Showing 3,645 changed files with 99,146 additions and 81,870 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
53 changes: 41 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
How to contribute to Dolibarr
=============================

Bug reports and feature requests
--------------------------------
Send a Bug reports or a Feature request
---------------------------------------

<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help on using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.

Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English.
Issues to inform about a bug or a development trouble, like requests for a new feature, are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English (we recommand using an online translation service if you don't know English).

1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
Expand All @@ -18,39 +18,68 @@ Default **language here is English**. So please prepare your contributions in En



<a name="code"></a>Submit code
<a name="code"></a>

Submit code
---------------------

This process describes how a Developer can submit code to the project so it can be analysezd and validated by the Merger (we call this a Pull Request).

Definition:
- The Developer: is the human knowing the development language of the application that want to change some part of the code by making changement on the sources of the project.
- The Merger: is the human knowing the development and check that the code submitted for approbation is correct to validate it, in other word, the Merger is the approbator of commits.
- The Releaser: is the human that validates that there a freeze/beta version is ok to be released officialy as a stable version.


### Basic workflow

As the Developer:

1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
2. Clone your fork.
3. Choose a branch(See the [Branches](#branches) section below).
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
5. Commit and push your changes.
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).

As the Merger:

7. The Merger will check and say if he approves or not the commits. During this step, the Merger can modify your own code to make it valid for appobation or ask you to make the change yourself. For this the Merger may add commits himself. Depending on the tools used (can be done from github directly orfrom an IDE), such commits may be done directly after having validating your PR (for example to complete it).

Note: Of course, the Merger, does not need to ask to himself if he is ok to validate a commit he did himself. This is a reason why the Merger can validate commits he did directly without passing by the approbation process described for the Developer.

As the Releaser:

8. A tag will be added to take a photo of the code will all the changes approved by the Merger, when he decide to do a release.


<span id="branches" name="branches"></span>

### Branches

Unless you're fixing a bug, all pull requests should be made against the *develop* branch.

If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.

We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
higher versions.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into higher versions.

The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
and number of potential beneficiaries of the correction.
The rule N - 2 is just a tip if you don't know which version to choose to get the best compromise between ease of correction and number of potential beneficiaries of the correction.


### General rules
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.

- As the Developer, please don't edit the ChangeLog file. This file is generated from all commit messages during the release process by the Project releaser.

- As the Developer: Do not submit changes into files xx_XX/afile.lang. They are language files and are updated automatically by sync from Transifex. If you need to add a new language file, just add it for the en_US language.

- As the Releaser: The releaser will decide to make a new release as soon as the planning of the release is reached and the code in the branch to release reach the status "No more known serious bug known".


<a name="commits"></a>

### Commits

### <a name="commits"></a>Commits
Use clear commit messages with the following structure:

```plaintext
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ script:
php upgrade.php 19.0.0 20.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade19002000.log || cat $TRAVIS_BUILD_DIR/upgrade19002000.log
php upgrade2.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-2.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-2.log
php step5.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-3.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-3.log
php upgrade.php 20.0.0 21.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade20002100.log || cat $TRAVIS_BUILD_DIR/upgrade20002100.log
php upgrade2.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-2.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-2.log
php step5.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-3.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-3.log
set +e
echo
Expand Down
24 changes: 22 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@ English Dolibarr ChangeLog
--------------------------------------------------------------


***** ChangeLog for 21.0.0 compared to 20.0 *****

For users:
----------



For developers:
---------------



WARNING:
--------

The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Prepare your module for deprecation of triggers code XXX_INSERT to support also XXX_CREATE.
* More class properties (with old name in french) are now deprecated in favor of the property name in english.
* The json emulator dol_json_encode/decode() is removed. The native json PHP module must be enabled/available (this is the case by default with most PHP installation).


***** ChangeLog for 20.0.0 compared to 19.0 *****

For users:
Expand Down Expand Up @@ -255,7 +276,6 @@ QUAL: professional identifiers - remove TODO by adding profid.lib.php
QUAL: Properties ->date_update and ->date_modification were merged
QUAL: removed duplicate language file
QUAL: Remove the external js library jstimezonedetect
QUAL: Remove use of customurl filter. Must use the USF syntax.
QUAL: Rename all input fields "tel" into "phone"
QUAL: Rename column fk_origin_line on shipment lines into fk_elementdet to match a generic use. (#28989)
QUAL: replace $conf->global with getDolGlobalString()
Expand All @@ -280,6 +300,7 @@ The following changes may create regressions for some external modules, but were
* All CLI tools (into /scripts) return a positive value to the shell if error (0 remains success) for a better
cross platform compatibility. On linux the exit(-1) was caught as 255, it may be now exit(1) so will be caught as 1.
* The parameter $filter of method fetchAll does not accept array of SQL but must be a string of an Universal Search Filter syntax.
* Remove use of customurl into $filter. Must use the USF syntax.
* Use of dol_eval with parameter $returnvalue=0 is deprecated.
* The signature for all ->delete() method has been modified to match the modulebuilder template (so first param is now always $user), except
the delete for thirdparty (still accept the id of thirdparty to delete as first parameter). Will probably be modified into another version.
Expand All @@ -295,7 +316,6 @@ The following changes may create regressions for some external modules, but were
* The signature of method fetch() of class CompanyBankAccount has been modified to match the signature of method Account->fetch()



***** ChangeLog for 19.0.2 compared to 19.0.1 *****
FIX: $object->oldcopy may be a stdClass and not original object
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
Expand Down
14 changes: 7 additions & 7 deletions build/generate_filelist_xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
exit(1);
}

require_once $path."../htdocs/master.inc.php";
Expand All @@ -51,7 +51,7 @@
if (empty($argv[1])) {
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1;
exit(1);
}


Expand Down Expand Up @@ -87,7 +87,7 @@
if (empty($release)) {
print "Error: Missing release parameter\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(2);
}

$savrelease = $release;
Expand All @@ -107,21 +107,21 @@
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(3);
}
} else {
$tmpverter = explode('-', DOL_VERSION, 2);
if ($tmpverter[0] != $tmpverbis[0]) {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(4);
}
}
} else {
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(5);
}
}

Expand All @@ -147,7 +147,7 @@
$fp = fopen($outputfile, 'w');
if (empty($fp)) {
print 'Failed to open file '.$outputfile."\n";
exit(-1);
exit(6);
}

fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
Expand Down
1 change: 1 addition & 0 deletions dev/setup/phpunit/setup_conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ if [ "$load_cache" != "1" ] ; then
VERSIONS+=("5.0.0" "6.0.0" "7.0.0" "8.0.0" "9.0.0")
VERSIONS+=("10.0.0" "11.0.0" "12.0.0" "13.0.0" "14.0.0")
VERSIONS+=("15.0.0" "16.0.0" "18.0.0" "19.0.0" "20.0.0")
VERSIONS+=("21.0.0")
pVer=${VERSIONS[0]}
for v in "${VERSIONS[@]:1}" ; do
LOGNAME="${TRAVIS_BUILD_DIR}/upgrade${pVer//./}${v//./}"
Expand Down
19 changes: 18 additions & 1 deletion dev/tools/codespell/codespell-ignore.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# List of words codespell will ignore
# one per line, case-sensitive (when not lowercase)

# PROVid
provid

# PostgreSQL
postgresql

# Name of contributores
noe
udo
tim

# Inside email
ba
blacklist
Expand Down Expand Up @@ -32,28 +39,35 @@ thead
ue
whitelist
ws

# Thirdparty should be Third party or Third-party but ignoring it because it's omnipresent
thirdparty

# Code string
ect
tempdate
sav
files'

# Used as array key
seeked
tweek

# Used as key
marge

# moral (var name)
mor

# Strings used as keys for translation
uptodate
reenable

# Function - rename to devalidate ?
unvalidate

# Some french strings
somme
caracteres
cas
sur
Datas
Expand All @@ -66,3 +80,6 @@ fonction
espace
methode
datee

# other
blacklists
18 changes: 2 additions & 16 deletions dev/tools/codespell/codespell-lines-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//$typea = ($objp->typea == 'birth') ? $picb : $pice;
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
$date = $overview[0]->udate;
$dateemail = dol_stringtotime((string) $overview[0]->udate, 'gmt');
$dateb = $this->db->jdate($data[$j]->datea);
$link->datea = $this->db->jdate($obj->datea);
$object->periode = $newdateperiod;
Expand Down Expand Up @@ -57,7 +58,7 @@
$this->datee = $this->db->jdate($obj->datee);
$this->periode = $this->db->jdate($obj->period);
$tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, true); // Disable hook for the moment
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, 1); // Disable hook for the moment
//si les reponses ne concerne pas la colonne effacée, on concatenate
GETPOST("mouvement", 'alpha'),
GETPOSTINT("mouvement"),
Expand Down Expand Up @@ -281,21 +282,6 @@
* @param string[] $TWeek array of week numbers
* @param string[] $TWeek array of week numbers (week 1 must be '01')
* @param array $TWeek Array of week numbers
* Copyright (C) 2019 Tim Otte <[email protected]>
* Copyright (C) 2019 Tim Otte <[email protected]>
* Copyright (C) 2019 Tim Otte <[email protected]>
* Copyright (C) 2020 Thibault FOUCART <[email protected]>
* Copyright (C) 2020-2021 Udo Tamm <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2021 Noé Cendrier <[email protected]>
* Copyright (C) 2022 Udo Tamm <[email protected]>
* Copyright (C) 2022 Udo Tamm <[email protected]>
* Copyright (C) 2022-2023 Udo Tamm <[email protected]>
* Copyright (C) 2023 Udo Tamm <[email protected]>
* Copyright (C) 2024 Noé Cendrier <[email protected]>
* add german links 2020 Udo Tamm <[email protected]>
$TFirstDays = getFirstDayOfEachWeek($TWeek, $year);
$TFirstDays[reset($TWeek)] = '01'; //first day of month
$TLastDays = getLastDayOfEachWeek($TWeek, $year);
Expand Down
Loading

0 comments on commit 22fe18f

Please sign in to comment.