diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-07-26 11:04:45 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-07-26 11:04:45 +0200 |
| commit | 6a9bbba17e2664f60000c12950626e024b7eb9a8 (patch) | |
| tree | 7e6829f754241d4e033922d9ec11f6df53caa5ef /addons | |
| parent | 087989b12ed3af764bee6c916ee4e465e360d9fe (diff) | |
[IMP] remove portal_anonymous, create group_public in server and public user in website
bzr revid: chm@openerp.com-20130726090445-4mmd1xlx5uwd6vmx
Diffstat (limited to 'addons')
60 files changed, 232 insertions, 701 deletions
diff --git a/addons/im/static/src/xml/im.xml b/addons/im/static/src/xml/im.xml index 795d1b3e698..c78a3c9466e 100644 --- a/addons/im/static/src/xml/im.xml +++ b/addons/im/static/src/xml/im.xml @@ -31,12 +31,12 @@ <div class="oe_im_chatview"> <div class="oe_im_chatview_header"> <img t-att-src="_s +'/im/static/src/img/green.png'" class="oe_im_chatview_online"/> - <t t-esc="widget.user.get('name') || 'Anonymous'"/> + <t t-esc="widget.user.get('name') || 'Public'"/> <scan class="oe_im_chatview_nbr_messages" /> <button class="oe_im_chatview_close">×</button> </div> <div class="oe_im_chatview_disconnected"> - <t t-esc='_.str.sprintf(_t("%s is offline. He/She will receive your messages on his/her next connection."), widget.user.get("name") || "Anonymous")'/> + <t t-esc='_.str.sprintf(_t("%s is offline. He/She will receive your messages on his/her next connection."), widget.user.get("name") || "Public")'/> </div> <div class="oe_im_chatview_content"> <div></div> @@ -51,7 +51,7 @@ <div class="oe_im_chatview_clip"> <img class="oe_im_chatview_avatar" t-att-src='user.get("image_url")'/> </div> - <div class="oe_im_chatview_from"><t t-esc="user.get('name') || 'Anonymous'"/></div> + <div class="oe_im_chatview_from"><t t-esc="user.get('name') || 'Public'"/></div> <div class="oe_im_chatview_bubble_list"> <t t-foreach="items" t-as="item"> <div class="oe_im_chatview_bubble_item"><t t-esc="item"/></div> diff --git a/addons/im_livechat/__openerp__.py b/addons/im_livechat/__openerp__.py index 8b9ea3924d5..8f8cce9801e 100644 --- a/addons/im_livechat/__openerp__.py +++ b/addons/im_livechat/__openerp__.py @@ -22,7 +22,7 @@ chat operators. 'demo': [ "im_livechat_demo.xml", ], - 'depends' : ["im", "mail", "portal_anonymous"], + 'depends' : ["im", "mail", "website"], 'installable': True, 'auto_install': False, 'application': True, diff --git a/addons/im_livechat/im_livechat.py b/addons/im_livechat/im_livechat.py index adceebc7cba..f2ac2f604de 100644 --- a/addons/im_livechat/im_livechat.py +++ b/addons/im_livechat/im_livechat.py @@ -43,7 +43,7 @@ class LiveChatController(http.Controller): db = p["db"] channel = p["channel"] user_name = p.get("user_name", None) - request.session.authenticate(db=db, login="anonymous", password="anonymous") + request.session.authenticate(db=db, login="public", password="public") info = request.session.model('im_livechat.channel').get_info_for_chat_src(channel) info["db"] = db info["channel"] = channel @@ -56,7 +56,7 @@ class LiveChatController(http.Controller): p = json.loads(kwargs["p"]) db = p["db"] channel = p["channel"] - request.session.authenticate(db=db, login="anonymous", password="anonymous") + request.session.authenticate(db=db, login="public", password="public") script = request.session.model('im_livechat.channel').read(channel, ["script"])["script"] info = request.session.model('im_livechat.channel').get_info_for_chat_src(channel) info["script"] = script @@ -65,7 +65,7 @@ class LiveChatController(http.Controller): @http.route('/im_livechat/available', type='json') def available(self, db, channel): - request.session.authenticate(db=db, login="anonymous", password="anonymous") + request.session.authenticate(db=db, login="public", password="public") return request.session.model('im_livechat.channel').get_available_user(channel) > 0 class im_livechat_channel(osv.osv): diff --git a/addons/im_livechat/loader.js b/addons/im_livechat/loader.js index 669591b410f..8f177e09a8b 100644 --- a/addons/im_livechat/loader.js +++ b/addons/im_livechat/loader.js @@ -14,7 +14,7 @@ require.config({ }, })(["livesupport", "jquery"], function(livesupport, jQuery) { jQuery.noConflict(); - livesupport.main({{url | json}}, {{db | json}}, "anonymous", "anonymous", {{channel | json}}, { + livesupport.main({{url | json}}, {{db | json}}, "public", "public", {{channel | json}}, { buttonText: {{buttonText | json}}, inputPlaceholder: {{inputPlaceholder | json}}, defaultMessage: {{(defaultMessage or None) | json}}, diff --git a/addons/im_livechat/security/ir.model.access.csv b/addons/im_livechat/security/ir.model.access.csv index 0dcf0bdee6f..05469673eca 100644 --- a/addons/im_livechat/security/ir.model.access.csv +++ b/addons/im_livechat/security/ir.model.access.csv @@ -4,5 +4,5 @@ access_ls_chann2,im_livechat.channel,model_im_livechat_channel,group_im_livechat access_ls_chann3,im_livechat.channel,model_im_livechat_channel,group_im_livechat_manager,1,1,1,1 access_ls_message_portal,im_livechat.im.message.portal,im.model_im_message,portal.group_portal,0,0,0,0 access_im_user_portal,im_livechat.im.user.portal,im.model_im_user,portal.group_portal,1,0,0,0 -access_ls_message,im_livechat.im.message,im.model_im_message,portal.group_anonymous,0,0,0,0 -access_im_user,im_livechat.im.user,im.model_im_user,portal.group_anonymous,1,0,0,0
\ No newline at end of file +access_ls_message,im_livechat.im.message,im.model_im_message,base.group_public,0,0,0,0 +access_im_user,im_livechat.im.user,im.model_im_user,base.group_public,1,0,0,0
\ No newline at end of file diff --git a/addons/im_livechat/static/ext/static/js/jquery.js b/addons/im_livechat/static/ext/static/js/jquery.js index ded03845983..34a998064fe 100644 --- a/addons/im_livechat/static/ext/static/js/jquery.js +++ b/addons/im_livechat/static/ext/static/js/jquery.js @@ -580,7 +580,7 @@ jQuery.extend({ globalEval: function( data ) { if ( data && jQuery.trim( data ) ) { // We use execScript on Internet Explorer - // We use an anonymous function so that context is window + // We use an public function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); @@ -9542,7 +9542,7 @@ window.jQuery = window.$ = jQuery; // they have special allowances for multiple jQuery versions by // specifying define.amd.jQuery = true. Register as a named module, // since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous +// but not use a proper concatenation script that understands public // AMD modules. A named AMD is safest and most robust way to register. // Lowercase jquery is used because AMD module names are derived from // file names, and jQuery is normally delivered in a lowercase file name. diff --git a/addons/im_livechat/static/ext/static/js/livesupport.js b/addons/im_livechat/static/ext/static/js/livesupport.js index c45e9588c83..a99a157881c 100644 --- a/addons/im_livechat/static/ext/static/js/livesupport.js +++ b/addons/im_livechat/static/ext/static/js/livesupport.js @@ -18,7 +18,7 @@ define(["nova", "underscore", "oeclient", "require", "jquery", inputPlaceholder: "How may I help you?", defaultMessage: null, auto: false, - userName: "Anonymous", + userName: "Public", }); defaultInputPlaceholder = options.inputPlaceholder; userName = options.userName; diff --git a/addons/im_livechat/static/ext/static/js/require.js b/addons/im_livechat/static/ext/static/js/require.js index f46a9245d97..eaa2b0dc7be 100644 --- a/addons/im_livechat/static/ext/static/js/require.js +++ b/addons/im_livechat/static/ext/static/js/require.js @@ -1029,7 +1029,7 @@ var requirejs, require, define; //resource this.depMaps.push(moduleMap); - //Support anonymous modules. + //Support public modules. context.completeLoad(moduleName); //Bind the value of that module to the value for this @@ -1188,7 +1188,7 @@ var requirejs, require, define; while (defQueue.length) { args = defQueue.shift(); if (args[0] === null) { - return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); + return onError(makeError('mismatch', 'Mismatched public define() module: ' + args[args.length - 1])); } else { //args are id, deps, factory. Should be normalized by the //define() function. @@ -1476,7 +1476,7 @@ var requirejs, require, define; args = defQueue.shift(); if (args[0] === null) { args[0] = moduleName; - //If already found an anonymous module and bound it + //If already found an public module and bound it //to this name, then this is some other anon module //waiting for its completeLoad to fire. if (found) { @@ -1802,7 +1802,7 @@ var requirejs, require, define; !isOpera) { //Probably IE. IE (at least 6-8) do not fire //script onload right after executing the script, so - //we cannot tie the anonymous define call to a name. + //we cannot tie the public define call to a name. //However, IE reports the script as being in 'interactive' //readyState at the time of the define call. useInteractive = true; @@ -1826,7 +1826,7 @@ var requirejs, require, define; node.src = url; //For some cache cases in IE 6-8, the script executes before the end - //of the appendChild execution, so to tie an anonymous define + //of the appendChild execution, so to tie an public define //call to the module name (which is stored on the node), hold on //to a reference to this node, but clear after the DOM insertion. currentlyAddingScript = node; @@ -1847,7 +1847,7 @@ var requirejs, require, define; //reevaluated if other use cases become common. importScripts(url); - //Account for anonymous modules + //Account for public modules context.completeLoad(moduleName); } }; @@ -1914,7 +1914,7 @@ var requirejs, require, define; define = function (name, deps, callback) { var node, context; - //Allow for anonymous modules + //Allow for public modules if (typeof name !== 'string') { //Adjust args appropriately callback = deps; @@ -1951,7 +1951,7 @@ var requirejs, require, define; } } - //If in IE 6-8 and hit an anonymous define() call, do the interactive + //If in IE 6-8 and hit an public define() call, do the interactive //work. if (useInteractive) { node = currentlyAddingScript || getInteractiveScript(); @@ -1965,7 +1965,7 @@ var requirejs, require, define; //Always save off evaluating the def call until the script onload handler. //This allows multiple modules to be in a file without prematurely - //tracing dependencies, and allows for anonymous module support, + //tracing dependencies, and allows for public module support, //where the module name is not known until the script onload event //occurs. If no context, use the global queue, and get it processed //in the onscript load callback. diff --git a/addons/mail/security/ir.model.access.csv b/addons/mail/security/ir.model.access.csv index 1141a3f928d..13258c239ee 100644 --- a/addons/mail/security/ir.model.access.csv +++ b/addons/mail/security/ir.model.access.csv @@ -19,3 +19,4 @@ access_mail_message_subtype_all,mail.message.subtype.all,model_mail_message_subt access_mail_message_subtype_system,mail.message.subtype.system,model_mail_message_subtype,base.group_system,1,1,1,1
access_mail_thread_all,mail.thread.all,model_mail_thread,,1,1,1,1
access_publisher_warranty_contract_all,publisher.warranty.contract.all,model_publisher_warranty_contract,,1,1,1,1
+access_mail_message_public,mail.message.public,mail.model_mail_message,base.group_public,1,0,0,0
diff --git a/addons/portal/__openerp__.py b/addons/portal/__openerp__.py index 919f22aa360..e2bdde949f9 100644 --- a/addons/portal/__openerp__.py +++ b/addons/portal/__openerp__.py @@ -33,7 +33,7 @@ Customize access to your OpenERP database to external users by creating portals. ================================================================================ A portal defines a specific user menu and access rights for its members. This -menu can ben seen by portal members, anonymous users and any other user that +menu can ben seen by portal members, public users and any other user that have the access to technical features (e.g. the administrator). Also, each portal member is linked to a specific partner. diff --git a/addons/portal/portal_data.xml b/addons/portal/portal_data.xml index ac36bbde15e..f489ffc5767 100644 --- a/addons/portal/portal_data.xml +++ b/addons/portal/portal_data.xml @@ -76,16 +76,6 @@ </field> </record> - <!-- - A group dedicated to the anonymous user only, making groups - restrictions more convenient. - --> - <record id="group_anonymous" model="res.groups"> - <field name="name">Anonymous</field> - <field name="comment">Anonymous users have specific access rights (such as record rules and restricted menus). - They usually do not belong to the usual OpenERP groups.</field> - </record> - <record id="paypal_acquirer" model="portal.payment.acquirer"> <field name="name">Paypal</field> <field name="form_template"><![CDATA[ diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml index 1ff98bdc77f..1c6c18bca08 100644 --- a/addons/portal/portal_view.xml +++ b/addons/portal/portal_view.xml @@ -5,7 +5,7 @@ <!-- Top menu item --> <menuitem name="Portal" id="portal_menu" - groups="portal.group_portal,portal.group_anonymous" + groups="portal.group_portal" sequence="15"/> <menuitem name="Messaging" id="portal_messages" parent="portal_menu" sequence="10" groups="portal.group_portal"/> diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml index 02080bdc0ab..303be6cd32b 100644 --- a/addons/portal/security/portal_security.xml +++ b/addons/portal/security/portal_security.xml @@ -6,7 +6,7 @@ <field name="name">res_partner: read access on my partner</field> <field name="model_id" ref="base.model_res_partner"/> <field name="domain_force">[('id', 'child_of', user.commercial_partner_id.id)]</field> - <field name="groups" eval="[(4, ref('group_portal')), (4, ref('group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('group_portal')), (4, ref('base.group_public'))]"/> <field name="perm_create" eval="False"/> <field name="perm_unlink" eval="False"/> <field name="perm_write" eval="False"/> diff --git a/addons/portal_anonymous/__init__.py b/addons/portal_anonymous/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 --- a/addons/portal_anonymous/__init__.py +++ /dev/null diff --git a/addons/portal_anonymous/__openerp__.py b/addons/portal_anonymous/__openerp__.py deleted file mode 100644 index 5fe25614c40..00000000000 --- a/addons/portal_anonymous/__openerp__.py +++ /dev/null @@ -1,19 +0,0 @@ -{ - 'name': 'Anonymous portal', - 'description': """ -Allow anonymous to Access Portal. -================================= - """, - 'author': 'OpenERP SA', - 'version': '1.0', - 'category': 'Hidden', - 'website': 'http://www.openerp.com', - 'installable': True, - 'depends': ['portal', 'web'], - 'data': [ - 'security/ir.model.access.csv', - 'portal_anonymous_data.xml', - ], - 'js': ['static/src/js/portal_anonymous.js'], - 'qweb': ['static/src/xml/portal_anonymous.xml'], -} diff --git a/addons/portal_anonymous/i18n/cs.po b/addons/portal_anonymous/i18n/cs.po deleted file mode 100644 index e93c1e4d390..00000000000 --- a/addons/portal_anonymous/i18n/cs.po +++ /dev/null @@ -1,25 +0,0 @@ -# Czech translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-01 11:28+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Czech <cs@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Přihlásit se" diff --git a/addons/portal_anonymous/i18n/en_AU.po b/addons/portal_anonymous/i18n/en_AU.po deleted file mode 100644 index feb30ee1137..00000000000 --- a/addons/portal_anonymous/i18n/en_AU.po +++ /dev/null @@ -1,25 +0,0 @@ -# English (Australia) translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-06-24 01:47+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: English (Australia) <en_AU@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-06-25 05:14+0000\n" -"X-Generator: Launchpad (build 16677)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Login" diff --git a/addons/portal_anonymous/i18n/es.po b/addons/portal_anonymous/i18n/es.po deleted file mode 100644 index 3a3e60f6b6b..00000000000 --- a/addons/portal_anonymous/i18n/es.po +++ /dev/null @@ -1,25 +0,0 @@ -# Spanish translation for openobject-addons -# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-12-27 11:38+0000\n" -"Last-Translator: Francisco Lercari (Lertech) <franciscolercari@gmail.com>\n" -"Language-Team: Spanish <es@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Inicio de sesión" diff --git a/addons/portal_anonymous/i18n/fr.po b/addons/portal_anonymous/i18n/fr.po deleted file mode 100644 index e06a6c6613a..00000000000 --- a/addons/portal_anonymous/i18n/fr.po +++ /dev/null @@ -1,25 +0,0 @@ -# French translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-03 17:05+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: French <fr@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Identifiant" diff --git a/addons/portal_anonymous/i18n/hu.po b/addons/portal_anonymous/i18n/hu.po deleted file mode 100644 index 12294df18a2..00000000000 --- a/addons/portal_anonymous/i18n/hu.po +++ /dev/null @@ -1,25 +0,0 @@ -# Hungarian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-02-01 10:21+0000\n" -"Last-Translator: krnkris <Unknown>\n" -"Language-Team: Hungarian <hu@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Bejelentkezés" diff --git a/addons/portal_anonymous/i18n/lt.po b/addons/portal_anonymous/i18n/lt.po deleted file mode 100644 index 60643c7f356..00000000000 --- a/addons/portal_anonymous/i18n/lt.po +++ /dev/null @@ -1,25 +0,0 @@ -# Lithuanian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-04-24 18:34+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Lithuanian <lt@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-04-25 05:20+0000\n" -"X-Generator: Launchpad (build 16580)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Prisijungti" diff --git a/addons/portal_anonymous/i18n/mk.po b/addons/portal_anonymous/i18n/mk.po deleted file mode 100644 index 5b0d6529853..00000000000 --- a/addons/portal_anonymous/i18n/mk.po +++ /dev/null @@ -1,25 +0,0 @@ -# Macedonian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-03-01 17:16+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Macedonian <mk@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Најавување" diff --git a/addons/portal_anonymous/i18n/mn.po b/addons/portal_anonymous/i18n/mn.po deleted file mode 100644 index b00ac930a99..00000000000 --- a/addons/portal_anonymous/i18n/mn.po +++ /dev/null @@ -1,25 +0,0 @@ -# Mongolian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-02-06 09:18+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Mongolian <mn@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Нэвтрэх" diff --git a/addons/portal_anonymous/i18n/nl.po b/addons/portal_anonymous/i18n/nl.po deleted file mode 100644 index 035833b737f..00000000000 --- a/addons/portal_anonymous/i18n/nl.po +++ /dev/null @@ -1,25 +0,0 @@ -# Dutch translation for openobject-addons -# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-12-27 09:13+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Dutch <nl@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Login" diff --git a/addons/portal_anonymous/i18n/portal_anonymous.pot b/addons/portal_anonymous/i18n/portal_anonymous.pot deleted file mode 100644 index ee07a910113..00000000000 --- a/addons/portal_anonymous/i18n/portal_anonymous.pot +++ /dev/null @@ -1,24 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * portal_anonymous -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0alpha\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-12-21 17:05+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "" - diff --git a/addons/portal_anonymous/i18n/pt.po b/addons/portal_anonymous/i18n/pt.po deleted file mode 100644 index fe26e3c54af..00000000000 --- a/addons/portal_anonymous/i18n/pt.po +++ /dev/null @@ -1,25 +0,0 @@ -# Portuguese translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-21 15:25+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Portuguese <pt@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Nome de utilizador" diff --git a/addons/portal_anonymous/i18n/pt_BR.po b/addons/portal_anonymous/i18n/pt_BR.po deleted file mode 100644 index d4f18907f95..00000000000 --- a/addons/portal_anonymous/i18n/pt_BR.po +++ /dev/null @@ -1,25 +0,0 @@ -# Brazilian Portuguese translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-02 11:56+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Autenticação" diff --git a/addons/portal_anonymous/i18n/ro.po b/addons/portal_anonymous/i18n/ro.po deleted file mode 100644 index 6dc0b91bd52..00000000000 --- a/addons/portal_anonymous/i18n/ro.po +++ /dev/null @@ -1,25 +0,0 @@ -# Romanian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-09 14:58+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Romanian <ro@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Autentificare" diff --git a/addons/portal_anonymous/i18n/ru.po b/addons/portal_anonymous/i18n/ru.po deleted file mode 100644 index 5ae80dfe490..00000000000 --- a/addons/portal_anonymous/i18n/ru.po +++ /dev/null @@ -1,25 +0,0 @@ -# Russian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-04-09 13:04+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Russian <ru@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-04-10 05:21+0000\n" -"X-Generator: Launchpad (build 16550)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Вход" diff --git a/addons/portal_anonymous/i18n/sl.po b/addons/portal_anonymous/i18n/sl.po deleted file mode 100644 index bf3386cfeee..00000000000 --- a/addons/portal_anonymous/i18n/sl.po +++ /dev/null @@ -1,25 +0,0 @@ -# Slovenian translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-30 20:31+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Slovenian <sl@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Prijava" diff --git a/addons/portal_anonymous/i18n/sv.po b/addons/portal_anonymous/i18n/sv.po deleted file mode 100644 index 93e16897ba6..00000000000 --- a/addons/portal_anonymous/i18n/sv.po +++ /dev/null @@ -1,25 +0,0 @@ -# Swedish translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-01-26 14:05+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Swedish <sv@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Logga in" diff --git a/addons/portal_anonymous/i18n/th.po b/addons/portal_anonymous/i18n/th.po deleted file mode 100644 index 80e81054b23..00000000000 --- a/addons/portal_anonymous/i18n/th.po +++ /dev/null @@ -1,25 +0,0 @@ -# Thai translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-06-20 14:03+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Thai <th@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-06-21 05:36+0000\n" -"X-Generator: Launchpad (build 16677)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "เข้าระบบ" diff --git a/addons/portal_anonymous/i18n/tr.po b/addons/portal_anonymous/i18n/tr.po deleted file mode 100644 index d5770b9886a..00000000000 --- a/addons/portal_anonymous/i18n/tr.po +++ /dev/null @@ -1,25 +0,0 @@ -# Turkish translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-02-06 22:17+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Turkish <tr@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-03-16 05:53+0000\n" -"X-Generator: Launchpad (build 16532)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "Kullanıcı Adı:" diff --git a/addons/portal_anonymous/i18n/zh_CN.po b/addons/portal_anonymous/i18n/zh_CN.po deleted file mode 100644 index 53ca3f03a6a..00000000000 --- a/addons/portal_anonymous/i18n/zh_CN.po +++ /dev/null @@ -1,25 +0,0 @@ -# Chinese (Simplified) translation for openobject-addons -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" -"POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2013-07-03 15:17+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-07-04 05:12+0000\n" -"X-Generator: Launchpad (build 16692)\n" - -#. module: portal_anonymous -#. openerp-web -#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 -#, python-format -msgid "Login" -msgstr "用户名" diff --git a/addons/portal_anonymous/security/ir.model.access.csv b/addons/portal_anonymous/security/ir.model.access.csv deleted file mode 100644 index a26b600288d..00000000000 --- a/addons/portal_anonymous/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_mail_message_portal,mail.message.portal,mail.model_mail_message,portal.group_anonymous,1,0,0,0 -access_res_partner,res.partner,base.model_res_partner,portal.group_anonymous,1,0,0,0 diff --git a/addons/portal_anonymous/static/src/js/portal_anonymous.js b/addons/portal_anonymous/static/src/js/portal_anonymous.js deleted file mode 100644 index d4f6351efc9..00000000000 --- a/addons/portal_anonymous/static/src/js/portal_anonymous.js +++ /dev/null @@ -1,100 +0,0 @@ -openerp.portal_anonymous = function(instance) { - - instance.web.Session.include({ - load_translations: function() { - var self = this; - // browser_lang can contain 'xx' or 'xx_XX' - // we use the 'xx' to find matching languages installed in the DB - var browser_lang = (navigator.language || navigator.userLanguage).replace('-', '_'); - // By default for anonymous session.user_context.lang === 'en_US', - // so do nothing if browser_lang is contained in 'en_US' (like 'en' or 'en_US') - if (this.username === 'anonymous' && this.user_context.lang.indexOf(browser_lang) === -1) { - return (new instance.web.Model('res.lang')).query(['code', 'iso_code']) - .filter([['code', 'like', browser_lang.substring(0, 2).toLowerCase()]]).all() - .then(function(langs) { - // If langs is empty (OpenERP doesn't support the language), - // then don't change session.user_context.lang - if (langs.length > 0) { - // Try to get the right user preference in the browser, else - // get the shortest language returned ('xx' country code) or - // just the first one - var l = _.filter(langs, function(lang) { return lang.code === browser_lang || lang.iso_code === browser_lang; }); - if (!_.isEmpty(l)) { - self.user_context.lang = l[0].code; - } else { - l = _.filter(langs, function(lang) { - return lang.iso_code === _.pluck(langs, 'iso_code') - .sort(function(a, b) { - return a.length - b.length; - })[0]; - }); - self.user_context.lang = l[0].code; - } - } - return self.rpc('/web/webclient/translations', { mods: self.module_list, lang: self.user_context.lang }).done(function(trans) { - instance.web._t.database.set_bundle(trans); - }); - }); - } - return this._super(); - }, - }); - - instance.web.Login.include({ - start: function() { - var self = this; - var anonymous_mode = (!self.session.session_is_valid() && !(self.params.token || self.params.login)); - if (anonymous_mode) { - self.$el.hide(); - } - return $.when(this._super()).then(function() { - if (anonymous_mode) { - self.remember_credentials = false; - // XXX get login/pass from server (via a rpc call) ? - return self.do_login(self.selected_db, 'anonymous', 'anonymous'); - } - }); - }, - }); - - instance.web.UserMenu.include({ - init: function(parent) { - this._super(parent); - if (this.session.username == 'anonymous') { - this.template = 'UserMenu.portal_anonymous'; - this.do_update = function() {}; // avoid change of avatar - } - }, - start: function() { - var self = this; - this._super.apply(this, arguments); - this.$el.find('a.login').click(function() { - var p = self.getParent(); - var am = p.action_manager; - p.$el.find('.oe_leftbar, .oe_topbar').hide(); - self.session.session_logout().done(function () { - am.do_action({ - type:'ir.actions.client', - tag:'login', - target: 'current', - params: { - login_successful: function() { - am.do_action("reload"); - } - } - }); - }); - }); - } - }); - - instance.web.WebClient.include({ - check_timezone: function() { - if (this.session.username !== 'anonymous') { - return this._super.apply(this, arguments); - } - return false; - }, - }); - -}; diff --git a/addons/portal_anonymous/static/src/xml/portal_anonymous.xml b/addons/portal_anonymous/static/src/xml/portal_anonymous.xml deleted file mode 100644 index b4c5b7d7471..00000000000 --- a/addons/portal_anonymous/static/src/xml/portal_anonymous.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- vim:fdl=1: ---> -<templates id="template" xml:space="preserve"> - -<t t-name="UserMenu.portal_anonymous"> - <div class="oe_user_menu oe_topbar_anonymous_login"> - <a href="#" class="login"> - Login - </a> - </div> -</t> - -</templates> diff --git a/addons/portal_crm/contact.py b/addons/portal_crm/contact.py index a49d53361a0..9260e17a5b1 100644 --- a/addons/portal_crm/contact.py +++ b/addons/portal_crm/contact.py @@ -42,15 +42,15 @@ class crm_contact_us(osv.TransientModel): def _get_user_name(self, cr, uid, context=None): """ - If the user is logged in (i.e. not anonymous), get the user's name to + If the user is logged in (i.e. not public), get the user's name to pre-fill the partner_name field. Same goes for the other _get_user_attr methods. - @return current user's name if the user isn't "anonymous", None otherwise + @return current user's name if the user isn't "public", None otherwise """ user = self.pool.get('res.users').read(cr, uid, uid, ['login'], context) - if (user['login'] != 'anonymous'): + if (user['login'] != 'public'): return self.pool.get('res.users').name_get(cr, uid, uid, context)[0][1] else: return None @@ -58,7 +58,7 @@ class crm_contact_us(osv.TransientModel): def _get_user_email(self, cr, uid, context=None): user = self.pool.get('res.users').read(cr, uid, uid, ['login', 'email'], context) - if (user['login'] != 'anonymous' and user['email']): + if (user['login'] != 'public' and user['email']): return user['email'] else: return None @@ -66,7 +66,7 @@ class crm_contact_us(osv.TransientModel): def _get_user_phone(self, cr, uid, context=None): user = self.pool.get('res.users').read(cr, uid, uid, ['login', 'phone'], context) - if (user['login'] != 'anonymous' and user['phone']): + if (user['login'] != 'public' and user['phone']): return user['phone'] else: return None diff --git a/addons/portal_event/security/ir.model.access.csv b/addons/portal_event/security/ir.model.access.csv index 2de4a73ad92..f09ba8f6454 100644 --- a/addons/portal_event/security/ir.model.access.csv +++ b/addons/portal_event/security/ir.model.access.csv @@ -1,5 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_event,event,event.model_event_event,portal.group_portal,1,0,0,0
access_registration,registration,event.model_event_registration,portal.group_portal,1,1,1,1
-access_event,event,event.model_event_event,portal.group_anonymous,1,0,0,0
-access_registration,registration,event.model_event_registration,portal.group_anonymous,1,1,1,1
+access_event,event,event.model_event_event,base.group_public,1,0,0,0
+access_registration,registration,event.model_event_registration,base.group_public,1,1,1,1
diff --git a/addons/portal_event/security/portal_security.xml b/addons/portal_event/security/portal_security.xml index 6177ae5944e..df0c1c5ef07 100644 --- a/addons/portal_event/security/portal_security.xml +++ b/addons/portal_event/security/portal_security.xml @@ -2,22 +2,22 @@ <openerp> <data noupdate="1"> - <record model="ir.rule" id="event_event_portal_anonymous_rule"> - <field name="name">Event: portal and anonymous users: public only</field> + <record model="ir.rule" id="event_event_website_rule"> + <field name="name">Event: portal and public users: public only</field> <field name="model_id" ref="event.model_event_event"/> <field name="domain_force">['|', ('visibility', '=', 'public'), ('message_follower_ids', 'in', [user.partner_id.id]) ] </field> - <field name="groups" eval="[(4, ref('portal.group_portal')), (4, ref('portal.group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('portal.group_portal')), (4, ref('base.group_public'))]"/> </record> - <record model="ir.rule" id="event_registration_portal_anonymous_rule"> - <field name="name">Event/Registration: portal and anonymous users: personal only</field> + <record model="ir.rule" id="event_registration_website_rule"> + <field name="name">Event/Registration: portal and public users: personal only</field> <field name="model_id" ref="event.model_event_registration"/> <field name="domain_force">[('user_id', '=', user.id)]</field> - <field name="groups" eval="[(4, ref('portal.group_portal')), (4, ref('portal.group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('portal.group_portal')), (4, ref('base.group_public'))]"/> </record> </data> diff --git a/addons/portal_hr_employees/hr_employee.py b/addons/portal_hr_employees/hr_employee.py index 52d01170a2a..a04053eec98 100644 --- a/addons/portal_hr_employees/hr_employee.py +++ b/addons/portal_hr_employees/hr_employee.py @@ -45,7 +45,7 @@ class hr_employee(osv.osv): """ ``visibility``: defines if the employee appears on the portal's contact page - - 'public' means the employee will appear for everyone (anonymous) + - 'public' means the employee will appear for everyone (public) - 'private' means the employee won't appear """ _columns = { diff --git a/addons/portal_hr_employees/security/ir.model.access.csv b/addons/portal_hr_employees/security/ir.model.access.csv index f8a1eb74c35..7f7daf7ed0b 100644 --- a/addons/portal_hr_employees/security/ir.model.access.csv +++ b/addons/portal_hr_employees/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_hr_employee_portal,hr.employee user,hr.model_hr_employee,portal.group_portal,1,0,0,0 -access_hr_employee_anonymous,hr.employee user,hr.model_hr_employee,portal.group_anonymous,1,0,0,0 +access_hr_employee_public,hr.employee user,hr.model_hr_employee,base.group_public,1,0,0,0 diff --git a/addons/portal_project/security/ir.model.access.csv b/addons/portal_project/security/ir.model.access.csv index a999f5555d9..020671e3ce6 100644 --- a/addons/portal_project/security/ir.model.access.csv +++ b/addons/portal_project/security/ir.model.access.csv @@ -5,9 +5,9 @@ access_task_type,task_type,project.model_project_task_type,portal.group_portal,1 access_task_work,task_work,project.model_project_task_work,portal.group_portal,1,0,0,0 access_project_category,project_category,project.model_project_category,portal.group_portal,1,0,0,0 access_account_analytic_account,account_analytic_account,analytic.model_account_analytic_account,portal.group_portal,1,0,0,0 -access_project_anonymous,project,project.model_project_project,portal.group_anonymous,1,0,0,0 -access_task_anonymous,task,project.model_project_task,portal.group_anonymous,1,0,0,0 -access_task_type_anonymous,task_type,project.model_project_task_type,portal.group_anonymous,1,0,0,0 -access_task_work_anonymous,task_work,project.model_project_task_work,portal.group_anonymous,1,0,0,0 -access_project_category_anonymous,project_category,project.model_project_category,portal.group_anonymous,1,0,0,0 -access_account_analytic_account_anonymous,account_analytic_account,analytic.model_account_analytic_account,portal.group_anonymous,1,0,0,0
\ No newline at end of file +access_project_public,project,project.model_project_project,base.group_public,1,0,0,0 +access_task_public,task,project.model_project_task,base.group_public,1,0,0,0 +access_task_type_public,task_type,project.model_project_task_type,base.group_public,1,0,0,0 +access_task_work_public,task_work,project.model_project_task_work,base.group_public,1,0,0,0 +access_project_category_public,project_category,project.model_project_category,base.group_public,1,0,0,0 +access_account_analytic_account_public,account_analytic_account,analytic.model_account_analytic_account,base.group_public,1,0,0,0
\ No newline at end of file diff --git a/addons/portal_project/security/portal_security.xml b/addons/portal_project/security/portal_security.xml index 67e57766ebd..fa48a57fe8e 100644 --- a/addons/portal_project/security/portal_security.xml +++ b/addons/portal_project/security/portal_security.xml @@ -25,11 +25,11 @@ <field name="groups" eval="[(4, ref('portal.group_portal'))]"/> </record> - <record model="ir.rule" id="project_anonymous_rule"> - <field name="name">Project: anonymous users: public only</field> + <record model="ir.rule" id="project_public_rule"> + <field name="name">Project: public users: public only</field> <field name="model_id" ref="project.model_project_project"/> <field name="domain_force">[('privacy_visibility', '=', 'public')]</field> - <field name="groups" eval="[(4, ref('portal.group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('base.group_public'))]"/> </record> <record model="ir.rule" id="project.task_visibility_rule"> @@ -57,11 +57,11 @@ <field name="groups" eval="[(4, ref('portal.group_portal'))]"/> </record> - <record model="ir.rule" id="task_anonymous_rule"> - <field name="name">Project/Task: anonymous users: public only</field> + <record model="ir.rule" id="task_public_rule"> + <field name="name">Project/Task: public users: public only</field> <field name="model_id" ref="project.model_project_task"/> <field name="domain_force">[('project_id.privacy_visibility', '=', 'public')]</field> - <field name="groups" eval="[(4, ref('portal.group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('base.group_public'))]"/> </record> </data> diff --git a/addons/portal_project/tests/test_access_rights.py b/addons/portal_project/tests/test_access_rights.py index a7d56cb3895..7dd20703abb 100644 --- a/addons/portal_project/tests/test_access_rights.py +++ b/addons/portal_project/tests/test_access_rights.py @@ -52,9 +52,9 @@ class TestPortalProject(common.TransactionCase): group_portal_ref = self.registry('ir.model.data').get_object_reference(cr, uid, 'portal', 'group_portal') self.group_portal_id = group_portal_ref and group_portal_ref[1] or False - # Find Anonymous group - group_anonymous_ref = self.registry('ir.model.data').get_object_reference(cr, uid, 'portal', 'group_anonymous') - self.group_anonymous_id = group_anonymous_ref and group_anonymous_ref[1] or False + # Find Public group + group_public_ref = self.registry('ir.model.data').get_object_reference(cr, uid, 'base', 'group_public') + self.group_public_id = group_public_ref and group_public_ref[1] or False # Test users to use through the various tests self.user_alfred_id = self.res_users.create(cr, uid, { @@ -76,10 +76,10 @@ class TestPortalProject(common.TransactionCase): 'groups_id': [(6, 0, [self.group_portal_id])] }) self.user_donovan_id = self.res_users.create(cr, uid, { - 'name': 'Donovan Anonymous', + 'name': 'Donovan Public', 'login': 'donovan', 'alias_name': 'donovan', - 'groups_id': [(6, 0, [self.group_anonymous_id])] + 'groups_id': [(6, 0, [self.group_public_id])] }) self.user_ernest_id = self.res_users.create(cr, uid, { 'name': 'Ernest Manager', @@ -158,12 +158,12 @@ class TestPortalProject(common.TransactionCase): self.assertRaises(except_orm, self.project_task.write, cr, self.user_chell_id, task_ids, {'description': 'TestDescription'}) - # Do: Donovan reads project -> ok (anonymous ok public) + # Do: Donovan reads project -> ok (public ok public) self.project_project.read(cr, self.user_donovan_id, pigs_id, ['name']) # Test: all project tasks visible task_ids = self.project_task.search(cr, self.user_donovan_id, [('project_id', '=', pigs_id)]) self.assertEqual(set(task_ids), test_task_ids, - 'access rights: anonymous user cannot see all tasks of a public project') + 'access rights: public user cannot see all tasks of a public project') # Test: all project tasks readable self.project_task.read(cr, self.user_donovan_id, task_ids, ['name']) # Test: no project task writable @@ -200,12 +200,12 @@ class TestPortalProject(common.TransactionCase): self.assertEqual(set(task_ids), test_task_ids, 'access rights: portal user should see the followed tasks of a portal project') - # Do: Donovan reads project -> ko (anonymous ko portal) + # Do: Donovan reads project -> ko (public ko portal) self.assertRaises(except_orm, self.project_project.read, cr, self.user_donovan_id, pigs_id, ['name']) # Test: no project task visible task_ids = self.project_task.search(cr, self.user_donovan_id, [('project_id', '=', pigs_id)]) - self.assertFalse(task_ids, 'access rights: anonymous user should not see tasks of a portal project') + self.assertFalse(task_ids, 'access rights: public user should not see tasks of a portal project') # Data: task follower cleaning self.project_task.message_unsubscribe_users(cr, self.user_alfred_id, [self.task_1_id, self.task_3_id], [self.user_chell_id]) @@ -234,12 +234,12 @@ class TestPortalProject(common.TransactionCase): task_ids = self.project_task.search(cr, self.user_chell_id, [('project_id', '=', pigs_id)]) self.assertFalse(task_ids, 'access rights: portal user should not see tasks of an employees project, even if assigned') - # Do: Donovan reads project -> ko (anonymous ko employee) + # Do: Donovan reads project -> ko (public ko employee) self.assertRaises(except_orm, self.project_project.read, cr, self.user_donovan_id, pigs_id, ['name']) # Test: no project task visible task_ids = self.project_task.search(cr, self.user_donovan_id, [('project_id', '=', pigs_id)]) - self.assertFalse(task_ids, 'access rights: anonymous user should not see tasks of an employees project') + self.assertFalse(task_ids, 'access rights: public user should not see tasks of an employees project') # ---------------------------------------- # CASE4: followers project @@ -268,12 +268,12 @@ class TestPortalProject(common.TransactionCase): self.assertEqual(set(task_ids), test_task_ids, 'access rights: portal user should not see tasks of a not-followed followers project, only assigned') - # Do: Donovan reads project -> ko (anonymous ko employee) + # Do: Donovan reads project -> ko (public ko employee) self.assertRaises(except_orm, self.project_project.read, cr, self.user_donovan_id, pigs_id, ['name']) # Test: no project task visible task_ids = self.project_task.search(cr, self.user_donovan_id, [('project_id', '=', pigs_id)]) - self.assertFalse(task_ids, 'access rights: anonymous user should not see tasks of a followers project') + self.assertFalse(task_ids, 'access rights: public user should not see tasks of a followers project') # Data: subscribe Alfred, Chell and Donovan as follower self.project_project.message_subscribe_users(cr, uid, [pigs_id], [self.user_alfred_id, self.user_chell_id, self.user_donovan_id]) @@ -295,6 +295,6 @@ class TestPortalProject(common.TransactionCase): self.assertEqual(set(task_ids), test_task_ids, 'access rights: employee user should not see followed + assigned tasks of a follower project') - # Do: Donovan reads project -> ko (anonymous ko follower even if follower) + # Do: Donovan reads project -> ko (public ko follower even if follower) self.assertRaises(except_orm, self.project_project.read, cr, self.user_donovan_id, pigs_id, ['name']) diff --git a/addons/portal_project_issue/security/ir.model.access.csv b/addons/portal_project_issue/security/ir.model.access.csv index 7355f7a9b1d..53f5ad4469d 100644 --- a/addons/portal_project_issue/security/ir.model.access.csv +++ b/addons/portal_project_issue/security/ir.model.access.csv @@ -1,4 +1,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_issues,project_issue,project_issue.model_project_issue,portal.group_portal,1,0,0,0 access_case_section,crm_case_section,crm.model_crm_case_section,portal.group_portal,1,0,0,0 -access_issues_anonymous,project_issue,project_issue.model_project_issue,portal.group_anonymous,1,0,0,0
\ No newline at end of file +access_issues_public,project_issue,project_issue.model_project_issue,base.group_public,1,0,0,0
\ No newline at end of file diff --git a/addons/portal_project_issue/security/portal_security.xml b/addons/portal_project_issue/security/portal_security.xml index 598c1620a82..5e74836faa1 100644 --- a/addons/portal_project_issue/security/portal_security.xml +++ b/addons/portal_project_issue/security/portal_security.xml @@ -27,11 +27,11 @@ ]</field> </record> - <record model="ir.rule" id="issue_anonymous_rule"> - <field name="name">Project/Issue: anonymous users: public only</field> + <record model="ir.rule" id="issue_public_rule"> + <field name="name">Project/Issue: public users: public only</field> <field name="model_id" ref="project_issue.model_project_issue"/> <field name="domain_force">[('project_id.privacy_visibility', '=', 'public')]</field> - <field name="groups" eval="[(4, ref('portal.group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('base.group_public'))]"/> </record> </data> diff --git a/addons/portal_project_issue/tests/test_access_rights.py b/addons/portal_project_issue/tests/test_access_rights.py index 28d337a4965..dc4a7a6b840 100644 --- a/addons/portal_project_issue/tests/test_access_rights.py +++ b/addons/portal_project_issue/tests/test_access_rights.py @@ -95,7 +95,7 @@ class TestPortalIssueProject(TestPortalProject): self.assertRaises(except_orm, self.project_issue.write, cr, self.user_chell_id, issue_ids, {'description': 'TestDescription'}) - # Do: Donovan reads project -> ok (anonymous ok public) + # Do: Donovan reads project -> ok (public ok public) # Test: all project issues visible issue_ids = self.project_issue.search(cr, self.user_donovan_id, [('project_id', '=', pigs_id)]) self.assertEqual(set(issue_ids), test_issue_ids, diff --git a/addons/portal_project_long_term/security/ir.model.access.csv b/addons/portal_project_long_term/security/ir.model.access.csv index efbc4fc2418..48cc7a95549 100644 --- a/addons/portal_project_long_term/security/ir.model.access.csv +++ b/addons/portal_project_long_term/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_issues,project_phase,project_long_term.model_project_phase,portal.group_portal,1,0,0,0 -access_issues_anonymous,project_phase_anonymous,project_long_term.model_project_phase,portal.group_anonymous,1,0,0,0 +access_issues_public,project_phase_public,project_long_term.model_project_phase,base.group_public,1,0,0,0 diff --git a/addons/portal_project_long_term/security/portal_security.xml b/addons/portal_project_long_term/security/portal_security.xml index d8aec542847..2407efc7e12 100644 --- a/addons/portal_project_long_term/security/portal_security.xml +++ b/addons/portal_project_long_term/security/portal_security.xml @@ -9,11 +9,11 @@ <field name="groups" eval="[(4, ref('portal.group_portal'))]"/> </record> - <record model="ir.rule" id="project_phase_anonymous_rule"> - <field name="name">Project/Phase: anonymous users: public only</field> + <record model="ir.rule" id="project_phase_public_rule"> + <field name="name">Project/Phase: public users: public only</field> <field name="model_id" ref="project_long_term.model_project_phase"/> <field name="domain_force">[('project_id.privacy_visibility', '=', 'public')]</field> - <field name="groups" eval="[(4, ref('portal.group_anonymous'))]"/> + <field name="groups" eval="[(4, ref('base.group_public'))]"/> </record> </data> diff --git a/addons/website/res_config.py b/addons/website/res_config.py new file mode 100644 index 00000000000..e0d78a6dfb6 --- /dev/null +++ b/addons/website/res_config.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + +from openerp.osv import fields, osv + + +class website_config_settings(osv.osv_memory): + _name = 'website.config.settings' + _inherit = 'res.config.settings' + _columns = { + } diff --git a/addons/website/views/res_config.xml b/addons/website/views/res_config.xml new file mode 100644 index 00000000000..854237a17a2 --- /dev/null +++ b/addons/website/views/res_config.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <record id="view_website_config_settings" model="ir.ui.view"> + <field name="name">website settings</field> + <field name="model">website.config.settings</field> + <field name="arch" type="xml"> + <form string="Website" version="7.0" class="oe_form_configuration"> + <header> + <button string="Apply" type="object" name="execute" class="oe_highlight"/> + or + <button string="Cancel" type="object" name="cancel" class="oe_link"/> + </header> + </form> + </field> + </record> + + <record id="action_website_config" model="ir.actions.act_window"> + <field name="name">Configure Website</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">website.config.settings</field> + <field name="view_mode">form</field> + <field name="target">inline</field> + </record> + + <menuitem id="menu_website_config" name="Website" parent="base.menu_config" + sequence="15" action="action_website_config"/> + + </data> +</openerp> diff --git a/addons/portal_anonymous/portal_anonymous_data.xml b/addons/website/website_data.xml index eb1fd3889b4..29c8be80b34 100644 --- a/addons/portal_anonymous/portal_anonymous_data.xml +++ b/addons/website/website_data.xml @@ -2,18 +2,18 @@ <openerp> <data noupdate="1"> - <record id="anonymous_user" model="res.users"> - <field name="name">Anonymous</field> - <field name="login">anonymous</field> - <field name="password">anonymous</field> + <record id="public_user" model="res.users"> + <field name="name">public</field> + <field name="login">public</field> + <field name="password">public</field> <!-- Avoid auto-including this demo user in any default group --> <field name="groups_id" eval="[(5,)]"/> <field name="image">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</field> <field name="share" eval="True"/> </record> - <record id="portal.group_anonymous" model="res.groups"> - <field name="users" eval="[(4, ref('anonymous_user'))]"/> + <record id="portal.group_public" model="res.groups"> + <field name="users" eval="[(4, ref('public_user'))]"/> </record> </data> diff --git a/addons/website_mail/res_config.py b/addons/website_mail/res_config.py new file mode 100644 index 00000000000..1b6e02e691d --- /dev/null +++ b/addons/website_mail/res_config.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from openerp.osv import fields, osv + + +class website_config_settings(osv.osv_memory): + _inherit = 'website.config.settings' + _columns = { + 'group_website_mail_reply': fields.boolean('Visitors can reply on blogs', + implied_group='website_mail.group_website_mail_reply'), + } diff --git a/addons/website_mail/security/website_mail_security.xml b/addons/website_mail/security/website_mail_security.xml new file mode 100644 index 00000000000..5dcd7a0cb62 --- /dev/null +++ b/addons/website_mail/security/website_mail_security.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> +<data> + <record id="group_website_mail_reply" model="res.groups"> + <field name="name">Visitors can reply on blogs</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> +</data> +</openerp> diff --git a/addons/website_mail/static/src/css/Makefile b/addons/website_mail/static/src/css/Makefile new file mode 100644 index 00000000000..5042d6d8f54 --- /dev/null +++ b/addons/website_mail/static/src/css/Makefile @@ -0,0 +1,2 @@ +sass: + sass --compass --trace -t expanded blog.sass blog.css diff --git a/addons/website_mail/static/src/css/blog.css b/addons/website_mail/static/src/css/blog.css new file mode 100644 index 00000000000..1b0891adc2d --- /dev/null +++ b/addons/website_mail/static/src/css/blog.css @@ -0,0 +1,23 @@ +.css_website_mail .media { + position: relative; +} +.css_website_mail .media .css_button_publish { + position: absolute; + right: 5px; + top: 5px; +} +.css_website_mail .media .css_button_publish .css_publish { + color: green; + display: none; + background: none; +} +.css_website_mail .media .css_button_publish .css_unpublish { + color: red; + background: none; +} +.css_website_mail .media .css_published .css_publish { + display: block; +} +.css_website_mail .media .css_published .css_unpublish { + display: none; +} diff --git a/addons/website_mail/static/src/css/blog.sass b/addons/website_mail/static/src/css/blog.sass new file mode 100644 index 00000000000..34385b02e57 --- /dev/null +++ b/addons/website_mail/static/src/css/blog.sass @@ -0,0 +1,21 @@ +@import "compass/css3" + +.css_website_mail + .media + position: relative + .css_button_publish + position: absolute + right: 5px + top: 5px + .css_publish + color: green + display: none + background: none + .css_unpublish + color: red + background: none + .css_published + .css_publish + display: block + .css_unpublish + display: none
\ No newline at end of file diff --git a/addons/website_mail/static/src/js/blog.js b/addons/website_mail/static/src/js/blog.js new file mode 100644 index 00000000000..e5656981a8a --- /dev/null +++ b/addons/website_mail/static/src/js/blog.js @@ -0,0 +1,26 @@ +$(document).ready(function () { + $('.js_website_mail').on('click', '.js_publish', function (e) { + var $link = $(e.currentTarget); + var $media = $link.parent(); + $media.toggleClass('css_published'); + $.post('/blog/publish/', {'message_id': $link.data('id')}, function (result) { + if (+result) $media.addClass('css_published'); + else $media.removeClass('css_published'); + }); + return false; + }); + + $form = $('.js_website_mail form#post'); + $form.submit(function (e) { + var check = true; + $form.find(".control-group").removeClass("error"); + $form.find("textarea,input").each(function() { + if ($(this).val().length < 3) { + $(this).parents(".control-group:first").addClass("error"); + check = false; + } + }); + if (!check) return false; + $form.css("visibility", "hidden"); + }); +});
\ No newline at end of file diff --git a/addons/website_mail/views/res_config.xml b/addons/website_mail/views/res_config.xml new file mode 100644 index 00000000000..f4525c3411f --- /dev/null +++ b/addons/website_mail/views/res_config.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <record id="view_website_mail_config_settings" model="ir.ui.view"> + <field name="name">website_mail settings</field> + <field name="model">website.config.settings</field> + <field name="inherit_id" ref="website.view_website_config_settings"/> + <field name="arch" type="xml"> + <form position="inside"> + <separator string="Blog"/> + <group> + <field name="group_website_mail_reply"/> + </group> + </form> + </field> + </record> + </data> +</openerp> |
