OK,
-SOLVED-
I have found that I need to specify that a party can play a role here
https://localhost:8443/partymgr/control/viewroles?partyId=10000
before linking to a product with that role. (Sorry...)

-Bruno

2008/4/22 Bruno Busco <[EMAIL PROTECTED]>:

> I am trying to do the same:
> I have some products, defined some parties (actually Party groups) and now
> I am trying to associate the products to these parties with a Vendor role.
> In https://localhost:8443/catalog/control/addPartyToProduct
> if I select a role different from "Not Applicable" I get the following
> error:
>
> ERROR: Could not complete the Add Party to Product
> [file:/F:/ofbiz/applications/product/script/org/ofbiz/product/product/ProductServices.xml#addPartyToProduct]
> process [problem creating the newEntity value: Error while inserting:
> [GenericEntity:ProductRole][createdStamp,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][createdTxStamp,2008-04-22
> 21:40:09.859(java.sql.Timestamp)][fromDate,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][lastUpdatedStamp,2008-04-22
> 21:40:09.906(java.sql.Timestamp)][lastUpdatedTxStamp,2008-04-22
> 21:40:09.859(java.sql.Timestamp)][partyId,10001(java.lang.String)][productId,PNE-0002(java.lang.String)][roleTypeId,VENDOR(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_ROLE
> (PRODUCT_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS,
> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP)
> VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_ROLE' caused
> a violation of foreign key constraint 'PROD_RLE_PTYRLE' for key
> (10001,VENDOR). The statement has been rolled back.))]
>
> I am using an ofbiz installation in which I have only loaded the seeds. Is
> there some other step I am missing?
>
> Thank you,
> -Bruno
>
> 2008/4/22 Raj Saini <[EMAIL PROTECTED]>:
>
> Divide your product in general categories. And use the parties tab to add
> > manufacturer role to a product. You can use get a list of manufacturers from
> > the product and role association entity (I don't remember exactly but I
> > think it is ProductRole ).
> >
> > Thanks,
> >
> > Raj
> >
> >
> > shristhi sharma wrote:
> >
> > > I am trying to configure ofbiz for auto parts store. I wish to
> > > classify
> > > products into two major categories. General category (Wheels for
> > > example)
> > > and brands (Bridgestone).
> > >
> > > I am looking sidedeepcategory.bsh, CommonScreens.xml and
> > > CategoryWorker.java
> > >
> > > Guys, i donno the efficient way of doing this .. i am afraid it will
> > > be a
> > > big mess at the end. Any suggestion will be great.
> > >
> > > Thanks
> > >
> > >
> > >
> >
> >
>

Reply via email to