Mailing : actions #42

Open
youssef wants to merge 33 commits from youssef/GOLEM:Mailing_actions into master
Showing only changes of commit 09f989a705 - Show all commits

View File

@ -18,19 +18,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<act_window name="Partner Mass Mailing"
res_model="mail.compose.message"
src_model="golem.member"
view_mode="form"
multi="True"
target="new"
key2="client_action_multi"
id="action_golem_member_mass_mail"
context="{
'default_composition_mode': 'mass_mail',
'default_partner_to': 'trate9',
'default_use_template': True,
'default_template_id': ref('mail.email_template_partner'),
}"/>
<!-- Add action to members list-->
<record id="action_member_mass_mailing" model="ir.actions.server">
<field name="name">Member mass mailing</field>
<field name="model_id" ref="golem_member.model_golem_member"/>
<field name="state">code</field>
<field name="code">
partners = records.getPartners()
presend_wizard = env['golem.mail.presend.wizard'].create({'partner_ids': [(6, 0, partners)]})
action = {
'type': 'ir.actions.act_window',
'res_model': 'golem.mail.presend.wizard',
'res_id': presend_wizard.id,
'view_mode': 'form',
'view_type': 'form',
'target': 'new'
}
</field>
</record>
<record id="ir_member_mass_mailing" model="ir.values">
<field name="key2" eval="'client_action_multi'" />
<field name="model" eval="'golem.member'" />
<field name="name">Member mass mailing</field>
<field name="value"
eval="'ir.actions.server,%d'%action_member_mass_mailing" />
</record>
</data>
</odoo>