Merge pull request #11850 from OPEN-DSI/new-stock-import-warehouse-parent

NEW add parent id or ref column in warehouse import
This commit is contained in:
Laurent Destailleur 2019-09-15 15:44:33 +02:00 committed by GitHub
commit eda17e9c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -316,17 +316,21 @@ class modStock extends DolibarrModules
$this->import_fields_array[$r]=array('e.ref'=>"LocationSummary*",
'e.description'=>"DescWareHouse",'e.lieu'=>"LieuWareHouse",
'e.address'=>"Address",'e.zip'=>'Zip','e.fk_pays'=>'CountryCode',
'e.statut'=>'Status'
'e.statut'=>'Status',
'e.fk_parent'=>'ParentWarehouse'
);
$this->import_convertvalue_array[$r]=array(
'e.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry')
'e.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'),
'e.fk_parent'=>array('rule'=>'fetchidfromref','classfile'=>'/product/stock/class/entrepot.class.php','class'=>'Entrepot','method'=>'fetch','element'=>'ref')
);
$this->import_regex_array[$r]=array('e.statut'=>'^[0|1]');
$this->import_examplevalues_array[$r]=array('e.ref'=>"ALM001",
'e.description'=>"Central Warehouse",'e.lieu'=>"Central",
'e.address'=>"Route 66",'e.zip'=>'28080','e.fk_pays'=>'US',
'e.statut'=>'1');
'e.statut'=>'1',
'e.fk_parent'=>''
);
// Import stocks
$r++;