'check in manage account if sales order required or not'

def so_required(self):

    if (frappe.db.get_value(u'Selling    Settings', None, u'so_required') == u'Yes'):
        for d in self.get(u'items'):
            if (not d.against_sales_order):
                frappe.throw(_(u'Sales    Order    required    for    Item    {0}').format(d.item_code))
