Commit Graph
63 Commits
Author SHA1 Message Date
nasreddin boulif d948362e60 [IMP] base,contacts,website_customer: rename "Sectors of activity" to "Industries"
Purpose of this commit is to improve english wording in Odoo
regarding res.partner.industry model.

For that purpose we rename "Sectors of activity" with
"Industries" everywhere we use that naming.

Original feedback #2212682

Task ID #2214290
Closes #47559

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-20 08:53:57 +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 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
Jeremy Kersten dee3b87ae4 [FIX] website_customer: fix sitemap when customer had no country
Before this commit, the sitemap will crash if you have some res.partner
without country that are publish and with an assigned_partner_id.

Now, we only search for customer with country that are set and avoid to have
a traceback:
  File "/home/odoo/src/odoo/11.0/addons/website_customer/controllers/main.py", line 31, in sitemap_industry
    loc = '/customers/country/%s' % slug(country['country_id'])
  File "/home/odoo/src/odoo/11.0/addons/http_routing/models/ir_http.py", line 91, in slug
    identifier, name = value
  TypeError: 'bool' object is not iterable
2018-02-23 10:36:15 +01:00
Jeremy Kersten 1b52b00d2a [IMP] website*: clean sitemap + add method to declare sitemap function.
Don't add useless routes or route that will return 404.
Improve generate function from ModelConverter to have a better management of
query_string.

Now we have an helper sitemap_qs2dom that will analyse the current route and
check if query string is plausible and if yes, generate a domain, when the
query_string don't seems to match the route, we return a Falsy domain.

Before this commit, if qs was /product/ipad, enumerate_page check for each
modelconverter of the route a name ilike '/product/ipad'.

Now we check all routes that contains product and one converter that match ipad
or routes that contains ipad and one converter that match product.

This commit a new way to declare the sitemap for a route.
    def sitemap_xx(env, rule, query_string):
        yield {'loc': '/my_url'}
    @http.route(..., sitemap=sitemap_xx)

    In this case, only the loc returned by this function will be in the sitemap
    for all rules.

    You can pass sitempa=False, if you don't want that route are into the sitemap
2017-09-27 21:33:49 +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
Xavier Morel 17fe075cda [FIX] P3: absolute ordering removed 2017-07-18 11:49:28 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Yannick Tivisse 3a9d3a735d [IMP] website_customer: Add Sector of Activity on customer references
- Add a "Filter by Industry" filter on top of the "Filter by Country" on the main /customers page. It should work similarly to the filter by "Level" in the /partners page of crm_partner_assign, but would filter on the customer's industry (With "All Industries") etc.
	- (Cfr www.odoo.com/customers vs www.odoo.com/partners for live examples)
- The search input field on the main /customer page should search on the Industry field as well
- Add the "Industry" info to the /customers index, e.g. like a badge: http://i.imgur.com/Nzjeck9.png
- Add the "Industry" info to the website_customer.details template, e.g. like a badge or in the address block on the left
2017-05-22 11:30:11 +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
Christophe Simonis 6804085b8c [MERGE] forward port branch saas-11 up to b9374d5c21 2017-01-23 13:56:18 +01:00
Martin Trigaux 3c9937388d [FIX] website_customer: filter on correct field
The field tag_ids has been removed at df2bed3c but not changed in the controller
2017-01-19 17:17:42 +01:00
Nicolas Lempereur 5869cd6bd0 [FIX] website_customer: error if customer without countries
For customer without countries, we get False instead of tuple:
 (country_id, 'country name')

Introduced by a35cce2008.

opw-703234
2016-12-30 15:27:48 +01:00
Jeremy Kersten a35cce2008 [FIX] website_customer: fix new api migration
Avoid traceback 'list indices must be integers, not str' when country_id not in sidebar.
env.browse(id).read(['name']) return a list, so country['name'] should be country[0]['name']
2016-12-20 09:49:48 +01:00
Nicolas Martinelli 2fda62ebd8 [FIX] website, website_{*}: Google Maps API Key
Partial backport of c82b65c855

opw-686510
2016-08-29 08:48:09 +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
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +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
Jérome Maes 3275a90ff0 [MIG] website_customer : migraton to new api 2016-07-12 11:43:48 +02:00
Christophe Simonis 7f2de62378 [MERGE] forward port of branch 8.0 up to 33a8989 2015-02-11 17:25:33 +01:00
Jeremy Kersten 0cbf8d5386 [FIX] website_customer: check that customer has a country_id
Add country != False in main domain will be not the right fix, because if people doesn't activate the sort by country in customize, they are no reason to hide customer without country_id.
2015-02-06 10:53:15 +01:00
Jeremy Kersten 4a499efcf4 [IMP] website_customer: display filter by tag first, and sort tags by classname before the name. 2015-01-19 16:23:30 +01:00
Jeremy Kersten f8a16f50aa [FIX] website_customer: Fixes for review from commit e5ac65de59
Change xmlid from ir rule
Uses odoo unslug function
Rename CamelCase variable / function
Replace SQL by ORM search
Replace 1 by True for boolean
Improve name for ir model access
Add missing coding
Reindent long line
Reindent xml
Typo singular/plural
2015-01-09 09:55:35 +01:00
Jeremy Kersten e5ac65de59 [IMP] website_customer: add tags on partners. That allows to sort/filter the customers on website. Old categories [res.partner.category] (named Tags in UI) was confusing with tags and have been renamed into Categories. 2015-01-07 18:11:24 +01:00
Christophe Simonis c3131317d7 [MERGE] forward port of branch saas-4 up to ddef2dd 2014-08-20 17:57:22 +02:00
JKE-be e55098263b [FIX] website_customer: the extra / for url pager is not need in saas-4 2014-08-18 11:39:33 +02:00
Denis Ledoux fe83c11301 [MERGE] forward port of branch saas-4 up to b49755b
The forward port of the fix 3609ba10f2 will be done separately, as the mrp scheduler has been completely refactored from saas-5.

Conflicts:
	addons/l10n_be_coda/wizard/account_coda_import.py
	addons/point_of_sale/static/src/xml/pos.xml
	addons/procurement/schedulers.py
2014-08-13 10:45:36 +02:00
Denis Ledoux 945864338b [FIX] website_customer: the extra / for url pager is not need in saas-4 2014-08-12 18:13:27 +02:00
Denis Ledoux fc74431c1a [MERGE] forward port of branch saas-4 up to 7ecaab9 2014-08-12 16:27:57 +02:00
Denis Ledoux 28e5e2bb22 [FIX] website_customer: pager with country filter 2014-08-12 16:07:35 +02:00
Olivier Dony ee4df1e397 [MERGE] Forward-port saas-4 up to 8b15482 2014-08-01 13:06:49 +02:00
Jeremy Kersten 9390767376 [FIX] website_customer: check that country id exists before access the name, else traceback when we come from a non existing id via the url/controller 2014-07-31 14:43:42 +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 a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Antony Lesuisse 1501c7e64b [FIX] website_partner remove controller, add support for negative ids 2014-05-15 00:43:38 +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
Christophe Simonis 4922c5363e [FIX] website_{customer,partner,crm_partner_assign}: correct views and controllers 2014-05-12 19:51:21 +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 f85065930e [FIX]website_customer, website_crm_partner_assign: keep search if jump between countries, and keep countries if do a new search.
bzr revid: dle@openerp.com-20140130193706-xxn668p2edr69zue
2014-01-30 20:37:06 +01:00
Denis Ledoux ba09b1d439 [FIX] website_customer: keep search even if we change the country, list of country display all countries where there is at least one matching result
bzr revid: dle@openerp.com-20140130163639-5z0pt5npgk0t3u8k
2014-01-30 17:36:39 +01:00
Denis Ledoux a4a25292e7 [FIX]website_customer: group by country based on the result of the search, + do not display '0' right to All countries if no result + display 'No result found'
bzr revid: dle@openerp.com-20140130161132-cbn9z0i7aphzdrbn
2014-01-30 17:11:32 +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
openerp-sle be6b038fb7 [FIX] website_customer: removed redundant template 'customer_contact', fixed the country-filtering and avoid showing 'false' when partner has not website_short_description
bzr revid: openerp-sle@openerp-sle.home-20140129150838-pj9hmexxl3sk89tp
2014-01-29 16:08:38 +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