I would like to add one field to the Projects Overview “List of Stock Transfers related to the project”.
Since the Advanced Stock Transfer module already can associate transfers with a project, I don’t think I need to create or add a new table or database, only to add a section to the php file, is this correct?
I assume I must add another array similar to the code as for re-arranging the elements (Project -> Overview -> Element), only to use the correct terminology from the Advanced Stock Transfer. I assume I can find this either searching through the wiki or github, or by downloading and looking at my database in some SQL viewer
Since I am changing a built-in module, I should probably make a backup of it so that new versions don’t overwrite it?
So I’ve got a tentative fix in a pull request up on Github for this, and it properly links the stock movement (and Third Party, if applicable). I would like to adjust the fields displayed to properly reflect what’s important, but it appears that every item in the Project Overview suffers from this, so that’s a larger project for down-the-road.
Since you are likely interested in viewing the advanced stock transfers from projects (as you mentioned to me) - you can either manually make the changes from the commit or it’ll possibly be in the next update.
If you do either method, you will still need to set the global config in Other Setup until there’s some more testing and I will in the future try to add the option into the Projects module settings once any possible bugs have been squashed.
Thanks for your solution. I am also trying to get that feature working. I have several instances I am playing around with.
Version 17.0.3. is working as expected
Version 18.0.1 gives me an HTTP ERROR 500 In /product/stock/stocktransfer/stocktransfer_card.php?id=7` as soon as I click on ADD (Hinzufügen)
I have seen that you are also on 18.0.1, so it is probably working. Do you have an idea what could be the issue? Maybe I am missing something, and you can give me a hint into the right direction.
I think this is an issue with your particular install for some reason - or you don’t have some kind of module enabled perhaps? I have only had issues with trying to delete an advanced stock transfer as there’s something wrong in the SQL query there, but creating one works properly on my end.
I had to manually delete the entries from the SQL database after I was experimenting but eventually I’d like to fix this bug as well
Thanks for your answer! Can you tell me what you are using for your installation? I am using a fresh installation on an Ubuntu System 22.04.3 LTS. Before that, I was using Docker.
Can you confirm that it works for you with the current version 18.0.3?
Initially, I have set company name and country.
Then, I have created two warehouses and some products (also corrected the stock and added a stock value)
Here is the error log of the Apache after I hit “ADD”
[Wed Nov 15 10:31:26.782922 2023] [php:error] [pid 682] [client xxxxxx:50458] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/share/dolibarr/htdocs/product/stock/stocktransfer/stocktransfer_card.php:198\nStack trace:\n#0 {main}\n thrown in /usr/share/dolibarr/htdocs/product/stock/stocktransfer/stocktransfer_card.php on line 198, referer: http://xxxxxxxxx/dolibarr/product/stock/stocktransfer/stocktransfer_card.php?id=1
I actually ended up doing a local install of Dolibarr today, as we previously had it on a remote server but want it locally … I set up Dolibarr and backed up / restored my existing database into this local version and now I am running into the same issue.
[Mon Nov 20 14:17:44.862531 2023] [php:error] [pid 232549] [client 192.168.1.111:56902] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/html/dolibarr/htdocs/product/stock/stocktransfer/stocktransfer_card.php:198\nStack trace:\n#0 {main}\n thrown in /var/www/html/dolibarr/htdocs/product/stock/stocktransfer/stocktransfer_card.php on line 198, referer: http://192.168.1.111/dolibarr/htdocs/product/stock/stocktransfer/stocktransfer_card.php?id=233&save_lastsearch_values=1