Hi,
im working shoes manufacture , so i want to create a tools to duplicate an items for every size that we needs.
- select the items
- size from
- size to
- multiply
- press generate items
but i had a problem with frappe documents… the items that i created is not saved… here mu codes:
record = frappe.get_doc({
“doctype”:“Item”,
“naming_series”:parent_item.naming_series,
“item_code”:news,
“variant_of”:parent_item.variant_of,
“item_name”:“”“{} Warna {} Size {}”“”.format(parent_item.item_name,parent_item.colors,counter),
“item_group”:parent_item.item_group,
“stock_uom”:parent_item.stock_uom,
“brand”:parent_item.brand,
“barcode”:parent_item.barcode,
“end_of_life”:parent_item.end_of_life,
“image”:parent_item.image,
“colors”:parent_item.colors,
“description”:parent_item.description,
“has_variants”:parent_item.has_variants,
“variants”:parent_item.variants,
“is_stock_item”:parent_item.is_stock_item,
“default_warehouse”:parent_item.default_warehouse,
“tolerance”:parent_item.tolerance,
“valuation_method”:parent_item.valuation_method,
“min_order_qty”:parent_item.min_order_qty,
“is_asset_item”:parent_item.is_asset_item,
“has_batch_no”:parent_item.has_batch_no,
“has_serial_no”:parent_item.has_serial_no,
“serial_no_series”:parent_item.serial_no_series,
“warranty_period”:parent_item.warranty_period,
“net_weight”:parent_item.net_weight,
“re_order_level”:parent_item.re_order_level,
“re_order_qty”:parent_item.re_order_qty,
“apply_warehouse_wise_reorder_level”:parent_item.apply_warehouse_wise_reorder_level,
“reorder_levels”:parent_item.reorder_levels,
“is_purchase_item”:parent_item.is_purchase_item,
“default_supplier”:parent_item.default_supplier,
“lead_time_days”:parent_item.lead_time_days,
“expense_account”:parent_item.expense_account,
“buying_cost_center”:parent_item.buying_cost_center,
“last_purchase_rate”:parent_item.last_purchase_rate,
“uoms”:parent_item.uoms,
“manufacturer”:parent_item.manufacturer,
“manufacturer_part_no”:parent_item.manufacturer_part_no,
“supplier_items”:parent_item.supplier_items,
“is_sales_item”:parent_item.is_sales_item,
“is_service_item”:parent_item.is_service_item,
“publish_in_hub”:0,
“synced_with_hub”:0,
“max_discount”:parent_item.max_discount,
“income_account”:parent_item.income_account,
“selling_cost_center”:parent_item.selling_cost_center,
“customer_items”:parent_item.customer_items,
“taxes”:parent_item.taxes,
“inspection_required”:parent_item.inspection_required,
“quality_parameters”:parent_item.quality_parameters,
“default_bom”:“”,
“is_pro_applicable”:“No”,
“is_sub_contracted_item”:“No”,
“customer_code”:parent_item.customer_code,
“show_in_website”:0,
})
record.insert(ignore_permissions=True)
is there something i missed ??
please advise , thankss