← Back to team overview

openerp-india team mailing list archive

[Bug 932847] [NEW] [6.0][6.1] mrp demo data won't install if product variant exists, fix included

 

Public bug reported:

despite the product_id misleading name, the product.supplierinfo
relation is carried by product.template, not product.product, so when
you have demo data such as:

     <record id="water_supplier_agrolait" model="product.supplierinfo">
        <field name="product_id" ref="product_water"/>
         <field name="name" ref="base.res_partner_agrolait"/>
         <field name="product_uom" ref="product_uom_litre"/>
         <field name="min_qty">2.0</field>

in fact you are assuming that the product.template id to reference will
be the same as the product.product.

But this is not true if you created some variant products where several
product.product records share the same product.template record. Once you
have such variant product, you cannot install the mrp module with demo
data anymore.

I'm attaching a branch fixing on 6.1 this is a minute.

Regards.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/932847

Title:
  [6.0][6.1] mrp demo data won't install if product variant exists, fix
  included

Status in OpenERP Addons (modules):
  New

Bug description:
  despite the product_id misleading name, the product.supplierinfo
  relation is carried by product.template, not product.product, so when
  you have demo data such as:

       <record id="water_supplier_agrolait" model="product.supplierinfo">
          <field name="product_id" ref="product_water"/>
           <field name="name" ref="base.res_partner_agrolait"/>
           <field name="product_uom" ref="product_uom_litre"/>
           <field name="min_qty">2.0</field>

  in fact you are assuming that the product.template id to reference
  will be the same as the product.product.

  But this is not true if you created some variant products where
  several product.product records share the same product.template
  record. Once you have such variant product, you cannot install the mrp
  module with demo data anymore.

  I'm attaching a branch fixing on 6.1 this is a minute.

  Regards.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/932847/+subscriptions


Follow ups

References