Closed daramousk closed 6 years ago
@NL66278 Fully refactored again, cut down to 1/3 of its size
2017-10-24 12:49:10,765 7019 ERROR ari_test openerp.sql_db: bad query: ALTER TABLE "res_partner" ADD FOREIGN KEY ("transsmart_package_type_id") REFERENCES "delivery_package_type" ON DELETE set null Traceback (most recent call last): File "/home/odoariacp80/odoo/parts/odoo/openerp/sql_db.py", line 247, in execute res = self._obj.execute(query, params) IntegrityError: insert or update on table "res_partner" violates foreign key constraint "res_partner_transsmart_package_type_id_fkey" DETAIL: Key (transsmart_package_type_id)=(2) is not present in table "delivery_package_type".
Traceback (most recent call last):
File "./bin/upgrade_odoo", line 79, in
Refactors synchronization code and allows the user to set a different packaging type per carrier
1) Make sure that when the sync is done, server wins (local data will be overwritten) 2) A new table has been created that holds the package types of transsmart 3) A new field has been inserted on res_partner that you can use to set the default package type for that carrier 4) You must set a a default package type on the carriers or on the default carrier, if not the sync will fail with a rather non descriptive error message that will be fixed on a later pull request
@hbrunn @gcapalbo @NL66278 Please review this