Mailing : actions #42

Open
youssef wants to merge 33 commits from youssef/GOLEM:Mailing_actions into master
2 changed files with 22 additions and 2 deletions
Showing only changes of commit 8d9f7f64a1 - Show all commits

View File

@ -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 """

View File

@ -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>