← Back to team overview

openerp-expert-production team mailing list archive

Re: [Magentoerpconnect-community] grouped products/packs

 

On Fri, Feb 11, 2011 at 4:50 AM, Guewen Baconnier <
guewen.baconnier@xxxxxxxxxxxxxx> wrote:

> Hi all,
>
> I agree with Ana, I think you may need to use a BoM if you really have to
> launch a production order to build the pack.
>

@Guewen, @Ana,


I think you missed one point: currently Magento 'grouped products' generate
Magento sale orders with exploded packs already (I mean Magento code dos
that natively), much like nan_product_packs.
So when you pass that order back to OpenERP, OpenERP has no way to find out
it was originally a pack, no matter what we do on OpenERP side (or do I miss
something from Magento grouped products?)
Then, as you get the orders with the components in OpenERP, there is no way
you trigger a production order, no matter what you do on OpenERP side, no
matter the way I implement grouped products over MRP BOM's or
nan_procuct_pack.

The only way you can trigger a regular production order on OpenERP side
would be to not set your product has a 'Magento grouped product' and set an
OpenERP BOM for it.
Currently this creating a BOM will change the product to a 'grouped
product', so I'm taking good note that this may not be wanted always.

So actually, the debate is more if I can drop the mrp module dependency from
Magentoerpconnect for v6 and depend on nan_product_pack instead which is
much simpler and which IMHO makes OpenERP simpler to use for the beginners.
So in that case, the only use of nan_product_packs (could even be an
option), is that if a product has a pack defined, it will properly be
exported to Magento as a grouped product along with it's component during
the regular catalog export task.


> In that case you shouldn't need to create a product_pack and a BoM on each
> grouped product.
>

Something should be used on OpenERP side to tell Magento what are the
components of the 'grouped product' (or else you may just use a regular
product + a BOM on OpenERP side).
So my proposal is to use nan_procuct_pack for that.
It also makes it more consistent if you sale orders from Magento and from
OpenERP, then both will include all components and look the same.



@Jan Verlaan

What you are telling about "Sets/Phantom" BOM's is very interesting. Unless
I missing something about how Magento deals with 'grouped products', this
would unfortunately make Magento created orders look different from OpenERP
created orders (exploded vs not exploded in the sale order), but it has the
huge advantage of using all native/standard features.


I'm thinking may be the best would be to support both mrp BOM's the way we
do (then using it with phantom's BOM's when appropriate) and
nan_product_packs if present.
Ideally we would change the code so that it works with both modules but
without depending on them.

Currently the technical challenge to do that is we are inheriting the
'mrp.bom' (in magentoerpconnect/product.py) so that we set the product as
'grouped product' on triggering the BOM create method. I don't see how to
inherit or not selectively depending if those modules are installed...
A solution would be to create two additional optional modules like
magentoerpconnect_bom and magentoerpconnect_pack of course. But I should say
I don't really like that as it's not userfriendly at all to search all those
modules and figure out what they do (BTW I think OpenERP SA should just do
that sometimes: make modules able to deal with some other modules without
depending on them nor creating other microscopic/non knowledgeable modules,
this specially makes sense for their SaaS prospective).

So actually, it seems a consensus emerges as: BOM doesn't imply it's a
Magento 'grouped product' because you may really want to trigger a
production order on OpenERP side. So I might simply drop that mrp.bom
inherit code. Then people creating BOM's for products should be aware that
should also set their product as a 'grouped product' if it has a BOM or a
NaN pack and if it's really a Magento 'grouped product'.
Would that make everybody happy?


Raphaël Valyi
Founder and consultant
+55 21 3010 9965
www.akretion.com

References