Skip to Content
Menu
This question has been flagged
2 Replies
1817 Views

Hello everyone,

I am currently transferring a website for a club from Odoo 11 CE to Odoo 13 CE. Installed are among others the modules "membership" and "website_membership".

"website_membership" creates a (web) index page of the members. This page is (correctly) sorted alphabetically in Odoo 11, but not in Odoo 13. Here are two example sections to illustrate this:

in Odoo 11 CE - correct / as I need it:

Abfall..., ABO W..., AEV ..., Arma..., Awi..., BDZ...,

in Odoo 13 CE - incorrect:

ABO W..., AEV..., Abfall..., Arma..., Awi..., BDZ...

on the one hand I don't understand the reason - as far as I understand the source-code (templates / controllers), I don't see any difference - and on the other hand I don't know how I can correct this ... Maybe someone has a hint?
Btw the only installed language is German (Odoo 11 CE as well as 13 CE - so the language seems to be not the problem.

Avatar
Discard
Author Best Answer

Hello Mohamed - thanks for your efforts. Unfortunately this does not seem to be the solution, apart from the fact that I could not implement it.

In the meantime I have found that the problem seems to go deeper. Because when I look at the contacts in Odoo 11 - regardless of the website problem - they are sorted exactly as I described above for the listing of members on the website in Odoo 11. 

The same applies to the sorting of the contacts in the contact view in Odoo 13 - i.e. there the contacts are sorted differently than in Odoo 11 - exactly as I described it for the listing of the members in Odoo 13 on the website. In my opinion this sorting is wrong because it should be alphabetically independent of upper or lower case letters and the German letters "ÜÖÄüöä" should not be sorted to the end of a list ...


So now the question arises whether the basic sorting in Odoo was changed from version 11 to 13 and / or which parameter I did not / incorrectly set in Odoo 13 to get the same result as in Odoo 11?

By the way - I have not adjusted / changed any sorting settings for the contact masks in Odoo 11 or Odoo 13 - everything is standard.

Avatar
Discard
Best Answer

Hello Christian,

The membership records, by default, are ordered by id. Please refer to addons/membership/models/membership.py --> membership.line model:

class MembershipLine(models.Model):
_name = 'membership.membership_line'
_rec_name = 'partner'
_order = 'id desc'
_description = 'Membership Line'

To achieve your need, you can override the members controller on the module website_membership and add the order attribute to search method call when searching membership lines. (website_membership/controllers/main.py --> members method)

I hope that my response will be helpful for you.

Good luck.


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 20
5338
1
Sep 20
2328
1
Jul 20
2716
2
Jul 20
3217
0
Jun 20
2010