Courtesy of Juan José Scarafía, ADHOC
The quality of the Spanish (Argentina) translations is very poor.
Remove them all and will start from scratch, translating only when needed.
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
The regional variations are not published on Transifex and hsould be translated
manually.
The translations are mainly from previous versions or contains buggy fuzzy
translations (not matching the real source string).
Clean based on the .pot and delete the empty files
Fixes#21733
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