Identify a default contact per doctype
Description
Environment
Attachments
relates to
Activity

Diego Ruiz June 25, 2020 at 8:14 AM
Closing this ticket because there has no been activity in 5 years.
These kinds of rules are client-specific and can be solved with plugins.
If you are still interested in this feature, please feel free to create a new ticket or reopen the ticket.
Carlos Ruiz April 17, 2015 at 7:28 PM
Easier way could be discover the billing user as the user associated to the billing adress, and the shipping user as the user associated to the shipping adress. For a more specific behavior a callout plugin must do the trick as they are executed after the core callouts.

Nicolas Micoud April 17, 2015 at 9:42 AM
Hi Carlos,
Adding this list will only solves a part of the issue.
I mean, if you select SOPOType = SO, then we should display another field where we can choose between Order, Shipment and Invoice.
Then, in the Callout (Order/Invoice).bpartner, we could select the user according to PO/SO and document base type.
Moreover, using a dynamic validation, we could also display only SO or PO users (if at least one is set) or all.
wdyt ?
Carlos Ruiz April 15, 2015 at 9:24 PM
- this could be solved adding SOPOType to AD_User and changing the query in CalloutOrder.bPartner (and invoices too) to get the corresponding user marked for the SO/PO Both trx.

Francisco Vannini October 4, 2012 at 12:31 PM
Very nice. Will speed greatly up the registering of these documents .
These features reminds me of the check boxes that are available in the "Address" tab of the Business Partner (This Address if for billing, This one for Delivery, etc..). The default behavior would definitely be more manageable over Base Document.
Details
Details
Assignee
Reporter

There is no way to automatically select a default contact on order/shipment/invoices.
Whereas those fields exist on C_Order (AD_User_ID, Bill_User_ID, Ship_User_ID).
The idea would be to say "this contact is default for this docType (or docBaseType)".
Then, it will be easy to affect the good contact when creating order (those 3 fields will be filled easily). Could also be used if creating an invoice (or shipment) without reference to an order.
How can it be done ?
Proposal : add two references on AD_User - "IsDefaultForSO" and "IsDefaultForPO" - which will contained those items Invoice, Invoice, Order, Invoice/Shipment, Invoice/Order, Invoice/Order/Shipment
WDYT ?