ATM-Consulting / dolibarr_module_history

donne un historique plus poussé et complet pour un objet
9 stars 7 forks source link

Error with FactureFournisseurLigneRec and save entity #38

Open camlafit opened 11 months ago

camlafit commented 11 months ago

Hi

If HISTORY_STOCK_FULL_OBJECT_ON_DELETE is set to true and we try to update a FactureFournisseurLigneRec , an error is raise :

[Thu Nov 30 16:02:17.389129 2023] [proxy_fcgi:error]  AH01071: Got error 'PHP message: PHP Warning:  Undefined variable $socid in /var/www/d/dolibarr/ww
w/dolibarr/htdocs/fourn/facture/card-rec.php on line 145PHP message: PHP Fatal error:  Uncaught Error: Object of class FactureFournisseurLigneRec could not be converted to string in /var/www
/d/dolibarr/www/dolibarr/htdocs/core/db/mysqli.class.php:479\nStack trace:\n#0 /var/www/d/dolibarr/www/dolibarr/htdocs/core/class/commonobject.class.php(9211): Do
liDBMysqli->escape()\n#1 /var/www/d/dolibarr/www/dolibarr/htdocs/core/class/commonobject.class.php(9250): CommonObject->quote()\n#2 /var/www/d/dolibarr/www/doliba
rr/htdocs/custom/abricot/includes/class/class.seedobject.php(1091): CommonObject->createCommon()\n#3 /var/www/d/dolibarr/www/dolibarr/htdocs/custom/abricot/includes/class/class.seedo
bject.php(929): SeedObject->createCommon()\n#4 /var/www/d/dolibarr/www/dolibarr/htdocs/custom/history/core/triggers/interface_99_modHistory_Historytrigger.class.php(162): SeedObject-
>create()\n#5 /var/www/d/dolibarr/www/dolibarr/htdocs/cor...'

If HISTORY_STOCK_FULL_OBJECT_ON_DELETE is set to False, no more error.

atm-lena commented 7 months ago

Can you give us the version of dolibarr, php, history and abricot please ?