From 631019b86 /members route never fills free_partner_ids which is used
to determine pagination and filling contact on map up to maximum number
of contacts (currently 2000).
With this changeset, we fix them so the pagination should be shown if it
is necessary to display free membership partners.
opw-2513748
closesodoo/odoo#71512
X-original-commit: 107004eff7f5ebaffac27679a8d6d4f638af78af
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
No sensitive information is releaved when querying this method but no
reason to let it public either. Better safe than sorry.
closesodoo/odoo#66093
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.
Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.
It's the default value, but if you forgot it, it will raise a Warning on runbot.
It will avoid wrong controller in sitemap and duplicate (empty) content.
From now, if your model contains a field website_id, the modelConverter for
sitemap will automatically add the domain:
"[('website_id', 'in', (False, current_website_id))]"
It avoid redundant declaration and ugly url in redirect/rewrite view.
Migration: need to remove it from url_from in website.rewrite
task-2065018
closesodoo/odoo#39427
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, self.env.ref would always find the generic view loaded from
the assets.
Disabling a customize_show view on a website would not hide completely the
feature as the self.env.ref would retrieve the active generic one and not the
inactive specific one.
Step to reproduce (on one of the module):
- Install website_sale_wishlist
- Disable "Wishlist" on the Customize menu of /shop
- Go to a product page, the wishlist hearth icon is still there
opw-1914576
Closes#29347
Commit 5804246e0f introduced some improvements to speed up performances.
One of them was to check if a customize_show view was active or not but the
condition was on view.customize_show instead of view.active.
Thus, as that view is always a customize_show, the condition would always be
met.
closesodoo/odoo#29414
google analytics, google map api key, ... can be set by website
Remove useless duplicated label
Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
Slug and unslug API is now available in http_routing. Indeed there is no
link to any website or any reason to not support slufigied URLs when
website is not installed. A new unslug_url method is added as a tool
coming from an embedded method from website. Doing it allows to have all
slug related methods defined at the same point.
Support of slug and unslug in qweb rendering is also moved directly in
http_routing version of ir_ui_view instead of website inheritance. This
is done in order to keep things coherent.
Some code from website about ModelConverter is also moved. Indeed both
versions of ir_http uses some kind of placeholder to store the uid
when converting urls to python. This commit unifies it by using the
website one directly in base to simplify the override.
This commit also updates all module importing slug. Enterprise modules
will have to be updated, see related commit.
In Python 3:
* various builtins and dict methods were changed to return
view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
removed altogether
This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).
Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.
issue #8530
As of June 22 2016, the use of API key is required to access the
following:
- Google Maps JavaScript API
- Google Static Maps API
- Google Street View Image API
https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update
For domains accessing the API before June 22, it will still work without
an API key. Since Google advises to use the API key, we hide the Maps if
no API key is defined.
Since saas-3, website controllers use `request.website.render`
to render the template of a web page. This was kept for retro
compatibility. It's time to stop using deprecated stuff.
Same for `_render` method on website.
'json' route don't use `request.render` since
`JsonRequest` has no `render` method.
Follow-up of 5ac77c9 which solved the issue when an association was
selected, but not when "All Members" was choosen.
Before this commit, the displayed membership lines would only be the
paid ones, if an association (membership product) was selected. With
this commit this is also the case when no such association is selected.
This commit also correct the member counts in the "country" list :
* with "All members" the free members were not in the counts,
* with not "Free member", the counts didn't took the eventual current name search.
closes#9083
opw-648627
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.
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 ;-)