I know it is an old thread, but there it goes, for the shake of those that face similar issues:
The solution relies on allowing all products but the one of the BOM. To do this, there have to be changed the view of the form of BOM adding a domain; in the form of [code]domain="[('id','!=', parent.product_id)]"[/code].
In OpenERP vesion 5.0 edit mrp.bom.form view and add the domain as follows:
I know it is an old thread, but there it goes, for the shake of those that face similar issues:
The solution relies on allowing all products but the one of the BOM. To do this, there have to be changed the view of the form of BOM adding a domain; in the form of [code]domain= "[('id' ,'!=', parent. product_ id)]"[/ code].
In OpenERP vesion 5.0 edit mrp.bom.form view and add the domain as follows:
<record id="mrp_ bom_form_ view" model="ir.ui.view"> >mrp.bom. form</field> >mrp.bom< /field> >form</ field>
<form string="Bill of Material"> "onchange_ product_ id(product_ id, name)" select="1" domain= "[('id' ,'!=', parent. product_ id)]"/>
< newline/ >
< field name="product_ uom"/>
< field name="product_ qty"/>
< field name="name" select="1"/>
<field name="name"
<field name="model"
<field name="type"
<field name="arch" type="xml">
HERE ==> <field name="product_id" on_change=
In OpenERP version 6.0 edit mrp.bom.form view and make sure is in:
<record id="mrp_ bom_form_ view" model="ir.ui.view"> >mrp.bom. form</field> >mrp.bom< /field> >form</ field>
<form string="Bill of Material">
< group colspan="4" col="6"> "onchange_ product_ id(product_ id, name, context)" select="1" domain= "[('id' ,'!=', parent. product_ id)]"/>
<field name="name" select="1"/>
<field name="code" select="1" string="Reference" groups= "base.group_ extended" />
<newline/ >
<field name="product_ qty"/>
<field name="name"
<field name="model"
<field name="type"
<field name="arch" type="xml">
HERE==> <field name="product_id" on_change=
I also I attach patch file if you want to change the source code as well for version 5.0.