Merge lp:~savoirfairelinux-openerp/openerp-connector-magento/7.0_feature_choose_import_company into lp:~openerp-connector-core-editors/openerp-connector-magento/7.0
Proposed by
Vincent Vinet
Status: | Needs review |
---|---|
Proposed branch: | lp:~savoirfairelinux-openerp/openerp-connector-magento/7.0_feature_choose_import_company |
Merge into: | lp:~openerp-connector-core-editors/openerp-connector-magento/7.0 |
Diff against target: |
117 lines (+54/-2) 4 files modified
magentoerpconnect/magento_model.py (+4/-0) magentoerpconnect/magento_model_view.xml (+16/-0) magentoerpconnect/partner.py (+11/-1) magentoerpconnect/product.py (+23/-1) |
To merge this branch: | bzr merge lp:~savoirfairelinux-openerp/openerp-connector-magento/7.0_feature_choose_import_company |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guewen Baconnier @ Camptocamp | Needs Resubmitting | ||
Review via email: mp+223480@code.launchpad.net |
Description of the change
This branch adds a "Company" field to the connector's "Magento Website" model that allows choosing which company products and partners that are imported will be assigned to.
Since Magento products can belong to multiple websites, the current way to resolve this is to raise a MappingError since Odoo does not accept a product belonging to multiple companies (it has to belong into a single warehouse). This has no effect if no company was set on websites, so it does not change existing behavior when not used.
To post a comment you must log in.
Unmerged revisions
- 1004. By Vincent Vinet
-
[IMP] make help text more helpful/accurate
- 1003. By Vincent Vinet
-
[IMP] multi-company settings on websites
Hi,
thanks for your proposal!
This is a good start but incomplete. When a record is imported for a company, it should be imported with a user that belongs to this company, so the property fields (accounts, ...) are set correctly according to the user's company.
Here is an example: https:/ /gist.github. com/guewen/ 3528fe4be6bf527 ed9d9
1. each company has a "connector user" that will be used for the imports for this company
2. before the import (the part that maps and store the data), we search the company for the record to import
3. we switch the current user to the user configured on the company (1.) to run the import, so the properties are defined correctly