Uom in sales invoice

Why ‘uom’ in sales invoice get values from uom doctype. Whereas logically it should get value from uoms defined in item master.
Its a strange decision? Anyone know its reason?

What is the issue you are facing? Usually, UOM details will come from the item master only.

I am using v12. My sales invoice item is getting uom from uom master. All unit of measure are showing. Wheress i want to show only limited uoms(as per item master).
Any idea

In my case its not working. I m getting uom from uom list

I understood. ERPNext is not limiting the UOMs in transactions based on the item master. It will list all UOMs. It will take only the conversion rate from the item master.

Thanks for reply. Yes. You are right. But can this be changed . Either by any defined option or via scripting? Any help will be appreciated

https://github-wiki-see.page/m/jigneshpshah/greycube_helpmanual/wiki/Filter-UOM-in-Sales-Invoice-Item

  setup: function (frm) {
    frm.set_query("uom", "items", function (doc, cdt, cdn) {
      let row = locals[cdt][cdn];
      return {
        query:
          "erpnext.accounts.doctype.pricing_rule.pricing_rule.get_item_uoms",
        filters: {
          value: row.item_code,
          apply_on: "Item Code",
        },
      };
    });
  },
});
2 Likes