Baptiste Vergote 90e0abb413 [FIX] membership: fix state computing for non paid invoice
Having a non paid membership for last year and being associate with
someone having a non paid membership was dispalying an 'old' membership
state instead if a 'non' membership.

Assumption:
If an associate member is added, take the state of the associate member
(tooltip of associate member).
In case the associate member is a 'non member', it's stupid to associate
with someone that is paying or have paid as it won't consider the state of
the current paid member, the link has to be made on the other side:
the 'non' paying will be associate with the 'paid'.

Create membership for
        a/ 2019 (1jan to 31dec)
           > For the calculation of the 'old' state
        b/ 2020 (1jan to 31dec)
           > For the calculation of the 'paid' state

Create few res.partner:
AA: No associate.
        2019 - Paid
        2020 - Paid
        >> Paid member
        (= ok)

CC Case 1:
Associate with AA
        2019 - Invoiced (but not paid)
        2020 - None
        >> Paid member due to association with AA
        (= ok)

CC Case 2:
Not associate:
		2019 - Invoiced (but not paid)
        2020 - None
        >> Before fix: Old member
        (= nok)
        >> After fix: Non member
        (= ok) As he never paid and not linked to someone that paid.

DD: Associate with AA
        2019 - Invoiced not paid
        2020 - Paid
        >> Paid member (with or without association with AA)
        (= ok)

EE Case 1:
Not associate:
        2019 - Paid
        2020 - None
        >> Old member
        (= ok)

Case 2:
Associate with DD
        2019 - Invoiced (not paid)
        2020 - None
        >> Paid member (due to association with DD)
        (= ok)

Case 3:
Associate with CC
        2019 - Invoiced (not paid)
        2020 - None
        >> Before fix: Old member (due to none having a current 2020 invoiced)
        (= nok it should take the state of CC)
        >> After fix: Non member (as CC is not a member)

opw-2287050

closes odoo/odoo#55773

X-original-commit: 5e7b7b0a645bcff175bf8d2483eae5ffd4aaf89b
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-12 07:25:28 +00:00
2020-04-20 11:41:39 +00:00
…
2019-10-03 12:48:09 +00:00
…
…
…
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%