[IMP][REF] website_forum: added the published mixin. A hook on res.users
has also been added, because the action open_website_url linked to the publish button is not defined on res.users model (but on its inherited partner). It now has the method that is routed on its partner.
This commit is contained in:
committed by
Thibault Delavallée
parent
d4d5b1b562
commit
28c79ec7d0
@@ -105,3 +105,8 @@ class Users(models.Model):
|
||||
else:
|
||||
excluded_categories = ['forum']
|
||||
return super(Users, self).get_serialised_gamification_summary()
|
||||
|
||||
# Wrapper for call_kw with inherits
|
||||
@api.multi
|
||||
def open_website_url(self):
|
||||
return self.mapped('partner_id').open_website_url()
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
<field name="karma" string="Forum Karma"/>
|
||||
</field>
|
||||
<xpath expr="//div[contains(@class, 'oe_right oe_button_box')]" position="inside">
|
||||
<br/>
|
||||
<field name="website_published" class="pull-right" widget="website_button"/>
|
||||
<button class="oe_inline oe_stat_button" name="open_website_url"
|
||||
type="object" icon="fa-globe">
|
||||
<field name="website_published" widget="website_button"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user