You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/10/08 09:27:00 UTC
[jira] [Commented] (OFBIZ-12001) Order reservation not happens while Set explode item flag from catalog
[ https://issues.apache.org/jira/browse/OFBIZ-12001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124927#comment-18124927 ]
ASF subversion and git services commented on OFBIZ-12001:
---------------------------------------------------------
Commit 44aa0788121f53afa097238f58049512803f9ad3 in ofbiz-framework's branch refs/heads/OFBIZ-13503-indicator-field-default from Pranay Pandey
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=44aa078812 ]
Improved: Auto-generated indicator (Y/N) fields silently default to "Y" and overwrite a NULL value on unrelated form saves (OFBIZ-13503)
Auto-generated create/update forms rendered indicator (Y/N) fields as a drop-down with only "Y" and "N" options. For a nullable column holding NULL the browser preselected "Y", so saving any unrelated field on the form silently persisted "Y" (e.g. ProductStore.allocateInventory). OFBIZ-12001 addressed this for allocateInventory only; this applies it
to every auto-generated indicator field.
- ModelFormFieldBuilder now adds a blank option to indicator drop-downs on non-find forms when the entity field is nullable; not-null fields keep only Y/N. Find forms already had the blank option.
- GenericEntity.set() now converts an empty string on an indicator field to null, so selecting the blank option stores NULL rather than an empty string. Note that setting "" on a not-null indicator field now fails instead of storing an empty value.
> Order reservation not happens while Set explode item flag from catalog
> ----------------------------------------------------------------------
>
> Key: OFBIZ-12001
> URL: https://issues.apache.org/jira/browse/OFBIZ-12001
> Project: OFBiz
> Issue Type: Bug
> Components: product/catalog
> Affects Versions: Trunk, Upcoming Branch
> Reporter: Ankush Upadhyay
> Assignee: Arun Patidar
> Priority: Major
> Fix For: Upcoming Branch
>
>
> Encounter this issue while working on OFBIZ-11928.
> Here is the research detail:
> One thing I notice is, I was using OFBiz E-Commerce Store(productStoreId 9000) and was setting explode items flag from catalog. But when I placed order, it didn't reserve the order items. I digged more into it and found that In seed data, allocate inventory flag for this store is null but when when we set explode items flag from catalog, from form default value of allocate inventory is Y then set also. And due to this from order creation process, order's are not getting reserve because of this code block:
> {code:java}
> if ("SALES_ORDER".equals(orderTypeId) && orderItem != null && productStore != null && "Y".equals(productStore.getString( "allocateInventory"))) { //If the 'autoReserve' flag is not set for the order item, don't reserve the inventory String autoReserve = OrderReadHelper.getOrderItemAttribute(orderItem, "autoReserve"); if (autoReserve == null || !"true".equals(autoReserve)) { continue; } }{code}
> As far as I know, this workflow never create OrderItemAttribute for autoReserve attribute.
> My assumption is this is only UI issue, UI should not set this flag to Y by default unless user set it intentionally.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)