Skip to content

FIX: we must retrieve linked order_supplier and no other object#33602

Merged
eldy merged 3 commits intoDolibarr:20.0from
altairisfr:fix_reception_fetch
Mar 26, 2025
Merged

FIX: we must retrieve linked order_supplier and no other object#33602
eldy merged 3 commits intoDolibarr:20.0from
altairisfr:fix_reception_fetch

Conversation

@altairis-noe
Copy link
Copy Markdown
Contributor

FIX we must retrieve linked order_supplier and no other object

If we want to link objects different than a CommandeFournisseur to a Reception object, we get an ugly error, because fetch->origin will try to fetch… well, not the actual origin!
image

With this correction: here we go!
image

@altairis-noe
Copy link
Copy Markdown
Contributor Author

Hey there, @eldy (or any Travis CI expert). I fail to understand why Travis can’t build. The error states that when fetching a Reception object with id = 1, it was not found (return of the fetch method = 0), which seems fine to me, as I don’t know that there should be such a reception in db.

Is that related to my modification, and in which way ?

@altairis-noe
Copy link
Copy Markdown
Contributor Author

Maybe @frederic34 would know why Travis is so mean to me !

@frederic34
Copy link
Copy Markdown
Member

@altairis-noe on your example can you remove link to order_supplier and see what happen with your change

@altairis-noe
Copy link
Copy Markdown
Contributor Author

Good point ! As Reception are created from a Purchase order, I would not have thought about what would happen in case they don’t have an originating one… Thx @frederic34

Comment thread htdocs/reception/class/reception.class.php Outdated
@eldy eldy merged commit 58039d4 into Dolibarr:20.0 Mar 26, 2025
7 checks passed
@altairis-noe altairis-noe deleted the fix_reception_fetch branch March 27, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants