Powerfull feature Link to an object

A very powerful feature in Dolibarr is the ability to add extra attributes / fields in any module. Link to an object is one of my favorites because you are able to link everything to all and all to everything. The setup of a link to an object is easy, but you have to know the code.

I am struggling to find how to link a purchase order.

Link a manufacturing order-> mo:mrp/class/mo.class.php
Link an order -> commande:commande/class/commande.class.php
Link a purchase order -> ???
Link a product -> product:product/class/product.class.php

Can anyone help me where to find it or just give the plain answer?

Hello :grinning:

can you try :
commandefournisseur:fourn/class/fournisseur.commande.class.php

Good continuation

Thanks that’s the trick

Hi,
I linked to the User Object: User:user/class/user.class.php
I have seen a list of users in this field.
Question: What is the “Default value (Database)” if I want the default value to be Current User.
Thank so much!

I think “link to object” not working in v19.02.

Can anyone confirm?

I can confirm. Not working for Supplier Orders ( CommandeFournisseur )

Just tested in 19.0.3

commande:commande/class/commande.commande.class.php
commandefournisseur:fourn/class/fournisseur.commande.class.php

are both working

Half working for me:
Display works correctly, but input doesnt.

how is your field setup?

Exactly like yours.
It’s on the line item elements of a sales order. I’m wondering if this has any bearing to it.