Hi Dan, Thank you for your detailed reply. I will keep on exploring OFBiz base on your advice!
Thanks and regards, Jeff On 2022/12/15 16:12:14 Daniel Watford wrote: > Hi Jeff, > > I don't have a full answer on this yet, but it is something I am working on > myself. > > I was trying to work through a scenario of a warehouse, but without any > supporting accounting organisation. Attempts to receive inventory into the > warehouse (facility) failed since OFBiz will try and update the facility's > owing organisation's GL accounts to represent the inventory transaction. If > you have not set up an Accounting Organisation and corresponding Chart Of > Accounts then this will fail. > > Ensure you have an 'Accounting Organisation' configured here: OFBiz: > Accounting Manager: Available Internal Accounting Organizations (apache.org) > <https://demo-next.ofbiz.apache.org/accounting/control/ListCompanies> > > To be a candidate to have an Accounting Organisation created, your > organisation Party must have the INTERNAL ORGANIZATION role. > > For my very specific scenario of bringing product into a warehouse, I > imported the following entities (YMMV): > > <entity-engine-xml> > <GlAccount glAccountId="200000" accountCode="200000" > glAccountClassId="LIABILITY" glResourceTypeId="MONEY" > accountName="LIABILITIES"/> > > <GlAccount parentGlAccountId="200000" glAccountId="210000" > accountCode="210000" > glAccountClassId="CURRENT_LIABILITY" > glAccountTypeId="ACCOUNTS_PAYABLE" glResourceTypeId="MONEY" > accountName="ACCOUNTS PAYABLE"/> > > <GlAccount parentGlAccountId="210000" glAccountId="214000" > accountCode="214000" > glAccountClassId="CURRENT_LIABILITY" glAccountTypeId="CURRENT_LIABILITY" > glResourceTypeId="MONEY" > accountName="UNINVOICEDITEMRECEIPTS"/> > > > > <GlAccount glAccountId="100000" accountCode="100000" > glAccountClassId="ASSET" glResourceTypeId="MONEY" > accountName="ASSETS"/> > > <GlAccount parentGlAccountId="100000" glAccountId="140000" > accountCode="140000" > glAccountClassId="INVENTORY_ASSET" > glAccountTypeId="INVENTORY_ACCOUNT" glResourceTypeId="MONEY" > accountName="INVENTORY"/> > </entity-engine-xml> > > > <entity-engine-xml> > <GlAccountTypeDefault organizationPartyId="10000" > glAccountTypeId="INVENTORY_ACCOUNT" glAccountId="140000"/> > > <GlAccountTypeDefault organizationPartyId="10000" > glAccountTypeId="UNINVOICED_SHIP_RCPT" glAccountId="214000"/> > </entity-engine-xml> > > > <entity-engine-xml> > <GlAccountOrganization organizationPartyId="10000" glAccountId="140000" > fromDate="2001-01-01"/> > <GlAccountOrganization organizationPartyId="10000" glAccountId="214000" > fromDate="2001-01-01"/> > </entity-engine-xml> > > > My organisation's party ID is 10000. You may need to change this to suit > your party. > > > An alternative approach that might work for you is the OFBiz setup > application: OFBiz: Setup Application : Create New Organization (apache.org) > <https://demo-next.ofbiz.apache.org/ofbizsetup/control/main> > > After you create your organization and click the 'Set to complete' button, > an accounting organisation will be created, a chart of accounts imported, > and organization gl accounts created. The accounting preferences created > are USA centric in that the base currency for your organization will be USD > and, as far as I know, this cannot be changed through the UI. > > I'm also not sure if there are any issues with changing the base currency > once an accounting organisation has been created - perhaps some other ofbiz > users/developers will be able to clarify. > > So in summary, yes, there will likely be other data that needs to be in > place to support your use of OFBiz. I believe this is the reason why new > deployments are advised to use the demo data and then remove unwanted > parts. > > HTH > > Dan. > > > On Thu, 15 Dec 2022 at 10:01, [email protected] > <[email protected]> wrote: > > > Hi Dan, > > Thank you for your support, my problems solved! > > May I ask a further question, I have initialised OFBIZ (release18.12) > > without demo data, will there be any other similar issues (missing some > > necessary initial data)? Hope you can give me some advice. > > > > Thanks and regards, > > Jeff > > > > On 2022/12/14 07:13:22 Daniel Watford wrote: > > > Hi Jeff, > > > > > > This issue looks like it matches > > > https://issues.apache.org/jira/browse/OFBIZ-12608 and is due to some > > > missing seed data. > > > > > > The missing data is included in the full demo dataset which is loaded > > into > > > OFBiz during setup with the following command: > > > > > > ./gradlew loadAll > > > > > > This error is caused by a missing Shipment Method Type. In the demo > > > instance, you can view Shipment Method Types here: OFBiz: Catalog > > Manager: > > > List Shipment Method Types (apache.org) > > > < > > https://demo-next.ofbiz.apache.org/catalog/control/ListShipmentMethodTypes > > > > > > > > > There also needs to be a Party configured with ID, '_NA_' and assigned > > the > > > role, CARRIER. > > > > > > The missing entities were recently moved to seed data as part of fixing > > > OFBIZ-12608. > > > > > > You can view the missing entities in this file: > > > > > https://github.com/apache/ofbiz-framework/blob/trunk/applications/order/data/PurchaseOrderShippingSeedData.xml > > . > > > You can use the WebTool to import that file as a fix for your > > environment. > > > > > > HTH > > > > > > Dan. > > > > > > On Wed, 14 Dec 2022 at 03:45, [email protected] > > > <[email protected]> wrote: > > > > > > > Hello Community, > > > > > > > > I was creating a "Purchase Order". On the page 'Purchase Order : Order > > > > Confirmation' and clicked on the button 'Create Order'. The following > > error > > > > occurred. > > > > I would like to know what I missed for the input. > > > > Regards, > > > > Jeff > > > > > > > > I got the following error: > > > > > > > > Did not complete the order, the following occurred:ERROR : Could not > > > > create order > > > > (write error :org.apache.ofbiz.entity.GenericEntityException: > > > > org.apache.ofbiz.entity.GenericEntityException: Error while inserting: > > > > > > [GenericEntity:OrderItemShipGroup][carrierPartyId,_NA_(java.lang.String)][carrierRoleTypeId,CARRIER(java.lang.String)][contactMechId,10060(java.lang.String)][createdStamp,2022-12-14 > > > > 11:32:34.763(java.sql.Timestamp)][createdTxStamp,2022-12-14 > > > > 11:32:34.667(java.sql.Timestamp)][estimatedDeliveryDate,2022-12-16 > > > > > > 00:00:00.0(java.sql.Timestamp)][facilityId,10001(java.lang.String)][giftMessage,null()][isGift,N(java.lang.String)][lastUpdatedStamp,2022-12-14 > > > > 11:32:34.763(java.sql.Timestamp)][lastUpdatedTxStamp,2022-12-14 > > > > > > 11:32:34.667(java.sql.Timestamp)][maySplit,N(java.lang.String)][orderId,101(java.lang.String)][shipAfterDate,null()][shipByDate,null()][shipGroupSeqId,00001(java.lang.String)][shipmentMethodTypeId,STANDARD(java.lang.String)] > > > > > > [shippingInstructions,null()][supplierAgreementId,null()][supplierPartyId,null()][telecomContactMechId,null()][vendorPartyId,null()] > > > > (SQL Exception while executing the following:INSERT INTO > > > > OFBIZ.ORDER_ITEM_SHIP_GROUP > > > > (ORDER_ID, SHIP_GROUP_SEQ_ID, SHIPMENT_METHOD_TYPE_ID, > > SUPPLIER_PARTY_ID, > > > > SUPPLIER_AGREEMENT_ID, VENDOR_PARTY_ID, CARRIER_PARTY_ID, > > > > CARRIER_ROLE_TYPE_ID, FACILITY_ID, CONTACT_MECH_ID, > > > > TELECOM_CONTACT_MECH_ID, TRACKING_NUMBER, SHIPPING_INSTRUCTIONS, > > > > MAY_SPLIT, GIFT_MESSAGE, IS_GIFT, SHIP_AFTER_DATE, SHIP_BY_DATE, > > > > ESTIMATED_SHIP_DATE, ESTIMATED_DELIVERY_DATE, LAST_UPDATED_STAMP, > > > > LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, > > ?, ?, > > > > ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on > > > > table 'ORDER_ITEM_SHIP_GROUP' caused a violation of foreign key > > constraint > > > > 'ORDER_ITSG_CSHM'for key (STANDARD,_NA_,CARRIER). The statement has > > been > > > > rolled back.)) > > > > > > > > > > > > > -- > > > Daniel Watford > > > > > > > > > -- > Daniel Watford >
