A member can be a free member, but still have paid membership.
So we only should display member in a free membership_state and should
not get dupes.
closes#6805
opw-640440
This fixes :
* pagination only on /members and sometimes with bad page count,
* free members could not be searched (were always all displayed),
* all elements are displayed even if there is a pagination,
* for members without country, errors happened in some use case,
* when too much locations were on a map (>2000) it failed,
* numbers of members by countries was not displayed for guest.
And also as performance improvemnts:
* only query all partners when the map is enabled (customize > left
world map),
* limit partners put on the map to 2000 (even then it's a lot for
google maps),
* don't browse all membership_line to get res_partner but use a query.
opw-634653
This is possible to set a partner as a free member
simply by checking the "free member" box, in the partner form
This leads to the fact there is no membership lines for this partner
Before this rev., only partners having membership lines were displayed
on the website members page.
When searching on memberships, we use domain clauses in the format 'partner.x = y' where partner is a many2one to res.partner. The object res.partner has strict security rules for public users and this search will return zero result if not done with SUPERUSER_ID.
In addition, we need to access the list of products (membership_ids) in the domain to be sure we will retrieve only published membership (otherwise it would crash in the sort below).
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
[FIX] website*: unfuck buggy controllers
[IMP] website*: display GoogleMap in a human-usable interface
[IMP] website_google_map: large module cleaning
- There is now only one controller, data is sent once for all!
- Map is now fully resizable in its hosting template
- HTML/CSS cleaning
- JavaScript is now human-readable ;-)