Is sales item/is purchase item

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

Lets open a github issue for this and take it from there.

Maybe we an allow a negative tagging (like not_for_sale and not_for_purchase) so new users don’t get annoyed too.

https://github.com/frappe/erpnext/issues/6076

3 Likes

@rmehta

I still think the Original option was more better & already set for all the items for existing users !
The Is manufactured item is still missing .That is also important .

One suggestion is - the Default setting when the item is created can be

  • Is Purchase is enabled
  • Is Sales is enabled
  • Is Manufactured is enabled .
    & if required can be changed further for respective items as required

This implementation shall be more better for existing user!

Thanks for Reconsidering this functionality !

Hi @rmehta,

I agree with @chetan. Why not just make ‘Is Sales Item’, ‘Is Purchase Item’, ‘Is Manufactured Item’ checked by default? This easily addresses the issue you’re concerned about and also makes existing users happy

Cheers!

1 Like

Yeah its the same thing! Maybe will keep the original fields

3 Likes

The feature is back in ERPNext v 7.0.29: [revert] is_sales_item, is_purchase_item back · frappe/erpnext@d973c16 · GitHub

2 Likes

Hi @nabinhait,
Good to see with the latest round of changes, this feature has been added back. It works fine for sales order, if an item is not for sale the item doesn’t show in the list. But in POS the none sale items show up as well.

Is there a separate setting in POS via config or code?

This shouldn’t be the case. Please open a GitHub issue and link to it here.

@cpurbaugh this issue was resolved in one of the latest updates. I had another thread for this and I updated that one.