You are not understanding our point. We DO understand yours but we think it's still incorrect.
Example:
C2C FR: on table partner, ID=1
Joel: on table partner, ID=2, type=contact, address_id = 3, partner_id =1
Invoice_address: on table partner, ID=3, type=address, partner_id =1
This is OUR aproach.
NOW... on documents:
Invoice: Partner_id =1, many2one partners table Address_id=3, many2one partner table contact_id=2, many2one partner table
The aproach you are giving:
NEW field commercial_entity_id
C2C FR: on table partner, ID=1, commercial_entity_id =1
Joel: on table partner, ID=2, commercial_entity_id =1
Invoice_address: on table partner, ID=3, commercial_entity_id=1
On this point: Commercial_entity_id DOES NOT EXISTS yet, so you are including a new key base field that YOU DON'T NEED to fix your data model.
Now... on documents:
Invoice: Partner_id=2, commercial_entity_id=1 Address_id=¿?¿?¿?¿? --> 2 or 1¿?¿? contact_id = ¿?¿?¿?
Your aproach will need much longer time to make stable, you are breaking background compatibility. You can have just same functionality you need simply adding extra many2one or many2many fields on documents you need using first aproach, even the model can be easily extended by community modules, if you set correctly partner/party table type field and set correctly domains on documents... That's all. Where is the problem so?
@fabien:
You are not understanding our point. We DO understand yours but we think it's still incorrect.
Example:
C2C FR: on table partner, ID=1
Joel: on table partner, ID=2, type=contact, address_id = 3, partner_id =1
Invoice_address: on table partner, ID=3, type=address, partner_id =1
This is OUR aproach.
Address_ id=3, many2one partner table
contact_ id=2, many2one partner table
NOW... on documents:
Invoice: Partner_id =1, many2one partners table
The aproach you are giving: entity_ id entity_ id =1 entity_ id =1 entity_ id=1 entity_ id DOES NOT EXISTS yet, so you are including a new key base field that YOU DON'T NEED to fix your data model.
NEW field commercial_
C2C FR: on table partner, ID=1, commercial_
Joel: on table partner, ID=2, commercial_
Invoice_address: on table partner, ID=3, commercial_
On this point: Commercial_
Now... on documents: entity_ id=1
Address_ id=¿?¿? ¿?¿? --> 2 or 1¿?¿?
contact_ id = ¿?¿?¿?
Invoice: Partner_id=2, commercial_
Your aproach will need much longer time to make stable, you are breaking background compatibility. You can have just same functionality you need simply adding extra many2one or many2many fields on documents you need using first aproach, even the model can be easily extended by community modules, if you set correctly partner/party table type field and set correctly domains on documents... That's all. Where is the problem so?