← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 812340] Re: Prices list import is not able to retrieve the category

 

You can test it on a fresh database.
Ok, first you need to run "__import__produit.categorie.csv", note that I'm using id's to build inheritance.

Case 1: (by category name ONLY)

Next you can test import with "__import__pricelist_1.csv".
There is some constraints there:
 - You have to create a new Pricelist and remember it's database ".id" (there is no way to import without this, I think it's a bug too, it will not be necessary when custom id will be set)
 - Now, replace the ".id" field of the CSV with your previously created pricelist id
 - Import link only exists in the GTK client, so run a double click on your pricelist to see versions and go to Form->Import
 - Data is correctly imported

Data is imported and the category (version_id/items_id/categ_id) has
been replaced with the full length (with parent's one) category name.
Note that in this case there is now way to set the "Subcategory B" from
"Master Category B"

Case 2: (by FULL category name)

(please delete previously added version first to avoid date conflict)

Next you can test import with "__import__pricelist_2.csv".
There is some constraints there:
 - Now, replace the ".id" field of the CSV with your previously created pricelist id
 - Import link only exists in the GTK client, so run a double click on your pricelist to see versions and go to Form->Import
 - Data is NOT imported :
ValueError: No record found for All products / Manufacturer A / Master Category B / Subcategory A

Now, you can see the bug.

nb: I think that three things must be fixed to achieve this basic user
case:

- Add the import field in the Web GUI (pricelist view)
- Allows pricelist import without ".id", only "name" and maybe "id" are necessary for a minimum
- "version_id/items_id/categ_id/id" is not usable when importing because "categ_id/id" is not known, but as you can see in my "__import__produit.categorie.csv", I used them to associate data...
 

** Attachment added: "ZIP Archive with CSV files to reproduce"
   https://bugs.launchpad.net/openobject-server/+bug/812340/+attachment/2231021/+files/__imports_csv.zip

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/812340

Title:
  Prices list import is not able to retrieve the category

Status in OpenERP Server:
  Incomplete

Bug description:
  Prices list import is not able to retrieve the category from the "version_id/items_id/categ_id" field
  The reported error is always "Record not found".

  For example  (eg: with category = All Products/Master Category
  A/Subcategory A), if I replace "All Products/Master Category
  A/Subcategory A" with "Subcategory A" then it works but my problem is
  that I have some categories with the same name, it's always uses the
  first.

  All Products
    - Master Category A
      - Subcategory A
      - Subcategory B
      - Subcategory C
    - Master Category B
      - Subcategory A
      - Subcategory B
      - Subcategory C

  So, it should use the full path (complete_name ?) to retrieve the
  right category.

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


References