[FIX] Access rights on events for anonymous
[odoo/odoo.git] / addons / portal / portal_data.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data noupdate="0">
4
5         <!-- The portal group -->
6         <record id="group_portal" model="res.groups">
7             <field name="name">Portal</field>
8             <field name="comment">Portal members have specific access rights (such as record rules and restricted menus).
9                 They usually do not belong to the usual OpenERP groups.</field>
10             <field name="is_portal" eval="True"/>
11             <!-- Insert the template user from auth_signup in the portal members group -->
12             <field name="users" eval="[(4,ref('auth_signup.default_template_user'))]"/>
13         </record>
14
15         <!-- Mail group for the company's news -->
16         <record id="company_news_feed" model="mail.group">
17             <field name="name">Company's news</field>
18             <field name="public">public</field>
19         </record>
20
21         <record id="action_news" model="ir.actions.client">
22             <field name="name">News</field>
23             <field name="tag">mail.wall</field>
24             <field name="model">mail.group</field>
25             <field name="params" eval="{
26                 'domain': [
27                     ('model', '=', 'mail.group'),
28                     ('res_id', '=', ref('company_news_feed'))
29                 ],
30                 'context':{
31                     'search_default_message_unread': False,
32                     'default_model': 'mail.group',
33                     'default_res_id': ref('company_news_feed'),
34                 },
35                 'show_link_partner': False,
36                 'res_model': 'mail.message',
37                 'thread_level': 1,
38             }"/>
39             <field name="help" type="html">
40                 <p>
41                     Youd don't have unread company's news.
42                 </p>
43             </field>
44         </record>
45
46         <!-- Mail group for the company's jobs -->
47         <record id="company_jobs" model="mail.group">
48             <field name="name">Company's jobs</field>
49             <field name="public">public</field>
50         </record>
51
52         <record id="action_jobs" model="ir.actions.client">
53             <field name="name">Jobs</field>
54             <field name="tag">mail.wall</field>
55             <field name="res_model">mail.message</field>
56             <field name="res_id" ref="company_jobs"/>
57             <field name="params" eval="{
58                 'domain':[
59                     ('model', '=', 'mail.group'),
60                     ('res_id', '=', ref('company_jobs'))
61                 ],
62                 'context':{
63                     'search_default_message_unread': False,
64                     'default_model': 'mail.group',
65                     'default_res_id': ref('company_jobs'),
66                 },
67                 'show_link_partner': False,
68                 'res_model': 'mail.message',
69                 'thread_level': 1,
70             }"/>
71             <field name="help" type="html">
72                 <p>
73                     Youd don't have unread job offers.
74                 </p>
75             </field>
76         </record>
77
78         <!--
79             A group dedicated to the anonymous user only, making groups
80             restrictions more convenient.
81         -->
82         <record id="group_anonymous" model="res.groups">
83             <field name="name">Anonymous</field>
84             <field name="comment">Anonymous users have specific access rights (such as record rules and restricted menus).
85                 They usually do not belong to the usual OpenERP groups.</field>
86         </record>
87
88         <record id="paypal_acquirer" model="portal.payment.acquirer">
89             <field name="name">Paypal</field>
90             <field name="form_template"><![CDATA[
91 % if object.company_id.paypal_account:
92 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
93   <input type="hidden" name="cmd" value="_xclick"/>
94   <input type="hidden" name="business" value="${object.company_id.paypal_account}"/>
95   <input type="hidden" name="item_name" value="${object.company_id.name} ${kind.title()} ${reference}"/>
96   <input type="hidden" name="amount" value="${amount}"/>
97   <input type="hidden" name="currency_code" value="${currency.name}"/>
98   <input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"/>
99 </form>
100 % endif
101             ]]></field>
102         </record>
103
104     </data>
105 </openerp>