Add button to family form
This commit is contained in:
parent
770f10896e
commit
8d9f7f64a1
@ -24,6 +24,10 @@ class GolemFamily(models.Model):
|
|||||||
""" GOLEM Family adaptations """
|
""" GOLEM Family adaptations """
|
||||||
_inherit = 'golem.family'
|
_inherit = 'golem.family'
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def family_members_mass_mailing(self):
|
||||||
|
return self.get_mass_mailing_action('members')
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def get_mass_mailing_action(self, action_type):
|
def get_mass_mailing_action(self, action_type):
|
||||||
""" Call family mass mailing presend wizard """
|
""" Call family mass mailing presend wizard """
|
||||||
|
@ -18,6 +18,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
-->
|
-->
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
|
<!-- golem family form adaptations -->
|
||||||
|
<record id="golem_family_form_inherit_golem_mail_family"
|
||||||
|
model="ir.ui.view">
|
||||||
|
<field name="name">Golem Family form adaptations golem mail family</field>
|
||||||
|
<field name="model">golem.family</field>
|
||||||
|
<field name="inherit_id" ref="golem_family.golem_family_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<sheet position="before">
|
||||||
|
<header>
|
||||||
|
<button name="family_members_mass_mailing" string="Family members mass mailing"
|
||||||
|
type="object" class="oe_highlight"
|
||||||
|
attrs="{'invisible': [('member_ids', '=', False)]}"/>
|
||||||
|
</header>
|
||||||
|
</sheet>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
<!-- Family member mass mailing action-->
|
<!-- Family member mass mailing action-->
|
||||||
<record id="action_family_members_mass_mailing" model="ir.actions.server">
|
<record id="action_family_members_mass_mailing" model="ir.actions.server">
|
||||||
<field name="name">Family members mass mailing</field>
|
<field name="name">Family members mass mailing</field>
|
||||||
|
Loading…
Reference in New Issue
Block a user