From aceb01adbe53e0790d9cafa6e5b10f193ed99c16 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 10 Jun 2025 15:14:37 +0200 Subject: [PATCH 1/6] Try to use jammy --- .travis.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c42cd5371e..435cc322372 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ # We use dist: bionic = 18.04, focal = 20.04 os: linux -dist: focal +dist: jammy language: generic @@ -37,7 +37,7 @@ jobs: - stage: PHP min and max if: type = push php: '7.1' - env: + env: - DB=postgresql - TRAVIS_PHP_VERSION=7.1 - stage: PHP min and max @@ -49,7 +49,7 @@ jobs: - stage: PHP 8.3 if: type = push AND branch = develop php: '8.3' - env: + env: - DB=mysql - TRAVIS_PHP_VERSION=8.3 @@ -89,7 +89,7 @@ before_install: if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3 fi - + - | echo Install pgsql if run is for pgsql if [ "$DB" = 'postgresql' ]; then @@ -116,15 +116,15 @@ install: - | if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then sudo update-alternatives --set php /usr/bin/php7.1 - fi + fi if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then sudo update-alternatives --set php /usr/bin/php8.1 - fi + fi if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then sudo update-alternatives --set php /usr/bin/php8.2 - fi + fi php -i | head - - + - | echo "Updating Composer config" curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php @@ -133,7 +133,7 @@ install: php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer sudo chmod -R a+rwx /usr/local/bin/composer - + #sudo apt install composer composer -V composer -n config -g vendor-dir htdocs/includes @@ -229,7 +229,7 @@ before_script: #sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa & sleep 3 - sudo ps fauxww + sudo ps fauxww echo "MySQL set root password" sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;" echo "MySQL grant" @@ -238,7 +238,7 @@ before_script: sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;' echo "List pid file" sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';" - + #sudo kill `cat /var/lib/mysqld/mysqld.pid` #sudo systemctl start mariadb @@ -246,7 +246,7 @@ before_script: sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' echo "MySQL flush" sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;' - + echo "MySQL load sql" sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql fi @@ -415,12 +415,12 @@ script: echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE #cat $INSTALL_FORCED_FILE echo - + - | echo "Upgrading Dolibarr" # Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files. # Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so - # I disable stop on error to be able to continue. + # I disable stop on error to be able to continue. set +e cd htdocs/install php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log From debc895bb04f7d423e20fd0f45178c3791ebfd25 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 10 Jun 2025 15:27:34 +0200 Subject: [PATCH 2/6] Try fix CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 435cc322372..d0e352d3a79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -136,7 +136,7 @@ install: #sudo apt install composer composer -V - composer -n config -g vendor-dir htdocs/includes + sudo composer -n config -g vendor-dir htdocs/includes echo - | From 18bfa0e637cc6f4e845045a9a6ad359cc42b987a Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 10 Jun 2025 15:34:16 +0200 Subject: [PATCH 3/6] Try to fix CI --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d0e352d3a79..11319d98b1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,6 +137,7 @@ install: #sudo apt install composer composer -V sudo composer -n config -g vendor-dir htdocs/includes + sudo chmod -R a+rwx /home/travis/.config/composer echo - | From f9cbe6c2a04bc2a003533ebb72cec2751c3514f4 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 10 Jun 2025 15:55:09 +0200 Subject: [PATCH 4/6] Fix CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 11319d98b1d..a71ea45feb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ services: addons: - mariadb: '10.5' + mariadb: '10.6' env: From b64407f04da04fb68a2f77c7b66e0cc94cc483b8 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 10 Jun 2025 16:06:47 +0200 Subject: [PATCH 5/6] Fix travis file --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a71ea45feb9..6fe86320aa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -207,8 +207,8 @@ before_script: phpcs -i | head - # Check PHP Vardump check version echo "PHP Vardump check version" - which var_dump_check - var_dump_check --version + which var-dump-check + var-dump-check --version # Check PHPUnit version echo "PHPUnit version" which phpunit From 956d545b41b59efc88ca04eb2c39ecf9aeaae788 Mon Sep 17 00:00:00 2001 From: VIAL-GOUTEYRON Quentin Date: Thu, 12 Jun 2025 12:17:29 +0200 Subject: [PATCH 6/6] fix missing last_main_doc (#34405) --- htdocs/fourn/class/fournisseur.commande.class.php | 2 ++ htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b5937495443..0d9239aac8e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -391,6 +391,7 @@ class CommandeFournisseur extends CommonOrder $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,"; $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle"; $sql .= ', c.fk_incoterms, c.location_incoterms'; + $sql .= ', c.last_main_doc'; $sql .= ', i.libelle as label_incoterms'; $sql .= " FROM ".$this->db->prefix()."commande_fournisseur as c"; $sql .= " LEFT JOIN ".$this->db->prefix()."c_payment_term as cr ON c.fk_cond_reglement = cr.rowid"; @@ -428,6 +429,7 @@ class CommandeFournisseur extends CommonOrder $this->statut = $obj->status; // deprecated $this->status = $obj->status; $this->billed = $obj->billed; + $this->last_main_doc = $obj->last_main_doc; $this->user_author_id = $obj->user_author_id; $this->user_validation_id = $obj->user_validation_id; $this->user_approve_id = $obj->user_approve_id; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ae3818239c4..cf0dd614080 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1209,6 +1209,7 @@ class SupplierProposal extends CommonObject $sql .= ", p.fk_mode_reglement"; $sql .= ', p.fk_account'; $sql .= ", p.fk_shipping_method"; + $sql .= ", p.last_main_doc"; $sql .= ", p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc"; $sql .= ", c.label as statut_label"; $sql .= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc"; @@ -1255,6 +1256,7 @@ class SupplierProposal extends CommonObject $this->delivery_date = $this->db->jdate($obj->delivery_date); $this->shipping_method_id = ($obj->fk_shipping_method > 0) ? $obj->fk_shipping_method : null; + $this->last_main_doc = $obj->last_main_doc; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; $this->mode_reglement = $obj->mode_reglement;