Commit graph

408 commits

Author SHA1 Message Date
Laurent Destailleur
7e0f0c54f2 Fix deletion must not use the glob by default. 2026-07-29 13:20:28 +02:00
Laurent Destailleur
ad4ceba536 Automated merge from 23.0 to develop 2026-07-15 02:06:09 +02:00
Laurent Destailleur
967897f763 Automated merge from 22.0 to 23.0 by tool pullmerge.sh 2026-07-15 01:26:14 +02:00
Laurent Destailleur
4f27660d6d Automated merge from 21.0 to 22.0 by tool pullmerge.sh 2026-07-15 01:15:01 +02:00
Laurent Destailleur
6cb5380087 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2026-07-13 16:33:26 +02:00
Laurent Destailleur
dc382c14aa Automated merge from 19.0 to 20.0 by tool pullmerge.sh 2026-07-13 16:28:07 +02:00
Laurent Destailleur
febbfc8207 Automated merge from 18.0 to 19.0 by tool pullmerge.sh 2026-07-13 16:16:47 +02:00
w3houde
429d3354e2
Fix #31471 translate CostPrice and PriceBaseType on import field list (#38922)
import.php loadLangs only loaded exports/compta/errors, so labels coming from
modProduct / modService import_fields_array that resolve to keys in
products.lang (PriceBaseType) and margins.lang (CostPrice) stayed in English
on a French install. Add 'products' and 'margins' to the loaded set so the
import field picker shows the translated label everywhere else the user sees
the product card.

Signed-off-by: Dolicraft <contact@dolicraft.com>
Co-authored-by: Dolicraft <contact@dolicraft.com>
2026-06-27 18:24:32 +02:00
Alexandre SPANGARO
b33dad5a34
FIX Import - Fallback txt format to csv (#38377)
* FIX Import - Fallback txt format to csv

* FIX Import - Fallback txt format to csv
2026-05-21 22:43:56 +02:00
Laurent Destailleur
d25b733a3e NEW Strings are trimed when doing import. 2026-05-04 17:17:26 +02:00
Laurent Destailleur
c9f38c2c79 Fix min of import 2026-05-04 16:59:18 +02:00
MDW
f142240083
Qual: Fix phan notices (#37837)
* Qual: Ignore PhanUndeclaredProperty for specific lines

* Fix: Update payment mode reference in PDF generation

# Fix: Update payment mode reference in PDF generation

The payment mode reference in the PDF generation was incorrectly using `type_payment_code`, an unknown property in Salary.
It has been updated to use `type_code` as used elsewhere for the same purpose.

* Qual: Typing of several DDLUpdateField field_desc items made optional

# Qual: Typing of several DDLUpdateField field_desc items made optional

Not all fields are required for updateing the DB typing, and ExtraFields was not providing all of them.

* Qual: Update typing for phan notices

# Qual: Update typing for phan notices

Fix typing mismatches

* Qual: Fix extrafields typing in objectline_create.tpl.php

# Qual: Fix extrafields typing in objectline_create.tpl.php

- Update typing for phan

* Qual: Fix typing for Phan & re-use encrypted password when requested

# Qual: Fix typing for Phan & re-use encrypted password when requested

- Added a cast to string for the crypted password to hint phan that it returns the string version (not the array)
- Added a check to ensure the password is not already crypted before generating a new password.
- Updated the type hints for parameters `$changelater`, `$notrigger`, `$nosyncmember`, and `$passwordalreadycrypted` to include the range of possible values.
- Updated the return type hint for the `setPassword` method to include the range of possible error values.

* Qual: Fix file argument to showPreview() calls

# Qual: Fix file argument to showPreview() calls

Fix argument type mismatches by adjusting '$file' arguments in showPreview calls.

* Qual: Update login_c type to string

# Qual: Update login_c type to string

login_c is username from db.

* Qual: Update type hints in treeview.lib.php

# Qual: Update type hints in treeview.lib.php

Update type hints for static analysis.

* Qual: Add null check for objecttmp in selectForFormsList

# Qual: Add null check for objecttmp in selectForFormsList

Add null check for objecttmp before calling selectForFormsList to ensure static analysis

* Qual: Fix phan through null check on object argument

# Qual: Fix phan through null check on object argument

- Do null check to avoid null parameter (fix phan);
- Set more specific type for argument.

* Qual: Change type hint of $remise_percent parameter to float

# Qual: Change type hint of $remise_percent parameter to float

DB type is float, so correct arg type to fix phan notice.

* Qual: Ignore some phan notices

The descriptions for the linkedObjectsFullLoaded and oldcopy properties have been updated to avoid modification by code formatting tools

* Qual: Update phan baseline

* Qual: Cast remise_percent to float to match typing requirements

* Qual: Cast label to string to help static analysis

* Qual: Update date_cancel property type and assignment

To fix phan notices:

- The date_cancel property type was changed from 'int|string' to 'int|""' to match return type from jdate().
- Additionally, the assignment of date_cancel was updated to use dol_now() instead of $this->db->idate(dol_now()).

* Qual: Provide the expected user_id instead of the User object

Changed the user fetch logic from using `user_author` to `user_creation_id`

* Qual: Correct bool argument from 0 to false ($fill)

* Qual/Fix: Correct date converted to dol_print_date

* Qual: Fix argument type for addline()

* Qual: Update Phan baseline.txt
2026-04-13 12:50:23 +02:00
Laurent Destailleur
f8a37ca704 Import 2026-03-11 20:52:39 +01:00
Laurent Destailleur
acb525524e NEW Better look and feel v24 in import/export tool 2026-03-10 11:33:18 +01:00
Laurent Destailleur
3dfce11ae8 Merge 2026-03-05 00:42:13 +01:00
Laurent Destailleur
1650d96091 FIX Pb with import of agendaevents. Date and import id not visible. 2026-03-04 16:52:48 +01:00
Laurent Destailleur
302dcd4aa0 Fix import key not visible 2026-02-28 15:34:30 +01:00
Laurent Destailleur
a9c85c78e2 Automated merge from 23.0 to develop 2026-02-28 12:17:11 +01:00
VIAL-GOUTEYRON Quentin
23f9aeded0
NEW Add CSV/XLSX import mode to disable triggers execution (refactoring of import, while preserving legacy SQL compatibility) (#37367)
* Add support for optimized import trigger modes and bulk processing

Introduced new features and optimizations for the import module:
- **Trigger Modes**: Added `strict_line` (default, triggers per row) and `fast_bulk` (triggers aggregate events for bulk imports).
- **Simulation Mode**: Implemented a simulation flag to enable preview of imports without executing triggers.
- **Trigger Cache/Optimization**: Added caching for trigger objects and hook-resolved actions, enhancing performance during legacy SQL imports.
- **Bulk Trigger Stats**: Integrated stats tracking for bulk operations (insert/update) by table, facilitating analytical insight during bulk imports.
- **Extended Trigger Logic**: Enhanced trigger handling:
  - Dynamically resolved actions based on context (table, operation, object class).
  - Introduced hooks for custom import trigger actions.
  - Provided fallback mechanisms for unmapped table-element relationships.
- **Compatibility**: Maintained compatibility with legacy strict-line mode using object-based trigger execution.

These updates improve import performance, scalability, and flexibility while maintaining robust backward compatibility.

* fix

* fix

* refacto

* precommit

* retour

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-27 16:35:36 +01:00
tcesar
6545957cbd Fix traduction for import error 2025-12-02 16:37:30 +01:00
ldestailleur
d17f13f149 FIX detection of setup not done with
MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING
2025-10-09 13:13:51 +02:00
ldestailleur
6ead2839d0 Fix missing several test on permission on actions 2025-09-23 16:41:53 +02:00
ldestailleur
9b365c97b8 Fix when help is shown 2025-08-20 17:57:08 +02:00
ldestailleur
0512428c53 Help missing 2025-08-20 17:47:24 +02:00
ldestailleur
ec5275e1d9 Fix picto download/upload 2025-06-23 03:36:27 +02:00
ldestailleur
bd0ad59ec8 Fix phpunit 2025-03-12 18:53:36 +01:00
ldestailleur
9eb2f96d38 Clean code 2025-03-12 18:34:17 +01:00
ldestailleur
675fbc2761 FIX Add one more column too much in import 2025-03-12 16:25:40 +01:00
ldestailleur
3e24bbd419 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-03-08 14:51:36 +01:00
ldestailleur
18a4224e5d Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-03-08 14:51:04 +01:00
ldestailleur
e14b748fa2 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-03-06 13:38:22 +01:00
EnjoyFelix
8f44b0a974
# FIX The "AfterImportInsert" hook is not triggered during the simulation. #33260 (#33261)
* AfterImport hook in the simulation of the import

* Update import.php

* Update import.php

* Update import.php

---------

Co-authored-by: Elisée Chemin <elisee.chemin@tetras-libre.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-06 13:37:37 +01:00
MDW
aa521a46d2
Qual: Fix phan notices (import) 2025-02-05 01:43:38 +01:00
Laurent Destailleur
474e21dc6f Debug v23 2025-12-15 15:15:41 +01:00
Laurent Destailleur
e350886c15 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-12-04 20:38:22 +01:00
ldestailleur
a162de2455 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-10-09 18:47:52 +02:00
ldestailleur
ad830a346e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-23 16:50:17 +02:00
Frédéric FRANCE
926defb22c
add more parameters to restrictedArea hook (#35013)
* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook

* add more parameters to hook
2025-08-20 18:57:52 +02:00
Lucas Marcouiller
489197f1a5
NEW import process by removing some steps (#36811)
* Fix import process by removing some steps

* fix Ci

---------

Co-authored-by: Lucas Marcouiller <lmarcouiller@dolicloud.com>
2026-01-10 17:49:28 +01:00
Laurent Destailleur (aka Eldy)
935e7e6d31 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-06 17:44:06 +01:00
Laurent Destailleur
6f63314d30 Debug v21 2025-01-06 03:34:20 +01:00
Laurent Destailleur
4dbbb1abe3 Debug v21 2025-01-06 02:27:51 +01:00
Jyhere
ea67c6d727 FIX: double space file bug when using dolibarr import 2024-12-31 10:18:48 +01:00
Frédéric FRANCE
23a0c427ea
fix CI 2024-12-18 17:56:41 +01:00
Laurent Destailleur (aka Eldy)
60624b0b53 Debug v21 2024-12-18 12:21:54 +01:00
MDW
9ec4618199
Qual: Fix FunctionArray phan notices (#31754)
* Qual: Fix FunctionArray phan notices

* Fix class name in typing of htdocs/modulebuilder/index.php

* Fix customreports phpdoc

* Adjust file type after completeFileArrayWithDatabaseInfo

* Further phpdoc typing improvements

* More phpdoc

* Improve typing with cast on position field

* Force phpstan version

* Add phpstan exception

* Fix array index type + adjust phan config comment
2024-11-11 14:48:18 +01:00
Frédéric FRANCE
0d7bc505d3
add phpdoc and clean phpstan baseline (#31702)
* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline
2024-11-06 19:39:46 +01:00
Laurent Destailleur
4bdd848bbe Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-11-06 13:26:08 +01:00
Frédéric FRANCE
1adc883b56
add baseline exclude for phpstan (#31632)
* add baseline exclude for phpstan

* update

* update

* update

* update

* update

* merge

* restore one filter

* delete old errors

* fix

* fix

* fix

* $moreforfilter can t be empty

* fix

* enable check

* refresh baseline

* add phpdoc

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
Laurent Destailleur
d42465ff1f FIX error message in xls import when stream zip is not availabe. 2024-10-31 14:35:10 +01:00