Commit Graph
68 Commits
Author SHA1 Message Date
Nicolas Lempereur efce576e56 [FIX] website_membership: pagination for free members
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

closes odoo/odoo#71512

X-original-commit: 107004eff7f5ebaffac27679a8d6d4f638af78af
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-05-31 16:04:02 +00:00
Martin Trigaux a4619a871f [IMP] website_membership: privatize method
No sensitive information is releaved when querying this method but no
reason to let it public either. Better safe than sorry.

closes odoo/odoo#66093

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-12 15:40:49 +00:00
Jeremy Kersten 8d34364874 [IMP] website_event,sale_*,slides: use is_view_active
Use is_view_active instead of viewref which one is cached.

closes odoo/odoo#55816

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-12 13:46:37 +00:00
Xavier Morel de590816d8 [FIX] *: deprecated access to url_ utilities through werkzeug root
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.
2020-02-04 12:42:35 +00:00
Jeremy Kersten e19227d3ba [IMP] website*: clean sitemap
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

closes odoo/odoo#39427

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-28 10:36:56 +00:00
Romain Derie 9411ac0acd [FIX] website_*: get specific view over generic one
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
2018-12-19 18:24:50 +00:00
Christophe Simonis 069278b652 [MERGE] forward port branch saas-11.3 up to 55dafc20f6 2018-12-11 18:51:05 +01:00
Christophe Simonis 7e5d5045bf [MERGE] forward port branch saas-15 up to 1ace2ed88b 2018-12-11 16:20:34 +01:00
Romain Derie f69c004795 [FIX] website_membership: correctly check if customize view is active
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.

closes odoo/odoo#29414
2018-12-11 10:23:50 +00:00
Jeremy KerstenandDerie Romain 8300155cd6 [IMP] website: res_config_setting make most key website specific
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>
2018-08-13 20:16:34 +02:00
Thibault Delavallée 014b5c9f7c [MOV] website, http_routing: move (un)slug support to http_routing
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.
2017-08-08 14:23:58 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
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
2017-05-10 09:39:55 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Nicolas Martinelli c82b65c855 [IMP] website, website_{*}: Google Maps API Key
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.
2016-08-25 16:33:23 +02:00
Jeremy Kersten ffa998d64c [IMP] website_membership: add search count
Show number of members found in the searchbox
2016-08-19 19:33:21 +02:00
Jérome Maes 8a399930f3 [REF] website_*: remove render method on website
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.
2016-08-04 12:02:14 +02:00
fwi-odoo d4e813b873 [REF] web, *: change deprecated import openerp.addons.web.http to odoo.http
We also remove the mock in web as there is no need for it anymore.
2016-08-03 13:42:05 +02:00
Ravi Gadhia 631019b865 [MIG] website_membership: migration to new api 2016-07-12 17:25:48 +02:00
Denis Ledoux dcd8d65fd1 [MERGE] forward port of branch saas-6 up to 6a306a03be 2015-10-28 14:01:10 +01:00
Nicolas Lempereur ba9771d6ec [FIX] website_membership: don't display old as members
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
2015-10-15 12:08:51 +02:00
Christophe Simonis 38a20af9b7 [MERGE] forward port of branch saas-6 up to dfdd12e 2015-09-23 17:35:52 +02:00
Christophe Simonis 0cddf87a77 [FIX] {website_,}membership: membership should start the same day of the invoice 2015-09-23 17:15:01 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Nicolas Lempereur 5ac77c943b [FIX] membership, website_membership: paid but expired
A paid membership is expired if the validity period (period between
date_from and date_to) doesn't match with the current date.

closes #8505
opw-648627
2015-09-14 10:43:29 +02:00
Ajay Javiya d8fb8fa6a9 [ADD] website : generic template for search and add functionality to clear search box 2015-07-07 14:10:14 +02:00
Nicolas Lempereur 1bd50551c5 [FIX] website_membership: free state and not free member
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
2015-05-22 11:00:44 +02:00
Nicolas Lempereur 5804246e0f [FIX] website_membership: perf, pagination
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
2015-05-08 11:10:53 +02:00
Denis Ledoux 2996fd0897 [FIX] website_membership: free members while not logged in.
By default public/portal users do not have the access
rights to read the partners.

opw-628857
2015-03-12 10:10:19 +01:00
Denis Ledoux 314a0358b7 [FIX] website_membership: include free members in members page
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.
2015-02-12 11:56:08 +01:00
Christophe Simonis fd4fd35e32 [MERGE] forward port of branch saas-5 up to e4cb520 2014-07-30 20:52:14 +02:00
Christophe Simonis e4cb5202a0 [MERGE] forward port of branch saas-4 up to fa07bc8 2014-07-30 20:30:14 +02:00
Denis Ledoux 88c022dfc8 [MERGE] forward port of branch 7.0 up to bbb8d8f25a 2014-07-29 11:42:10 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
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
2014-07-06 17:05:41 +02:00
Olivier Dony d9cda97cf4 [MERGE] Forward-port saas-4 up to 5ceded9 2014-07-05 01:28:19 +02:00
Jeremy Kersten e77594c3c3 [IMP] website: backport 5112421a (unslug)
Update the regexp to be not case sensitive
2014-06-30 18:29:20 +02:00
Christophe Simonis 5112421a93 [FIX] website: correct slug parsing 2014-06-25 11:08:51 +02:00
Richard Mathot f04e6de2e7 [FIX][IMP] Make partner maps work properly
[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 ;-)
2014-06-03 16:34:30 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Antony Lesuisse ca08f5d674 [FIX] website_membership support negative ids 2014-05-15 09:54:13 +02:00
Christophe Simonis a6f036d43f [FIX] website_membership: correct view and controller 2014-05-13 18:52:37 +02:00
Fabien Meghazi 8eed143112 [IMP] Invert multilang logic in route decorator. True by default, can be set to False explicitlty 2014-05-13 11:35:45 +02:00
chm@openerp.com 353bbdc2c3 [FIX] website: route and redirect: remove all backslash from url
bzr revid: chm@openerp.com-20140314162346-25vohj6ayp65tgiy
2014-03-14 17:23:46 +01:00
Denis Ledoux 320b840341 [FIX] website_membership, website_customer: keep search, country and assocations when jumping from each other of these filters + count fix between partners displayed and group by country count + fix country orders in website_customer
bzr revid: dle@openerp.com-20140130205713-09cbldm9r9pm6r1i
2014-01-30 21:57:13 +01:00
Denis Ledoux 255fe082bd [FIX] website_membership: membership displayed order depending on website_sequence
bzr revid: dle@openerp.com-20140129171554-h76n4579xquhdxxv
2014-01-29 18:15:54 +01:00
Olivier Dony e6e8bb3789 [IMP] website_*: remove useless % chars surrounding ilike operand, this is the default
bzr revid: odo@openerp.com-20140129163557-0bb86mx8it57mcvi
2014-01-29 17:35:57 +01:00
Denis Ledoux 0306adbfe3 [FIX] *: using werkzeug.url_encode instead of urllib.urlencode because urliblib.encode does not accept unicode
bzr revid: dle@openerp.com-20140129121316-b5f5e4r6fz9l80kq
2014-01-29 13:13:16 +01:00
Fabien Meghazi d6690455e9 [REM] Removed preload_records
This feature will be stripped down and moved to server's ir.http#_dispatch()

bzr revid: fme@openerp.com-20140123150448-3hhlj4vytr82k88n
2014-01-23 16:04:48 +01:00
Fabien Meghazi 14bb6060d7 [REM] Removed @website.route() decorator
Need trunk-website-al Rev#5151

bzr revid: fme@openerp.com-20140120153733-ve3dn2kwvha7n3yl
2014-01-20 16:37:33 +01:00
Christophe Matthieu 3f0f6b820b [FIX] website: Access rights and Access for: website_crm_partner_assign, website_customer, website_event, website_event_track, website_membership, website_partner, website_sale
bzr revid: chm@openerp.com-20140107135933-h622wxwfhwoulg7q
2014-01-07 14:59:33 +01:00
Fabien Meghazi 68f0397609 [IMP] preload all objects
bzr revid: fme@openerp.com-20131217150211-zquu7nn05g23m4r4
2013-12-17 16:02:11 +01:00