Comment 5 for bug 526930

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

I'm with Hernan:

OpenERP 'tags' each line of a movement with the partner_id. That means that you can for example do a quick search of all the taxes (VAT lines) that you registered on operations with that partner on the accounting level. If you only tag the receivable/payable accounts you will lose this info!!

Currently, you can use the "All moves" link to quickly see all the operations registered in the name of one partner. And then you can then use the filters to restrict the info just to the receivable/payable accounts or something.
That means that, for example, you can do:
  - Go to "All moves" for a partner.
  - Filter by account code, set the account code of a bank (for example, in Spain "572")
  - You get a list of all the payments done by that client on your bank! Neat, isn't it?

If you just tag the payable/receivable accounts you lose that power too!!

But do you know the funny part? You already have a link that filters the payable/receivable moves for you! On the account module you have this link:

        <act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_partner_account_move_unreconciled" name="Receivables &amp; Payables" res_model="account.move.line" src_model="res.partner"/>

It shows only unreconciled movements on the partners (receivable/payable) accounts. Isn't that just what you were trying to get?

> If the partner_id should (or must, what I do not hope) remain in the
> move line the XML must be heavily reworked , because the
> payable/receivable is a functional field which can not be filtered using domain.

Well, that's true, and could be easily solved by adding a search method to those functional fields or storing those functional fields (the second being faster for queries). But you can also do as the domain shown before and filter the "account_id.type" directly :)