← Back to team overview

magentoerpconnect-community team mailing list archive

Re: [Openerp-expert-production] grouped products/packs

 

You are right, I missed that Magento explode the packs in sale order.
We had customizations on our last Magento project which misled me.

I agree that the two options should be possible.

Does it could be possible to replace the product type by a function
field which set the product type as for example :
 - simple by default
 - grouped if is a nan_product_pack
 - grouped if is a BOM
 - and eventually an optional user choice to force the type
 - + hooks to implement new types in other modules

I'm not sure that's realistic, but it seems to me that this way we can
avoid dependencies on both modules.

Otherwise I think indeed you have to remove the inherited code of
mrp_bom (in our case we removed it because we didn't want our products
as "grouped product").

Guewen

2011/2/11 Raphaël Valyi <rvalyi@xxxxxxxxx>
>
> 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
>



--
Guewen Baconnier

Business Developer
Business Solutions
Camptocamp SA
PSE A, CH-1015 Lausanne

http://openerp.camptocamp.com/

Phone: +41 21 619 10 39
Office: +41 21 619 10 10
Fax: +41 21 619 10 00
Email: guewen.baconnier@xxxxxxxxxxxxxx



Follow ups

References