Skip to content

Commit

Permalink
feat(unicommerce): capture batch group field (frappe#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Apr 25, 2022
1 parent 7210dd4 commit e8a932b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions ecommerce_integrations/unicommerce/constants.py
Expand Up @@ -29,6 +29,7 @@
ITEM_LENGTH_FIELD = "unicommerce_item_length"
ITEM_WIDTH_FIELD = "unicommerce_item_width"
ITEM_HEIGHT_FIELD = "unicommerce_item_height"
ITEM_BATCH_GROUP_FIELD = "unicommerce_batch_group_code"
SHIPPING_PACKAGE_STATUS_FIELD = "unicommerce_shipping_package_status"
IS_COD_CHECKBOX = "unicommerce_is_cod"
SHIPPING_METHOD_FIELD = "unicommerce_shipping_method"
Expand Down
Expand Up @@ -22,6 +22,7 @@
GRN_STOCK_ENTRY_TYPE,
INVOICE_CODE_FIELD,
IS_COD_CHECKBOX,
ITEM_BATCH_GROUP_FIELD,
ITEM_HEIGHT_FIELD,
ITEM_LENGTH_FIELD,
ITEM_SYNC_CHECKBOX,
Expand Down Expand Up @@ -231,6 +232,13 @@ def setup_custom_fields(update=True):
insert_after=ITEM_WIDTH_FIELD,
print_hide=1,
),
dict(
fieldname=ITEM_BATCH_GROUP_FIELD,
label="Batch Group Code",
fieldtype="Data",
insert_after=ITEM_HEIGHT_FIELD,
print_hide=1,
),
],
"Sales Order": [
dict(
Expand Down
2 changes: 2 additions & 0 deletions ecommerce_integrations/unicommerce/product.py
Expand Up @@ -10,6 +10,7 @@
from ecommerce_integrations.unicommerce.api_client import JsonDict, UnicommerceAPIClient
from ecommerce_integrations.unicommerce.constants import (
DEFAULT_WEIGHT_UOM,
ITEM_BATCH_GROUP_FIELD,
ITEM_HEIGHT_FIELD,
ITEM_LENGTH_FIELD,
ITEM_SYNC_CHECKBOX,
Expand Down Expand Up @@ -37,6 +38,7 @@
"length": ITEM_LENGTH_FIELD,
"width": ITEM_WIDTH_FIELD,
"height": ITEM_HEIGHT_FIELD,
"batchGroupCode": ITEM_BATCH_GROUP_FIELD,
}

ERPNEXT_TO_UNI_ITEM_MAPPING = {v: k for k, v in UNI_TO_ERPNEXT_ITEM_MAPPING.items()}
Expand Down

0 comments on commit e8a932b

Please sign in to comment.