Comment 105 for bug 1160365

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote : Re: [Bug 1160365] Re: [7.0] incorrect handling of contact/companies for invoicing and related purposes

Ana,

Don't make we wrong. The change in the semantic in v7 is the following:

  - In v6.1, "Joël, Camptocamp" was an address of Camptocamp.
  - In v7, "Joël, Camptocamp" is a person representing the "Camptocamp"
    company.

It does not mean that the invoice do not belong to Camptocamp. The
invoice belong to Camptocamp (partner_commercial_id): it's Camptocamp
that will pay it and Camptocamp will be printed on all legal reports.

It means that someone representing the company "Joël" can do a purchase
for the company and it's not the same situation than having a purchase
in the name of Camptocamp. (e.g. in Belgium you can break a contract if
you can proove that Joël did not had the right to sign for Camptocamp)

In terms of data model, it does not change anything as:
  - on the invoice, you have the link to both (directly or indirectly,
    depending if we add a related field)
  - on Joël, you have the link to what he purchased
  - on Camptocamp, you have two fields:
      - invoice_ids: what C2C bought directly
      - invoice_commercial_ids: what C2C and Joël bought (or child_of
        if you don't want the related field)

Note also that "partner_id, address_id" is not exactly the same than
"partner_commercial_id, partner_id". The semantic really changed, it's
not just a switch in field names.

For different reasons:
  - partner_id is the main field on an invoice in v6.1. In v7,
partner_id is also the main field. The only one you should record in the
interface.
  - partner_id -> address_id in v6.1 is different than
"partner_commercial_id -> partner_id". E.G. in v7: in B2C,
partner_commercial_id=partner_id, in most B2B
partner_commercial_id=partner_id.parent_id, in b2B or B2C when using
hierarchies, you can have: partner_commercial_id =
partner_id.parent_id.parent_id.id

On 04/10/2013 09:56 PM, Ana Juaristi Olalde wrote:
> @Fabien:
> So... No, I think the record belongs to Joël, not C2C FR and certainly not to
> both. In other words: an invoice to "Joël, C2C" is not the same than an
> invoice to "C2C". (e.g. you send the invoice to <email address hidden>, not
> <email address hidden>)
> --> THIS IS JUST THE PROBLEM. An Invoice, belongs ALWAYS to C2C FR because your fiscal legal entity is C2C FR. Additionally you will send the invoice to Joêl or you could send to several other accountant contacts if you need, or even you could sent to general "info@" because it's the main email for company and additionally to contacts that you want to send. You are giving priority to communications instead of giving priority to legal requirement. Communications can be built as final customer decides. Even if you assume there is only one financial contact this assumtion can be wrong from final customer side but he can NEVER deny that invoice has to be behind the name of legal fiscal entity as is written by low in most countries I know.
>
> If you make the record belong to both, you will have others problems
> like count(one2many) that will return twice the real number of records
> --> This is not exactly like that because if you have got 2 fields on documents you will always count sum(partner_id). You will always have correct number if you set correctly the domain depending on where you are launching the query. I don't see problem on that.
>
> Please think about this aproach. Most important think here is that an ERP should not give priority to secondary functionality but always to principal one. On this case accounting is the principal because is set by law. Other functionalities are customizable and not so critical so they can be even avoided.
> Thank you very much.
> Ana
>
>
> Fabien
>

--
Fabien Pinckaers
CEO OpenERP
Chaussée de Namur 40
B-1367 Grand-Rosière
Belgium
Phone: +32.81.81.37.00
Fax: +32.81.73.35.01
Web: http://openerp.com