- π«π·France Toki Caen, Normandy
I need to migrate a Drupal 7 site to Drupal 10 and I have problems with VAT as mentioned on this topic (I haven't tried the patches yet).
The D7 site has Commerce 1 and the D10 site has Commerce 2.
The D7 site manages VAT with thecommerce_eu_vat
andcommerce_vat
modules (I need to calculate VAT for orders in France).
The D10 site is managed with Commerce Core which now has autonomous tax management.The majority of migrations went well (with Commerce Migrate of course, Migrate Upgrade, Migrate Tools, Migrate Plus via drush) except
upgrade_commerce1_order_item_product
which ignores almost 20% of the items because of an error linked to the adjustments?
Here is the message:
upgrade_commerce1_order_item_product:adjustments: Unknown adjustment type for line item '18082'
(for example).By checking a few of these lines, I found a VAT for France each time.
Upstream, I migrated the fields (upgrade_d7_field) and thecommerce_fr_vat
field (VAT rate reference field type) was not migrated either.
Here is the Migration error message :
Attempt to create a field storage commerce_fr_vat with no type. (/public_html/my_website/web/core/modules/field/src/Entity/FieldStorageConfig.php:271).
How to solve this situation and migrate 100% of order_items from the Drupal 7 site?
Is it the commerce_fr_vat field from my Product type or do we need to modify something in the migration configuration file (commerce1_order_item.yml)?Looking at the patches, it does not seem to create any VAT field or something related to?
Thanks for any help here, the D7 site is ten years old, you can imagine the amount of orders with VAT rates I need to migrate and I would really appreciate to find an automatic solution.
- π«π·France Toki Caen, Normandy
UPDATE : I have applied the first patch (handle-vat) and launch order_item and order migrations again and I can confirm it's working fine, I have all my order items now even if VAT was applied on D7.
Now I need to test the shipping_vat patch since calculation is wrong as mentioned in the previous comment from grahl. - π«π·France Toki Caen, Normandy
UPDATE 2 : I finally managed to migrate all my orders with VAT from Drupal 7 thanks to the 2 patches in this issue. Thank you very much for this work which deserves to be implemented in the module (unless it is too "workaround"). On the other hand, the patch for shipping VAT could not be applied with the patch command (failed), I had to apply it manually.