'When a inv recv record is created then create the recv_ref.'

@staticmethod
def inv_recv_onaccept(form):

    db = current.db
    rtable = db.inv_recv
    id = form.vars.id
    record = rtable[id]
    if (not record.recv_ref):
        code = current.s3db.supply_get_shipping_code(current.deployment_settings.get_inv_recv_shortname(), record.site_id, rtable.recv_ref)
        db((rtable.id == id)).update(recv_ref=code)
