Add button to activity form

This commit is contained in:
Youssef Elouahby 2018-11-22 23:13:18 +01:00
parent 8d9f7f64a1
commit ae37615c5e
2 changed files with 20 additions and 0 deletions

View File

@ -24,6 +24,11 @@ class GolemActivity(models.Model):
""" GOLEM Activity adaptations """
_inherit = 'golem.activity'
@api.multi
def activity_members_mass_mailing(self):
return self.get_mass_mailing_action('members')
@api.multi
def get_mass_mailing_action(self, action_type):
""" Call activity mass mailing presend wizard """

View File

@ -18,6 +18,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- golem activity form adaptations -->
<record id="golem_activity_form_inherit_golem_mail_activity_registration"
model="ir.ui.view">
<field name="name">Golem Activity form adaptations golem mail activity registration</field>
<field name="model">golem.activity</field>
<field name="inherit_id" ref="golem_activity.golem_activity_form"/>
<field name="arch" type="xml">
<sheet position="before">
<header>
<button name="activity_members_mass_mailing" string="Activity members mass mailing"
type="object" class="oe_highlight"/>
</header>
</sheet>
</field>
</record>
<!-- Activity members mass mailing action-->
<record id="action_activity_members_mass_mailing" model="ir.actions.server">
<field name="name">Activity members mass mailing</field>