Skip to content
Snippets Groups Projects
Commit 4bb5ba65 authored by Prakash Prajapati's avatar Prakash Prajapati Committed by Yannick Tivisse
Browse files

[IMP] account: Rename customer/vendor filters on a partner


PURPOSE
=======

When the customer and supplier boolean fields were dropped
from res.partner in 13.0, the 'customers' and 'vendors' filters
were removed as well.

Two new 'customers' and 'vendors' filters have since been added
in the account module.

They might look identical to the former ones at first, but those
are instead based on two brand new 'rank' integer fields:
customer_rank and supplier_rank.

Those fields start off at zero and are increased by one each
time an in_invoice/out_invoice line is posted for the res.partner.

This means that, to be considered as a customer, a res.partner
has to have at least one invoice line posted.

This has stem confusion in both former and new users of Odoo:
- users do not have a clear idea of how this filter actually
  works. (I personally had to go through xml and python code to
  understand how to turn a res.partner into a 'customer')
- to the users that were used to the 'customer/supplier' boolean
  fields, it simply looks like the old filters stayed while the
  boolean fields were removed
- one of the reason why we got rid of the 'is a customer' field,
  is that there is no unanimous definition of what a customer
  actually is
    - is it when the lead is won? when the quotation is
      created/sent/confirmed? when the invoice is
      created/sent/confirmed?
    - here, we decided that is it when the invoice is posted,
      but whether the user agrees or not with this definition,
      there is no way for him to know this is where we decided
      to draw the line

A simple way to clarify all this is to rename the 'Customers' and
'Vendors' filters to make it obvious that they are based on the
customer invoices and vendor bills.

closes odoo/odoo#43349

Taskid: 2166410
Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 8e4158af
Branches
Tags
No related merge requests found
......@@ -218,8 +218,8 @@
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='inactive']" position="before">
<filter string="Customers" name="customer" domain="[('customer_rank','>', 0)]"/>
<filter string="Vendors" name="supplier" domain="[('supplier_rank','>', 0)]"/>
<filter string="Customer Invoices" name="customer" domain="[('customer_rank','>', 0)]"/>
<filter string="Vendor Bills" name="supplier" domain="[('supplier_rank','>', 0)]"/>
<separator/>
</xpath>
</field>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment