Merge pull request #19940 from marination/item_manufacturer_table_dev
fix: Removed 'manufacturers' table from Item Master
This commit is contained in:
commit
b500f2ce4c
@ -135,8 +135,7 @@
|
|||||||
"publish_in_hub",
|
"publish_in_hub",
|
||||||
"hub_category_to_publish",
|
"hub_category_to_publish",
|
||||||
"hub_warehouse",
|
"hub_warehouse",
|
||||||
"synced_with_hub",
|
"synced_with_hub"
|
||||||
"manufacturers"
|
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -1016,12 +1015,6 @@
|
|||||||
"label": "Synced With Hub",
|
"label": "Synced With Hub",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "manufacturers",
|
|
||||||
"fieldtype": "Table",
|
|
||||||
"label": "Manufacturers",
|
|
||||||
"options": "Item Manufacturer"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"depends_on": "eval:!doc.__islocal",
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "over_delivery_receipt_allowance",
|
"fieldname": "over_delivery_receipt_allowance",
|
||||||
@ -1049,7 +1042,7 @@
|
|||||||
"idx": 2,
|
"idx": 2,
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"modified": "2019-10-09 17:05:59.576119",
|
"modified": "2019-12-13 12:15:56.197246",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item",
|
"name": "Item",
|
||||||
|
|||||||
@ -125,7 +125,6 @@ class Item(WebsiteGenerator):
|
|||||||
self.validate_auto_reorder_enabled_in_stock_settings()
|
self.validate_auto_reorder_enabled_in_stock_settings()
|
||||||
self.cant_change()
|
self.cant_change()
|
||||||
self.update_show_in_website()
|
self.update_show_in_website()
|
||||||
self.validate_manufacturer()
|
|
||||||
|
|
||||||
if not self.get("__islocal"):
|
if not self.get("__islocal"):
|
||||||
self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group")
|
self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group")
|
||||||
@ -145,13 +144,6 @@ class Item(WebsiteGenerator):
|
|||||||
if cint(frappe.db.get_single_value('Stock Settings', 'clean_description_html')):
|
if cint(frappe.db.get_single_value('Stock Settings', 'clean_description_html')):
|
||||||
self.description = clean_html(self.description)
|
self.description = clean_html(self.description)
|
||||||
|
|
||||||
def validate_manufacturer(self):
|
|
||||||
list_man = [(x.manufacturer, x.manufacturer_part_no) for x in self.get('manufacturers')]
|
|
||||||
set_man = set(list_man)
|
|
||||||
|
|
||||||
if len(list_man) != len(set_man):
|
|
||||||
frappe.throw(_("Duplicate entry in Manufacturers table"))
|
|
||||||
|
|
||||||
def validate_customer_provided_part(self):
|
def validate_customer_provided_part(self):
|
||||||
if self.is_customer_provided_item:
|
if self.is_customer_provided_item:
|
||||||
if self.is_purchase_item:
|
if self.is_purchase_item:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user