Skip to content

Conversation

@sonikf
Copy link
Contributor

@sonikf sonikf commented Nov 15, 2025

Hi @eldy

I've gone through the process of creating a reception from purchase order with option to use standalone reception to off comparing step by step with v. 22 and everything seems fine!
Same result with RECEPTION_STANDALONE = 1

Through the code we can see origin takes different values
order_supplier(most common), commandeFournisseur, supplierorder, supplier_order, CommandeFournisseur, commande_fournisseur
Can you give me your guidance on this?

examples

$this->origin = ($obj->origin ? $obj->origin : 'commande'); // For compatibility
$this->origin_type = ($obj->origin ? $obj->origin : 'commande'); // For compatibility

if (!empty($this->origin) && $this->origin_id > 0 && ($this->origin == 'order_supplier' || $this->origin == 'commandeFournisseur')) {

if ($origin == 'supplierorder' || $origin == 'order_supplier') {

if ($origin == 'supplier_order') {

$object->origin = 'CommandeFournisseur';

//$origin = 'commande_fournisseur';

$object->origin = 'CommandeFournisseur';

@sonikf sonikf marked this pull request as draft November 15, 2025 23:56
@eldy
Copy link
Member

eldy commented Nov 19, 2025

Go toward to order_supplier. After regis comment, go to "supplier_order" instead.

@hregis
Copy link
Contributor

hregis commented Nov 19, 2025

@sonikf @eldy but in $conf (and all isModEnabled) this is "supplier_order" and "supplier_invoice"

$alreadysent = array();

//$origin = 'commande_fournisseur';
$origin = 'commande_fournisseur';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$origin seems set and used previously.
I suggest to set $origin to 'supplier_order' here only is unset or empty.

Then on line 2491, you can replace with
(($origin == 'supplier_order') ? 'commande_fournisseur' : $origin)

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