Skip to content
Permalink
Browse files

Merge branch '10.0' into 10.0-website_multi_company_blog

  • Loading branch information...
ilmir-k committed Aug 12, 2019
2 parents 08b08aa + fb0ea13 commit 7e02091211fd7d2e23c9df29271ee915d9f4e2ed
@@ -23,6 +23,7 @@ env:

matrix:
- LINT_CHECK="1"
- CHECK_TAGS="1"
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1"
- TESTS="1" ODOO_REPO="OCA/OCB"

@@ -3,4 +3,4 @@ Web Login Background

Set your background picture on odoo login and signup screens.

Tested on Odoo 9.0 4dbc81f910d872ddb48d855396fcc7d91ddc9410
Tested on Odoo 10.0 66136110392b86c5b52fca7243b60f4f9fb9f789
@@ -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": "10.0.1.0.1",

"author": "IT-Projects LLC, Ildar Nasyrov",
"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)
@@ -5,6 +5,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.
@@ -7,7 +7,7 @@
"category": "eCommerce",
# "live_test_url": "http://apps.it-projects.info/shop/product/website-multi-company?version=10.0",
"images": ['images/website_multi_company_main.png'],
"version": "10.0.2.0.3",
"version": "10.0.2.0.5",
"application": False,

"author": "IT-Projects LLC, Ivan Yelizariev",
@@ -21,6 +21,7 @@
"website",
"website_multi_theme",
"ir_config_parameter_multi_company",
"ir_rule_website",
],
"external_dependencies": {"python": [], "bin": []},
"data": [
@@ -32,6 +33,7 @@
"views/website_navbar_templates.xml",
"views/res_users_view.xml",
"data/first_action.xml",
'security/res_security.xml',
],
"qweb": [
],
@@ -1,3 +1,14 @@
`2.0.5`
-------

- **Fix:** Non-admin users now have access to read company logo in a website


`2.0.4`
-------

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

`2.0.3`
-------

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp><data>
<record id="res_company_rule_public_website" model="ir.rule">
<field name="name">company rule public website</field>
<field name="model_id" ref="base.model_res_company"/>
<field eval="False" name="global"/>
<field name="groups" eval="[(6, 0, [ref('base.group_public')])]"/>
<field name="domain_force">[('id','=', website.company_id.id)]</field>
</record>
<record id="res_company_rule_user_website" model="ir.rule">
<field name="name">company rule user website</field>
<field name="model_id" ref="base.model_res_company"/>
<field eval="False" name="global"/>
<field name="groups" eval="[(6, 0, [ref('base.group_user')])]"/>
<field name="domain_force">[('id','=', website.company_id.id)]</field>
</record>
</data></openerp>
@@ -1 +1,2 @@
from . import test_domain_updating
from . import test_website_multi_company
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
from odoo.tests.common import SingleTransactionCase, get_db_name, at_install, post_install
from ..models.res_users import WEBSITE_REFS
from odoo.api import Environment

db_name = get_db_name()


@at_install(False)
@post_install(True)
class TestWebsiteMultiCompany(SingleTransactionCase):

def _test_website_price_difference_is_accessible(self, env):
website = env.ref(WEBSITE_REFS[0])
products = env['product.template'].search(
[('company_id', '=', website.company_id.id)] +
website.sale_product_domain()
)
product = products[0]
# make sure, it does not throw exception
product.website_price_difference # pylint: disable=pointless-statement

def test_website_price_difference_is_accessible_for_demo_user(self):
uid = self.registry['res.users'].authenticate(db_name, 'demo', 'demo', {})
with self.cursor() as cr:
env = Environment(cr, uid, {})
self._test_website_price_difference_is_accessible(env)

def test_website_price_difference_is_accessible_for_public_user(self, env=None):
self._test_website_price_difference_is_accessible(self.env(user=self.browse_ref('base.public_user')))
@@ -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/10.0

HTML Description: https://apps.odoo.com/apps/modules/8.0/website_seo_url/
HTML Description: https://apps.odoo.com/apps/modules/10.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 10.0 47587de19b616120e14b1f40c8ff5b846a132364
@@ -4,7 +4,7 @@
"summary": """Allows to make custom SEO URL for pages related to some record""",
"category": "Website",
"images": [],
"version": "1.0.0",
"version": "10.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.

@@ -9,15 +9,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
@@ -28,7 +28,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 7e02091

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