Error "Field 'label_compte' doesn't have a default value" during import of accounting entries

Hello,

I’m in charge of the accounting part of a small local association, and I’m trying to use Dolibarr for it. I found that it would be a good place to consolidate all the data of the association.

Part of the accounting system has been done by hand resulting in an excel sheet, and I would like to import it into Dolibarr.

I’ve therefore used the import wizard but when simulating the import action I received an error “Field ‘label_compte’ doesn’t have a default value”.

I was until yesterday with the version 10.5 and upgraded to 11.0.1 hoping that it would have solved the issue. Unfortunately it didn’t.

I’ve look around on this forum and on internet for a similar issue, and found that this field shall have a value. So by changing the core/modules/modAccounting.class.php file (on line 290 uncommenting "//‹ b.label_compte ›=>‹ LabelAccount ›, " and the same on thine 307 for the template creation), the error was removed.

But it didn’t solve the point as a new one appeared on the field ‘montant’ instead of ‘label_compte’.

I didn’t find any reference on ‘montant’ in this file, so I’m lost.

Is anybody has the same issue?

Or did I miss a point on the set-up of the whole?

Any help will be greatly appreciated.

thanks,

Cyril

[Late update]My main system is Ubuntu 19.10 (where I have the issue).
I’ve tried also today on Windows (Dolibarr 10.3) and the import process went well.
Is there any difference in between the 2 install?

A short reply to myself to help others that could meet the same issue.

I found that that by editing the sql_mode variable and removing the “STRUCT_TRANS_TABLE” value, the import runs correctly
– verify what is the previous value
SELECT @@GLOBAL.sql_mode
– update the value (remove the STRUCT_TRANS_TABLE)
SET @@GLOBAL.sql_mode=‘new value’

However I’m not sure of the full effect of removing this setting.

Bank ID 25 - We tried to add an unbalanced transaction to the ledger for supplier invoice SI2311-0012. It is cancelled. Definitely a mistake. and I got label compte errors.
The reason for these errors is that the company perceives the IBAN number as a chart of accounts because an accounting chart of accounts is not assigned to its bank accounts.