Is sales item/is purchase item

I noticed that ‘is sales item’ and ‘is purchase item’ have been removed in V7. Why is this?

1 Like

It was un-necessary. Many users would not have realized that they cannot create a Purchase Order because the item is not tagged as a purchase item.

Maybe there could be a setting that disallows an item to be bought or sold.

2 Likes

I believe I may be able to accomplish the same thing with a filter, but can I make the filter apply to more than one parameter? For example:

cur_frm.fields_dict['item_code'].get_query = function(doc) {
    return {
        filters: {
            "workflow_state": "OK",
            "workflow_state": "Under Revision, OK to use"
        }
    };
};

@cpurbaugh,

cur_frm.fields_dict["item_code"].get_query = function(doc){
  return {
    filters: {
      "workflow_state": ["in", ["Ok", "Under Revision, Ok to Use"]]
    }
  }
}
2 Likes

cool, thanks Max!

Hi Rushabh,

wouldn’t this still come back to the same thing? In any case, I thought the purpose of the ‘is sales item / is purchase item’ field was to disallow an item from being bought or sold. This is an important feature in my opinion

Regards

2 Likes

Good Morning !

I think it was a very useful & Important feature particularly for manufacturing !
We are missing it badly :frowning:
All the 3 operations ( Purchase , Sales & Manufacturing ) are different in our case
We donot sell anything that we purchase - only manufactured items are sold in our case ( Except for @ 1or 2% items)
So it was a clear demarcation of the materials for all the 3 Types of documents
Now all the items are shown in the item search field !

Is their any workaround to get this feature back ??

Regards,

1 Like

The workaround would be to use a filter (custom script) and some custom fields to recreate the feature.

What about the cloud users?

Some of my items cannot be bought, only manufactured.
Some others are just raw materials which should not be sold.

How can I have the old “is sales item”, “is purchase item” and “allow production order” feature back?

Thanks,
Nuno

this trick worked for me:

  1. go to items doc type > menu > customize .
  2. Create the needed fields as type check is_sales_item , is_purchase_item , is_manufacture_item o whatever name you want to use.
  3. go to setup > custom scrips and add the fallowing for each doctype that is required to filter the items. Ex for sales invoice . Create custom scrip for sales invoice and add
    frappe.ui.form.on(“Sales Invoice”, “refresh”, function(frm) {
    cur_frm.fields_dict[‘items’].grid.get_field(‘item_code’).get_query = function(doc, cdt, cdn) {
    return {
    filters:[
    [‘is_sales_item’, ‘=’, ‘1’]
    ]
    }
    }
    });

for puchase you can go to purchase order and do the same the scrip will be like this:

frappe.ui.form.on(“Purchase Order”, “refresh”, function(frm) {
cur_frm.fields_dict[‘items’].grid.get_field(‘item_code’).get_query = function(doc, cdt, cdn) {
return {
filters:[
[‘is_purchase_item’, ‘=’, ‘1’]
]
}
}
});

1 Like

@cpurbaugh @Randy_Lowery

Thanks for the details !
But its really frustrating to see such basic functionality removed which i think is very important for a manufacturing setup!

There surely is a workaround , but now we have to do the following:

Modify the script as mentioned for all the documents - through out the work flow
Modify @ 3500 raw materials - which are purchase only items
@ 300 sub assemblies - only manufactured - neither purchased nor Sold
@ 75 Finished good / accessories - only manufacturing & sales - no purchase
Rgds,

For what i know i you already had check the item is_purchase / is_sold in v6 the data is already stored in the mariadb so creating the fields again will update automatically. anyway you can check your database for the values there.

I am Not a developer
But shall check the possibility

Thanks for the details !

@rmehta could you consider revisiting this?

It’s a feature that made things more organized and if it wasn’t somehow causing issues in the code then I’m really wondering why it was removed in the first place. ERPNext uses the same item master for everything (products, raw materials, assets, consumables etc) and letting all these items pop-up when trying to make a Sale (or a Purchase as the case may be) makes the system look disorganized in some way. It’s also a potential source of errors in entry

There’s no need causing users unnecessary headaches and frustration over basic things like this. Please reconsider

Thanks

Kind regards,

@wale we had many instances that users did not figure why some items don’t show up in purchase orders so we removed this.

Maybe there could be a negative list but I am not sure

Okay, thanks a lot

Maybe some sort of notification or help message letting users know that Items not marked as ‘Purchase Items’ are not appearing in the Purchase Order might also be a way out? There could also be something in the settings that allows a user decide if he/she wants this functionality turned on/off?

In any case, please just consider all available options especially for the sake of users who really need this. Personally, it’s not very high priority for me but I know how it feels to have a feature that’s important to your business suddenly removed

As always, can’t thank you and the team enough for the great work you’re doing

Cheers!

1 Like

It worked wonderfully for both the Sales Order and the Purchase Receipt.

@Randy_Lowery, do you think you could help me adapt the script for the BOM item? I want to filter the BOM’s main item, not the ones in the item list. Thanks!

I think this feature is too important to be removed. It made dealing with items so much easier.
Maybe you could add an option to enable/disable the filtering in the selling/purchase setup instead of removing it.

I’m looking at this same feature and I don’t understand why it’s been removed. Now all my RAW MATERIALS are coming as sale item in POS. I’m not a program so would attempt to make code changes and hopefully this option can be added back on in the next update as it seems its a quick change.

also liked and used the feature…nicely filtered items for sales or purchase or both when populating as sales/purchase order