About the _find_accounting_partner(), your suggestion that "it could probably go all the way up to the root ancestor
in all cases (ignoring the `is_company` flag)".
This option is not possible for legal reason : you always invoice the company of your contact - not the top group mother company for example.
So, I suggest that the _find_accounting_partner() method works like this : "use the first parent which is a company if the current one is not a company" + in order to handle B2C cases, I suggest to add : "... if none (=no parent ticked as company), use the first parent"
(but I have to assume here that a customer who is a individual person can only have 1 parent - ie : in B2C e-commerce business, a customer can have several addresses but usually do not have parent)
@ Olivier
About the _find_accountin g_partner( ), your suggestion that "it could probably go all the way up to the root ancestor
in all cases (ignoring the `is_company` flag)".
This option is not possible for legal reason : you always invoice the company of your contact - not the top group mother company for example.
So, I suggest that the _find_accountin g_partner( ) method works like this : "use the first parent which is a company if the current one is not a company" + in order to handle B2C cases, I suggest to add : "... if none (=no parent ticked as company), use the first parent"
(but I have to assume here that a customer who is a individual person can only have 1 parent - ie : in B2C e-commerce business, a customer can have several addresses but usually do not have parent)
Frederic
Camptocamp