'Company' field of a Magento address is not used for the name of the OpenERP partner
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenERP Connector - Magento |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The issue discussed here is what should we do with the 'company' information that we have on the magento addresses.
First, I want to put up some facts and establish a vocabulary to avoid any confusion :
* On Magento, I use the words 'Account' for the main entity (where the e-mail address is registered) and 'Addresses' for the... addresses.
* On OpenERP, I use the word 'Partner' for the main entity which has the 'Is a company flag' and 'Contacts' for the entities which are linked to a 'Partner'.
* In OpenERP, we'll always activate the flag 'Is a company' even if the Magento 'Account' is not a company. 'Is a company' is a misused term to mean that the 'Partner' is allowed to have several 'Addresses'. For Magento customers, we'll ever be able to link several addresses to them as they can in Magento. See the bug lp:1151947 for more information.
* There is no Company field on the Magento 'Accounts', only on the 'Addresses'; we have no mean to know if an 'Account' is a company. The company field on the addresses is a 'char' field.
* Each address in Magento can have its own content.
Actually, this piece of information is just copied to a field 'company' in res.partner.
This field is not printed anywhere in the reports, but could be added in the default address formats (once lp:1193271 has been fixed).
An alternative solution is to bring up the 'company' content from the Magento address to the OpenERP 'partner'.
However, this brings some questions, mainly:
* How do we know from which address we should take the company, mostly when we have different companies between addresses or some address without a company and some with one.
* When we have a different company on several addresses, what should we do with them? They should be displayed on the reports, but if we simply add them in the address frame, we'll probably end up with the partner's company name and the contact's company name displayed.
Copy of the original discussion :
-------
Summarizing with an example:
In Magento I create an account with
A customer X:
- A name and first name (Guewen Baconnier)
- There is no company name field!
An address Y:
- A name and a first name (Guewen Baconnier)
- A company name (Camptocamp)
A second address Z
- A name and a first name (Guewen Baconnier)
- I do not put a company name
In OpenERP we have:
A customer 1:
- A name (Guewen Baconnier)
- To match with the OpenERP data model, this customer is the mix between the customer X and the address Y (name of the address Y is kept)
An address 2:
- A name (Guewen Baconnier)
- This is the address Z in Magento
What you would expect is to have the company name in the name of the customer 1. But what would become the name of the address Y, should it be discarded?
What should happen if the address Y has no company name but address Z has one?
What should happen if I place an order in Magento with a new shipping address because I want it to be delivered to another company.
An address Google
- A name and a first name (Larry Page)
- A company name (Google)
We should be sure that the company name does not update the customer 1 name. What would you expect?
Could it be an option to display 'Company name, Name' in the contacts when a company name is defined? Or to add a 'company' field in the contacts? and to use the company name in customer1 when a company name is defined in the first address (Y)? I'm a bit concerned by the loss of the first name/last name of address Y...
Proposed by David:
This is how I would approach it.
1. There is a Company Name
Create a company with the name of the company. Add the address to the company. Create Customers with the Shipping and Billing addresses if they have them
2. There is no company name and the shipping and billing address match
Create a contact with the the address type of default
3. There is no company and the shipping and billing address do not match
Create the Customer as the company and create a shipping and billing contact as customers associated with the company.
Changed in openerp-connector: | |
status: | New → Confirmed |
Changed in openerp-connector: | |
status: | Confirmed → Fix Committed |
Changed in openerp-connector: | |
status: | Fix Committed → Fix Released |
information type: | Embargoed → Public |
affects: | openerp-connector → openerp-connector-magento |
This is a schema with most common use cases and 3 ways to possible ways to handle them.
1. The current one
2. A mix between the current one and the third. Seems not to be a good solution
3. Merge the billing address and the account only it has only 1 address and no company on it, otherwise always keep them separated.