← Back to team overview

openerp-india team mailing list archive

[Bug 1240243] [NEW] [6.1] product_variant_multi generation bug

 

Public bug reported:

eoc-extra-addons/6.1 revno 12
ocb server 6.1 revno 4319
Kubuntu 12.04

If you have more than one variant_dimension_type, when you hit the 'generate' button you only get one variant per variant_dimension_value but you should get the cartesian product of type1.values x type2.values etc.
This is a regression.

Furthermore, after I fixed that I found the variants  are sorted by variant_dimension_option.sequence then name. Since in my case those sequences are all zero I get an alphabetical sort which is meaningless and throws off my default_code generation. I guess most people will have zero option sequences.
The sort should be by variant_dimension_type.sequence then variant_dimension_option.sequence then name.

I attach a patch which fixes both issues.

Really the links from values -> options -> types should be named more
sensibly.

I also note that when I import variant_dimension_options from CSV all
the types are set to the first type which rather screws things up. I
haven't looked into the reason for this though.

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

** Patch added: "Fixes variant generation and sorting."
   https://bugs.launchpad.net/bugs/1240243/+attachment/3878852/+files/variants.diff

-- 
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/1240243

Title:
  [6.1] product_variant_multi generation bug

Status in OpenERP Addons (modules):
  New

Bug description:
  eoc-extra-addons/6.1 revno 12
  ocb server 6.1 revno 4319
  Kubuntu 12.04

  If you have more than one variant_dimension_type, when you hit the 'generate' button you only get one variant per variant_dimension_value but you should get the cartesian product of type1.values x type2.values etc.
  This is a regression.

  Furthermore, after I fixed that I found the variants  are sorted by variant_dimension_option.sequence then name. Since in my case those sequences are all zero I get an alphabetical sort which is meaningless and throws off my default_code generation. I guess most people will have zero option sequences.
  The sort should be by variant_dimension_type.sequence then variant_dimension_option.sequence then name.

  I attach a patch which fixes both issues.

  Really the links from values -> options -> types should be named more
  sensibly.

  I also note that when I import variant_dimension_options from CSV all
  the types are set to the first type which rather screws things up. I
  haven't looked into the reason for this though.

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


Follow ups

References