You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by him_aeng <hi...@yahoo.co.th> on 2008/06/27 08:30:43 UTC

How can I create many-to-many relation between product and BOM?

My business is plastic. So Bill Of Material was something about plastic
compound that is mixing various type of chemical raw material in one batch.
One product may come from many BOMs and one BOM may produce many product.

My purpose is:
1. Store list of BOM (and not dependent to each product) so that any product
can refer to it in the future.
2. In one production run for order it can change BOM between run.

>From this scenario I go to look into the schema between ProductAssoc,
ProductAssocType and Product entities. In ProductAssoc, It show the "lock"
style relation between product and its raw material such as Product_a from
material_a, Product_a from material_b and the point is there primary key
that point to BOM Identification key such as BOM_ID attribute so this schema
is not answer my purpose.

I don't know in OFBiz Schema, are there other relationships that can use for
my scenario.

Best Regards
Tanakorn Numrubporn
-- 
View this message in context: http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18148900.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: How can I create many-to-many relation between product and BOM?

Posted by him_aeng <hi...@yahoo.co.th>.
Oh! Thank for excellent reply. Your solution is simple but best.

Thank a lot
Tanakorn Numrubporn


Jacopo Cappellato-3 wrote:
> 
> What about something like:
> 
> product_common
>     |____________________> mat_a
>     |____________________> mat_b
> 
> product_a
>     |____________________> product_common
> 
> product_b
>     |____________________> product_common
> 
> etc...
> 
> And about the ability of defining more than one BOM for each product,  
> I'd suggest to define new records for the ProductAssocType entity:  
> "alternate bom", "special bom" etc...
> 
> Jacopo
> 
> 
> 
> On Jun 27, 2008, at 10:08 AM, him_aeng wrote:
> 
>>
>> My understand is, The raw material BOM was created from associated the
>> product which was produce with the raw material which use to produce  
>> the
>> product record by record.
>>
>> Such as Product_a product by two material mat_a and mat_b. If I want  
>> to
>> create BOM for Product_a I have to associated the Product_a with  
>> mat_a and
>> mat_b and store in ProductAssoc entity.
>>
>> The problem is: I want to create only BOM that not lock to the  
>> product that
>> will be produce. And I want to refer to the BOM identify key but the
>> ProductAssoc give only FromDate key, which I can't refer to it with  
>> the
>> product.
>>
>> May I create a new entity such ProductBOM and ProductBOMAssoc so  
>> ProductBOM
>> will use store BOM and ProductBOMAssoc will use to be an associate  
>> entity
>> between ProductBOM and Product entity.
>>
>>
>> Jacopo Cappellato-3 wrote:
>>>
>>> What in the current data model prevents you to define more than one
>>> BOM for the same product? And what prevents you to share the same BOM
>>> with several products?
>>>
>>> Jacopo
>>>
>>>
>>> On Jun 27, 2008, at 8:30 AM, him_aeng wrote:
>>>
>>>>
>>>> My business is plastic. So Bill Of Material was something about
>>>> plastic
>>>> compound that is mixing various type of chemical raw material in one
>>>> batch.
>>>> One product may come from many BOMs and one BOM may produce many
>>>> product.
>>>>
>>>> My purpose is:
>>>> 1. Store list of BOM (and not dependent to each product) so that any
>>>> product
>>>> can refer to it in the future.
>>>> 2. In one production run for order it can change BOM between run.
>>>>
>>>> From this scenario I go to look into the schema between  
>>>> ProductAssoc,
>>>> ProductAssocType and Product entities. In ProductAssoc, It show the
>>>> "lock"
>>>> style relation between product and its raw material such as
>>>> Product_a from
>>>> material_a, Product_a from material_b and the point is there primary
>>>> key
>>>> that point to BOM Identification key such as BOM_ID attribute so
>>>> this schema
>>>> is not answer my purpose.
>>>>
>>>> I don't know in OFBiz Schema, are there other relationships that can
>>>> use for
>>>> my scenario.
>>>>
>>>> Best Regards
>>>> Tanakorn Numrubporn
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18148900.html
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18150198.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18152130.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: How can I create many-to-many relation between product and BOM?

Posted by Jacopo Cappellato <ja...@gmail.com>.
What about something like:

product_common
    |____________________> mat_a
    |____________________> mat_b

product_a
    |____________________> product_common

product_b
    |____________________> product_common

etc...

And about the ability of defining more than one BOM for each product,  
I'd suggest to define new records for the ProductAssocType entity:  
"alternate bom", "special bom" etc...

Jacopo



On Jun 27, 2008, at 10:08 AM, him_aeng wrote:

>
> My understand is, The raw material BOM was created from associated the
> product which was produce with the raw material which use to produce  
> the
> product record by record.
>
> Such as Product_a product by two material mat_a and mat_b. If I want  
> to
> create BOM for Product_a I have to associated the Product_a with  
> mat_a and
> mat_b and store in ProductAssoc entity.
>
> The problem is: I want to create only BOM that not lock to the  
> product that
> will be produce. And I want to refer to the BOM identify key but the
> ProductAssoc give only FromDate key, which I can't refer to it with  
> the
> product.
>
> May I create a new entity such ProductBOM and ProductBOMAssoc so  
> ProductBOM
> will use store BOM and ProductBOMAssoc will use to be an associate  
> entity
> between ProductBOM and Product entity.
>
>
> Jacopo Cappellato-3 wrote:
>>
>> What in the current data model prevents you to define more than one
>> BOM for the same product? And what prevents you to share the same BOM
>> with several products?
>>
>> Jacopo
>>
>>
>> On Jun 27, 2008, at 8:30 AM, him_aeng wrote:
>>
>>>
>>> My business is plastic. So Bill Of Material was something about
>>> plastic
>>> compound that is mixing various type of chemical raw material in one
>>> batch.
>>> One product may come from many BOMs and one BOM may produce many
>>> product.
>>>
>>> My purpose is:
>>> 1. Store list of BOM (and not dependent to each product) so that any
>>> product
>>> can refer to it in the future.
>>> 2. In one production run for order it can change BOM between run.
>>>
>>> From this scenario I go to look into the schema between  
>>> ProductAssoc,
>>> ProductAssocType and Product entities. In ProductAssoc, It show the
>>> "lock"
>>> style relation between product and its raw material such as
>>> Product_a from
>>> material_a, Product_a from material_b and the point is there primary
>>> key
>>> that point to BOM Identification key such as BOM_ID attribute so
>>> this schema
>>> is not answer my purpose.
>>>
>>> I don't know in OFBiz Schema, are there other relationships that can
>>> use for
>>> my scenario.
>>>
>>> Best Regards
>>> Tanakorn Numrubporn
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18148900.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18150198.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


Re: How can I create many-to-many relation between product and BOM?

Posted by him_aeng <hi...@yahoo.co.th>.
My understand is, The raw material BOM was created from associated the
product which was produce with the raw material which use to produce the
product record by record. 

Such as Product_a product by two material mat_a and mat_b. If I want to
create BOM for Product_a I have to associated the Product_a with mat_a and
mat_b and store in ProductAssoc entity. 

The problem is: I want to create only BOM that not lock to the product that
will be produce. And I want to refer to the BOM identify key but the
ProductAssoc give only FromDate key, which I can't refer to it with the
product. 

May I create a new entity such ProductBOM and ProductBOMAssoc so ProductBOM
will use store BOM and ProductBOMAssoc will use to be an associate entity
between ProductBOM and Product entity.


Jacopo Cappellato-3 wrote:
> 
> What in the current data model prevents you to define more than one  
> BOM for the same product? And what prevents you to share the same BOM  
> with several products?
> 
> Jacopo
> 
> 
> On Jun 27, 2008, at 8:30 AM, him_aeng wrote:
> 
>>
>> My business is plastic. So Bill Of Material was something about  
>> plastic
>> compound that is mixing various type of chemical raw material in one  
>> batch.
>> One product may come from many BOMs and one BOM may produce many  
>> product.
>>
>> My purpose is:
>> 1. Store list of BOM (and not dependent to each product) so that any  
>> product
>> can refer to it in the future.
>> 2. In one production run for order it can change BOM between run.
>>
>> From this scenario I go to look into the schema between ProductAssoc,
>> ProductAssocType and Product entities. In ProductAssoc, It show the  
>> "lock"
>> style relation between product and its raw material such as  
>> Product_a from
>> material_a, Product_a from material_b and the point is there primary  
>> key
>> that point to BOM Identification key such as BOM_ID attribute so  
>> this schema
>> is not answer my purpose.
>>
>> I don't know in OFBiz Schema, are there other relationships that can  
>> use for
>> my scenario.
>>
>> Best Regards
>> Tanakorn Numrubporn
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18148900.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18150198.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: How can I create many-to-many relation between product and BOM?

Posted by Jacopo Cappellato <ja...@gmail.com>.
What in the current data model prevents you to define more than one  
BOM for the same product? And what prevents you to share the same BOM  
with several products?

Jacopo


On Jun 27, 2008, at 8:30 AM, him_aeng wrote:

>
> My business is plastic. So Bill Of Material was something about  
> plastic
> compound that is mixing various type of chemical raw material in one  
> batch.
> One product may come from many BOMs and one BOM may produce many  
> product.
>
> My purpose is:
> 1. Store list of BOM (and not dependent to each product) so that any  
> product
> can refer to it in the future.
> 2. In one production run for order it can change BOM between run.
>
> From this scenario I go to look into the schema between ProductAssoc,
> ProductAssocType and Product entities. In ProductAssoc, It show the  
> "lock"
> style relation between product and its raw material such as  
> Product_a from
> material_a, Product_a from material_b and the point is there primary  
> key
> that point to BOM Identification key such as BOM_ID attribute so  
> this schema
> is not answer my purpose.
>
> I don't know in OFBiz Schema, are there other relationships that can  
> use for
> my scenario.
>
> Best Regards
> Tanakorn Numrubporn
> -- 
> View this message in context: http://www.nabble.com/How-can-I-create-many-to-many-relation-between-product-and-BOM--tp18148900p18148900.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>