port get_object_reference to xmlid_to_object as it raise a ValueError as it was half ported by removing cr uid
fix generate_po check to ensure it is executed on only one rec
fix copy if type='purchase'

If a purchase.order is copied with type=purchase, make copy() calls
create() with 'draft_po' in the context. This way create() takes care of
advancing the workflow appropriately to draft_po.
Merge branch '8.0-add-purchase_requisition_extended' into 8.0-test_PRs