Skip to content
Permalink
Browse files

Merge 10.0 changes into 11.0

  • Loading branch information...
em230418 committed Aug 20, 2019
2 parents 0d27169 + 83f7ae8 commit 68515d762bea1d9a22b59f39a9e096e4fe83f6ec
@@ -4,7 +4,7 @@
"summary": """Get a random background at the login page""",
"category": "Extra Tools",
"images": ['images/login.png'],
"version": "1.0.1",
"version": "11.0.1.0.1",

"author": "IT-Projects LLC, Ildar Nasyrov, Nicolas JEUDY",
"support": "apps@it-projects.info",
@@ -25,9 +25,9 @@ def check(self, mode, values=None):
ids = [ids]
ids = ids[:] # make a copy
cr.execute('SELECT id,use_as_background FROM ir_attachment WHERE id = ANY (%s)', (ids,))
for id, use_as_background in cr.fetchall():
for attachment_id, use_as_background in cr.fetchall():
if use_as_background:
ids.remove(id)
ids.remove(attachment_id)
if not ids:
return
return super(IRAttachmentBackground, self).check(mode, values=values)
@@ -4,6 +4,7 @@
'author': 'IT-Projects LLC, Ivan Yelizariev',
'license': 'LGPL-3',
'category': 'Debranding',
'images': ['images/website_debranding.jpg'],
"support": "apps@it-projects.info",
'website': 'https://twitter.com/yelizariev',
# 'price': 60.00,
Binary file not shown.
@@ -38,7 +38,7 @@
`2.0.4`
-------

- **Fix:** Public users now have access to read company logo in a website
- **FIX:** Public users now have access to read company logo in a website

`2.0.3`
-------
@@ -15,3 +15,4 @@
<field name="domain_force">[('id','=', website.company_id.id)]</field>
</record>
</odoo>

@@ -9,7 +9,7 @@ E.g.

/shop/product/configurable-seo-url-for-the-best-product

instead of
instead of

/shop/product/name-of-product-123

@@ -30,20 +30,12 @@ Sponsors
Further information
===================

Demo: http://runbot.it-projects.info/demo/website-addons/8.0
Demo: http://runbot.it-projects.info/demo/website-addons/11.0

HTML Description: https://apps.odoo.com/apps/modules/8.0/website_seo_url/
HTML Description: https://apps.odoo.com/apps/modules/11.0/website_seo_url/

Usage instructions: `<doc/index.rst>`__

Changelog: `<doc/changelog.rst>`__

Tested on Odoo 8.0 bde083a5f91a659430b1227f240872f912f23c12

Need our service?
-----------------

Contact us by `email <mailto:it@it-projects.info>`__ or fill out `request form <https://www.it-projects.info/page/website.contactus>`__:

* it@it-projects.info
* https://www.it-projects.info/page/website.contactus
Tested on Odoo 11.0 3bc4d91e9b87286a2c0a43b775e80afbbb7c8122
@@ -3,7 +3,7 @@
"summary": """Allows to make custom SEO URL for pages related to some record""",
"category": "Website",
"images": [],
"version": "1.0.0",
"version": "11.0.1.0.0",

"author": "IT-Projects LLC, Ivan Yelizariev",
"support": "apps@it-projects.info",
@@ -0,0 +1,4 @@
`1.0.0`
-------

- **Init version**

This file was deleted.

@@ -8,15 +8,15 @@ class SEOURL(models.AbstractModel):
_seo_url_field = 'seo_url'

@api.model
def _check_seo_url(self, vals, id=0):
def _check_seo_url(self, vals, record_id=0):
field = self._seo_url_field
vals = vals or {}
value = vals.get(field)
if value:
vals[field] = value = slugify(value)
res = self.search([(field, '=', value), ('id', '!=', id)])
res = self.search([(field, '=', value), ('id', '!=', record_id)])
if res:
vals[field] = '%s-%s' % (vals[field], id)
vals[field] = '%s-%s' % (vals[field], record_id)
return vals

@api.model
@@ -27,7 +27,7 @@ def create(self, vals):
@api.multi
def write(self, vals):
for r in self:
vals = r._check_seo_url(vals, id=r.id)
vals = r._check_seo_url(vals, record_id=r.id)
super(SEOURL, r).write(vals)
return True

0 comments on commit 68515d7

Please sign in to comment.
You can’t perform that action at this time.