[MERGE] trunk
bzr revid: sle@openerp.com-20140324164409-452kibtg3l7rd0nj
This commit is contained in:
commit
6889165eb1
|
@ -30,10 +30,3 @@ class portal(osv.osv):
|
|||
_columns = {
|
||||
'is_portal': fields.boolean('Portal', help="If checked, this group is usable as a portal."),
|
||||
}
|
||||
|
||||
class res_users(osv.Model):
|
||||
_inherit = 'res.users'
|
||||
def _signup_create_user(self, cr, uid, values, context=None):
|
||||
values['share'] = True
|
||||
return super(res_users, self)._signup_create_user(cr, uid, values, context=context)
|
||||
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
<record id="base.group_portal" model="res.groups">
|
||||
<field name="is_portal" eval="True"/>
|
||||
</record>
|
||||
<record id="auth_signup.default_template_user" model="res.users">
|
||||
<field name="share" eval="True"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
Mr Demo Portal</field>
|
||||
<!-- Avoid auto-including this user in any default group -->
|
||||
<field name="groups_id" eval="[(5,)]"/>
|
||||
<field name="share" eval="True" />
|
||||
</record>
|
||||
|
||||
<!-- Add the demo user to the portal (and therefore to the portal member group) -->
|
||||
|
|
|
@ -209,7 +209,6 @@ class wizard_user(osv.osv_memory):
|
|||
'login': extract_email(wizard_user.email),
|
||||
'partner_id': wizard_user.partner_id.id,
|
||||
'groups_id': [(6, 0, [])],
|
||||
'share': True,
|
||||
}
|
||||
user_id = res_users.create(cr, uid, values, context=create_context)
|
||||
return res_users.browse(cr, uid, user_id, context)
|
||||
|
|
|
@ -38,9 +38,25 @@ class res_groups(osv.osv):
|
|||
class res_users(osv.osv):
|
||||
_name = 'res.users'
|
||||
_inherit = 'res.users'
|
||||
|
||||
def _is_share(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for user in self.browse(cr, uid, ids, context=context):
|
||||
res[user.id] = not self.has_group(cr, user.id, 'base.group_user')
|
||||
return res
|
||||
|
||||
def _get_users_from_group(self, cr, uid, ids, context=None):
|
||||
result = set()
|
||||
for group in self.pool['res.groups'].browse(cr, uid, ids, context=context):
|
||||
result.update(user.id for user in group.users)
|
||||
return list(result)
|
||||
|
||||
_columns = {
|
||||
'share': fields.boolean('Share User', readonly=True,
|
||||
help="External user with limited access, created only for the purpose of sharing data.")
|
||||
'share': fields.function(_is_share, string='Share User', type='boolean',
|
||||
store={
|
||||
'res.users': (lambda self, cr, uid, ids, c={}: ids, None, 50),
|
||||
'res.groups': (_get_users_from_group, None, 50),
|
||||
}, help="External user with limited access, created only for the purpose of sharing data."),
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<data noupdate="1">
|
||||
<record id="base.public_user" model="res.users">
|
||||
<field eval="[(4, ref('group_share_user'))]" name="groups_id"/>
|
||||
<field name="share" eval="True" />
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -258,7 +258,6 @@ class share_wizard(osv.TransientModel):
|
|||
'name': new_user,
|
||||
'email': new_user,
|
||||
'groups_id': [(6,0,[group_id])],
|
||||
'share': True,
|
||||
'company_id': current_user.company_id.id,
|
||||
'company_ids': [(6, 0, [current_user.company_id.id])],
|
||||
}, context)
|
||||
|
@ -276,7 +275,6 @@ class share_wizard(osv.TransientModel):
|
|||
'password': new_pass,
|
||||
'name': new_login,
|
||||
'groups_id': [(6,0,[group_id])],
|
||||
'share': True,
|
||||
'company_id': current_user.company_id.id,
|
||||
'company_ids': [(6, 0, [current_user.company_id.id])],
|
||||
}, context)
|
||||
|
|
|
@ -957,6 +957,7 @@
|
|||
start : function () {
|
||||
var self = this;
|
||||
this._super();
|
||||
this.$target.carousel({interval: false});
|
||||
this.id = this.$target.attr("id");
|
||||
this.$inner = this.$target.find('.carousel-inner');
|
||||
this.$indicators = this.$target.find('.carousel-indicators');
|
||||
|
@ -1376,7 +1377,6 @@
|
|||
this.grid.size = 8;
|
||||
return this.grid;
|
||||
},
|
||||
this.$target.carousel({interval: false});
|
||||
});
|
||||
|
||||
website.snippet.options.parallax = website.snippet.Option.extend({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Awesome Open Source Blogging Plateform</h2>
|
||||
<h2 class="oe_slogan">Awesome Open Source Blogging Platform</h2>
|
||||
<h3 class="oe_slogan">Write, Design, Promote, Engage</h3>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
|
@ -15,7 +15,7 @@
|
|||
<div class="oe_span6">
|
||||
<p class='oe_mt32'>
|
||||
Express yourself with the OpenERP enterprise grade blogging
|
||||
plateform. Write beautiful blog posts, engage with visitors,
|
||||
platform. Write beautiful blog posts, engage with visitors,
|
||||
translate content and moderate social streams.
|
||||
</p><p>
|
||||
Get your blog posts efficiently referenced in Google and
|
||||
|
|
|
@ -171,6 +171,7 @@ class event_sponsors(osv.osv):
|
|||
'partner_id': fields.many2one('res.partner', 'Sponsor/Customer', required=True),
|
||||
'url': fields.text('Sponsor Website'),
|
||||
'sequence': fields.related('sponsor_type_id', 'sequence', string='Sequence', store=True),
|
||||
'image_medium': fields.related('partner_id', 'image_medium', string='Logo')
|
||||
}
|
||||
|
||||
def has_access_to_partner(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
<h2 class="text-center mb32">Our Sponsors</h2>
|
||||
</section>
|
||||
<div class="row">
|
||||
<div t-attf-class="col-md-#{(len(event.sponsor_ids) > 6) and 2 or (12/ len(event.sponsor_ids))} text-center" t-foreach="event.sponsor_ids" t-as="sponsor">
|
||||
<div t-attf-class="col-md-#{(len(event.sponsor_ids) > 6) and 2 or (12/ len(event.sponsor_ids))} text-center mb16" t-foreach="event.sponsor_ids" t-as="sponsor">
|
||||
<t t-if="sponsor.url">
|
||||
<a t-att-href="sponsor.url" style="position: relative; display: inline-block;">
|
||||
<span t-field="sponsor.partner_id.image"
|
||||
<span t-field="sponsor.image_medium"
|
||||
t-field-options='{"widget": "image", "class": "shadow"}'/>
|
||||
<div class="ribbon-wrapper">
|
||||
<div t-field="sponsor.sponsor_type_id" t-attf-class="ribbon ribbon_#{sponsor.sponsor_type_id.name}"/>
|
||||
|
@ -27,7 +27,7 @@
|
|||
</t>
|
||||
<t t-if="not sponsor.url">
|
||||
<span style="position: relative; display: inline-block;">
|
||||
<span t-field="sponsor.partner_id.image"
|
||||
<span t-field="sponsor.image_medium"
|
||||
t-field-options='{"widget": "image", "class": "shadow"}'/>
|
||||
<div class="ribbon-wrapper">
|
||||
<div t-field="sponsor.sponsor_type_id" t-attf-class="ribbon ribbon_#{sponsor.sponsor_type_id.name}"/>
|
||||
|
|
Loading…
Reference in New Issue