Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(unicommerce): capture batch group field #186

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ecommerce_integrations/unicommerce/constants.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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