Refactor code in order to be compatible with fiscal position rule module

Partner and address must be set correctly before calling the onchange method.
With this refactor and this other PR https://github.com/OCA/connector-ecommerce/pull/7, the fiscal position are set correctly on sale order when importing a sale order