Commit graph

2608 commits

Author SHA1 Message Date
Laurent Destailleur
8815d22ae4 Clean code 2026-08-07 19:00:27 +02:00
Pichinov-Jose
fcf3006ddd
FIX Whole session loses its menus after a login done from inside a dialog popup (#39312)
* FIX phpstan: Societe::$client (int<0,3>) does not accept -1 (#39244)

Societe::$client is annotated @var int<0,3> (domain 0=no customer,
1=customer, 2=prospect, 3=both) in societe.class.php, but the create
form in societe/card.php pre-set it to -1 as a transient "nothing
pre-selected" placeholder, tripping PHPStan level 10 on develop.

The value is never persisted (save paths compute 0..3) and the only
reader, the switch() building the form, treats -1 and 0 identically via
its default case. Use 0 (the property's own default) so the assignment
matches the declared type. No behavior change.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

* FIX Whole session loses its menus after a login done from inside a dialog popup

The URLs opened by dolButtonToOpenUrlInDialogPopup() carry
dol_hide_topmenu=1 and dol_hide_leftmenu=1. If the session expires and
the user logs in again from inside the popup iframe, these flags were
stored into $_SESSION at login and applied to every following page: the
user 'loses' the top and left menus for the whole session, until logout.

Do not persist the two hide-menu flags when the login is done in a
dol_openinpopup context.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Jam Balaya <jambalaya.pyoncafe@outlook.jp>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-07-30 18:48:21 +02:00
Laurent Destailleur
baf8cdf618 Debug v24 2026-07-24 05:56:35 +02:00
Laurent Destailleur
7b45ae0606 Clean code and comment to fix sec pruposes. 2026-07-24 05:09:00 +02:00
Laurent Destailleur
ad98f29d68 Debug v24 2026-07-23 12:19:30 +02:00
Laurent Destailleur
729c2da70a Code comment 2026-07-23 11:44:05 +02:00
Laurent Destailleur
d03101fae1 Doc and clean code (viewimage and document must follow same rules) 2026-07-10 14:22:08 +02:00
Laurent Destailleur
7831dd0147 CSS 2026-06-30 00:36:56 +02:00
Frédéric FRANCE
559599945d
clean code for action specimen (#38865)
* clean code for action specimen

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-06-25 19:01:16 +02:00
Frédéric FRANCE
d2379e7863
clean deprecated (#38897)
* clean deprecated

* clean deprecated

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-06-22 02:18:10 +02:00
Laurent Destailleur
83d1720ef8 Move file securitycore.lib.php into blockedlog directory. 2026-06-19 22:07:57 +02:00
Laurent Destailleur
c20a2d2fa9 Fix filter 2026-06-16 18:41:45 +02:00
Laurent Destailleur
2d4bea5962 Debug v24 2026-06-15 18:51:49 +02:00
Laurent Destailleur
40f571ebca Prepare obfuscation key 2026-06-15 12:33:55 +02:00
Anthony Damhet
79f2df4dd6
UI|UX : AI Assistant Popover (#38756)
* UI|UX: Ajax interface for AI

Start UI

* Shortcut correction

* link to assistant full page

* Fix PHPStan "Variable $user might not be defined" in execute_tool.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-06-13 04:16:48 +02:00
Laurent Destailleur
dcf71ee3c6 More control on data on subcontractor page 2026-06-10 12:06:57 +02:00
Laurent Destailleur
f323918447 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2026-06-08 00:21:56 +02:00
Laurent Destailleur
ba464ac505 Removed uniqid 2026-06-06 16:51:13 +02:00
Laurent Destailleur
39e1441b2a Doc 2026-06-06 16:17:31 +02:00
Laurent Destailleur
d9d070c28d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into lne_audit_init_20260601 2026-06-03 22:13:41 +02:00
Laurent Destailleur
1cfed6e5cf NEW Can add profid2 in addition with profid1 2026-06-03 22:12:06 +02:00
Laurent Destailleur
6cffeaa220 Fix error when trying to rename a file 2026-06-02 01:57:24 +02:00
Laurent Destailleur
8ff57bfaf7 Fix generation of signature files 2026-06-01 19:57:57 +02:00
Laurent Destailleur
2aae4056a6 Debug v24 2026-06-01 13:44:37 +02:00
Laurent Destailleur
040efc03cf Fix duplicate manifest.json file 2026-05-26 13:33:38 +02:00
Laurent Destailleur
fecaafb11f Better default limit for lists. 2026-05-24 21:23:15 +02:00
sonikf
eb01da927b
fix translation (#38335) 2026-05-21 21:54:58 +02:00
Laurent Destailleur
3e3ca74a67 Debug AI assistant and MCP server 2026-05-20 01:27:19 +02:00
Pichinov-Jose
74fc27b68b
New: open AI Assistant in a popup overlay from top-toolbar icon (#38311)
Per maintainer feedback on #38307: "adding a popup (without leaving
current page) is better than opening a complete page".

The AI Assistant top-toolbar icon (added in develop by e735bed1 via
top_menu_ai() in main.inc.php) is a plain <a href> that navigates
the user away from whatever page they were on. This patch makes the
icon open the Assistant in a popup overlay instead, so the user
keeps their working context while interacting with the assistant.

Approach:

Reuses the existing Dolibarr core helper dolButtonToOpenUrlInDialogPopup()
(htdocs/core/lib/functions.lib.php) which:

  - Builds an <a> with accesskey, title, and an icon
  - On click, injects an <iframe src="$url" width="100%" height="98%">
    into a hidden <div id="idfordialog$name">
  - Opens the div as a jQuery UI dialog: modal:true, width:'80%',
    height: window.innerHeight - 150
  - Auto-appends "dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup=$name"
    to the URL so the embedded page renders without the surrounding
    top/left chrome (Dolibarr core handles these URL params in
    main.inc.php; no change needed to /ai/assistant/index.php)
  - Falls back gracefully to target="_blank" when JavaScript is off

Zero changes are needed to /ai/assistant/index.php itself: the
dol_openinpopup / dol_hide_topmenu / dol_hide_leftmenu URL params
are already handled generically by main.inc.php (the same way
modulebuilder, ECM and other popup-friendly screens are loaded).

Visible behaviour:

- Click on the AI top-toolbar icon -> Assistant opens centered as
  a modal dialog over the current page; the chat UI loads inside
  the iframe; closing the dialog returns the user to their original
  page with no navigation.
- Accesskey 'a' (unchanged from e735bed1) still focuses/triggers the
  icon.
- Tooltip switches from "AI (Ctrl+Alt+a)" to the localized
  "AI Assistant" string (the helper uses $label for both the title
  attribute and the dialog title -- one string for both is the
  helper's design).

Other top_menu_* icons (bookmark, quickadd, search, import) are
unchanged.

Tested:
- Click icon -> popup opens, Assistant chat works inside iframe.
- Close dialog -> back on the original page with no navigation.
- JavaScript disabled -> link degrades to opening in a new tab
  (target="_blank"), Assistant page renders normally with its full
  chrome.
- Accesskey Ctrl+Alt+a still triggers the icon.
2026-05-18 22:04:43 +02:00
Laurent Destailleur
4e01c0d163 CI 2026-05-18 02:39:13 +02:00
Laurent Destailleur
e735bed124 Add AI assistant in top menu #38307 2026-05-18 01:09:26 +02:00
Laurent Destailleur
034647c653 NEW Add picto "AI assistant" 2026-05-18 01:00:27 +02:00
Laurent Destailleur
461e65b069 Disable db check 2026-05-11 22:16:54 +02:00
Laurent Destailleur
7c2869b19c Merge branch 'fix_dev_remove_unused_jeditable' of
github.com:hregis/dolibarr into hregis-fix_dev_remove_unused_jeditable
2026-05-11 01:49:01 +02:00
Laurent Destailleur
efaa4452dc Test for MAIN_SECURITY_CSRF_WITH_TOKEN=3 2026-05-05 10:32:37 +02:00
Laurent Destailleur
19b21a6346 Debug v24 2026-04-30 12:34:15 +02:00
Laurent Destailleur
b07051116b Fix use a better uid in agenda RSS 2026-04-28 23:33:42 +02:00
Pierre Ardoin
58d2b2f282
# NEW|New Stock transfer module stabilization and full functional coverage (#37557)
* Update stocktransfer_card.php

* migration: limiter les triggers stocktransfer au script 23->24

* agenda: ajouter les libellés InDolibarr pour stocktransfer

* stocktransfer pdf: éviter method_exists sur ligne nulle

* migration 23-24: ajouter le point-virgule manquant avant triggers

* notification: ajouter le support stocktransfer et event MODIFY

* langs: ajouter traductions Notify_STOCKTRANSFER_*

* langs: ajouter la clé Stocktransfer dans stocks.lang

* feat(stocktransfer): add quick add entry for stock transfers

* fix(quickadd): add stock transfer entry directly in main menu list

* projet: ajouter stocktransfer avant stock_mouvement

* projet: retirer le filtre global sur stocktransfer

* projet: renommer le titre stocktransfer et ajouter traductions

* projet: masquer montant sur la section stocktransfer

* projet: aligner la marge de stocktransfer sur commentaire

* projet: afficher NA pour les montants des stocktransfer

* projet: ajouter tooltip NA pour stocktransfer

* projet: ajouter message dédié NoAmountforStockTransfer

* projet: ajouter colonnes logistiques aux transferts de stock

* projet: retirer colonne date des transferts et aligner totaux

* projet: ajouter stocktransfer au badge de la vue d'ensemble

* projet: uniformiser les largeurs de colonnes stocktransfer

* stocktransfer: use email template type for presend form

* admin: add stock transfer email template type in setup list

* admin: show stock transfer mail template type when module enabled

* admin: move stock transfer mail type below products with box icon

* stocktransfer: align admin icon markup and presend attachment path

* langs: use stocktransfer-prefixed agenda trigger labels

* Update agenda.lang

* Update admin.lang

* Update other.lang

* Update stocks.lang

* Update admin.lang

* Update other.lang

* Update stocks.lang

* Update admin.lang

* Update agenda.lang

* Update stocks.lang

* Update admin.lang

* Update agenda.lang

* Update agenda.lang

* Update other.lang

* Update stocks.lang

* Update other.lang

* Update stocks.lang

* Update notify.class.php

* Remove destocking and stock increment triggers

Removed stock transfer action triggers for destocking and stock increment cancellation.

* Update 23.0.0-24.0.0.sql

* Update agenda.lang

* Update other.lang

* Update stocktransfer_card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-04-28 11:07:19 +02:00
Laurent Destailleur
022a6c3b51 Doc 2026-04-28 04:16:19 +02:00
Eric - CAP-REL
6f73a4f3bf
add tinymce as a candidate to replace unmaintained fckeditor ... (#37989) 2026-04-24 12:08:47 +02:00
Frédéric FRANCE
a26acf7251
clean code (#37921)
* clean code

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-04-20 20:42:02 +02:00
Laurent Destailleur
5056dfc91e Automated merge from 23.0 to develop 2026-03-26 20:22:41 +01:00
Laurent Destailleur
2bb779fe14 Automated merge from 22.0 to 23.0 by tool pullmerge.sh 2026-03-26 20:22:24 +01:00
ThomasNgr-OpenDSI
fb251fee34
FIX #GHSA-39vm-9q4p-6jjg - force disabling module possible on demo only (#37629)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-03-26 17:28:28 +01:00
Laurent Destailleur
df87252025 Automated merge from 23.0 to develop 2026-03-26 02:00:09 +01:00
Laurent Destailleur
1072e090ec FIX #GHSA-39vm-9q4p-6jjg - force disabling module possible on demo only 2026-03-25 23:46:45 +01:00
Laurent Destailleur
9d2ac941b7 Restore feature to manage timeout (when garbage is done at page access) 2026-03-25 23:36:43 +01:00
Laurent Destailleur
2532504fc3 Log 2026-03-23 16:37:33 +01:00
Laurent Destailleur
43d16d73ba Add more information on pushcounter call 2026-03-23 15:45:04 +01:00
John BOTELLA
30c7e86687
Fix unique db lang name generator (#37467)
* fix_unique_db_lang_name

* Fix: add clear all db

* Fix: add clear all db

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-03-12 14:37:31 +01:00