Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.46k stars 2.79k forks source link

field thirdpartie s.price_level missing on import tool #13589

Closed josett225 closed 4 years ago

josett225 commented 4 years ago

Instructions

This is a template to help you report good issues. You may use Github Markdown syntax to format your issue report. Please:

Bug

[Short description] Missing Field s.price_level on import tools (Case Product MultiPrice)

Environment

Expected and actual behavior

[Verbose description] Unable to find s.price_level field during importation process. This is important when product multiprice is selected and used. In the meantime, the exportation process is delivering more fields than during importation. One of them is s.price_level.

Steps to reproduce the behavior

[Importation description : Activate MultiPrice product on module Products configuration Use importation tool process after creating a CSV ThirdParties file

This import file file could be generated using the following : To test s.price_level exportation Create products with several prices Create ThirdParty with price_level value Use exportation tool process to validate that s.price_level is exported.]

Attached files (Screenshots, screencasts, dolibarr.log, debugging informations…)

[Files]

eldy commented 4 years ago

What is the name of the "importable dataset" you used to import price level ? Did you use "Customer prices (of products or services, multi-prices)" ?

josett225 commented 4 years ago

@eldy for now I did not use the import tool "Prix clients (des produits ou services, multi-prix)" as I created directly 2 products with 7 sales prices each. I used only "Tiers (sociétés/institutions/particuliers) et attributs" and I could not find the price_level field on the import screen (see screenshots attached). However this field is there when exporting (see field 41 "Niveau de prix" on 3 screenshot). For your information, I am trying to migrate 1500 third parties that are B2C and B2B customers from another ERP. These B2B customers are Distributors and Resellers. Let me know if you need more information.

Capture d'écran 2020-04-13 16 22 12 Capture d'écran 2020-04-13 16 17 20 Capture d'écran 2020-04-13 16 18 01
josett225 commented 4 years ago

@eldy let me add that the export file I created is coming from another dolibarr installation 11.0.3. I used this file to import using a version 12. The screenshots are coming from v12.

eldy commented 4 years ago

If you used the "Tiers (sociétés/institutions/particuliers) et attributs", you want find the price_level field. Because 1 thirdparty can have several price_level and several price. So you can't store this into one field. So to import prices "per level", you must first import third parties, then using the import profile "Customer prices (of products or services, multi-prices)" to import the price for each price_level.

For export, field is present, but if you add it, it will duplicate the line as often as there is price_level for each export. Exploding one line into several is possible but Inserting several lines into one is not possible, this is why you can't have it into import. You must import in 2 steps.

josett225 commented 4 years ago

@eldy if I understand correctly a third party can get only one price_level (see screenshot) depending of the level of price we want to allocate it at one period of time : he cannot get 2 or more at the same time. Well I don't see it in the third party card; i can modify it but I cannot add several prices level. Of course if we want to give him a better price (or worst price), we have to change it in its third party card. For now I want to import the value 1,2,3,4,5,6 or 7 for each third party as we already setup several pricing level for resellers from Public Price to Platinum (see screenshot). The Third party database I am importing has already existing price_levels in place. As you can see on the screenshot, I did also a proposal draft. Automatically the price_level used is 3-Club2 at 80€. This is exactly the behavior we are expecting.

Capture d'écran 2020-04-13 17 46 10 Capture d'écran 2020-04-13 17 46 39 Capture d'écran 2020-04-13 17 52 54
eldy commented 4 years ago

Sorry i made a mistake between "products" and "thirdparties". Yes, thirdparty can have only 1 price_level and should be available in import. I pushed a fix for v11.0.4