[MERGE]: Merge with latest trunk-addons
[odoo/odoo.git] / addons / account_followup / test / account_followup.yml
1 -
2   In order to test account follow-up module in OpenERP, I change the state of invoice to "open".
3 -
4   !record {model: account.invoice, id: account.demo_invoice_0}:
5     check_total: 14.0
6 -
7   !workflow {model: account.invoice, action: invoice_open, ref: account.demo_invoice_0}
8 -
9   I create a follow-up.
10 -
11   !record {model: account.followup.print, id: account_followup_print_0}:
12     {}
13 -
14   I select the follow-up to send it to the partner.
15 -
16   !python {model: account.followup.print}: |
17     self.do_continue(cr, uid, [ref("account_followup_print_0")], {"active_ids": [ref("account_followup.account_followup_print_menu")], "active_id": ref("account_followup.account_followup_print_menu"),
18       })
19 -
20   I select partners whom I want to send follow-ups.
21 -
22   !record {model: account.followup.print.all, id: account_followup_print_all_0}:
23     email_body: 'Date : %(date)s\n\nDear %(partner_name)s,\n\nPlease find in attachment
24       a reminder of all your unpaid invoices, for a total amount due of:\n\n%(followup_amount).2f
25       %(company_currency)s\n\nThanks,\n--\n%(user_signature)s\n%(company_name)s'
26     email_subject: Invoices Reminder
27     partner_ids:
28       - base.res_partner_12
29     partner_lang: 1
30 -
31   I send a follow-up mail to partner.
32 -
33   !python {model: account.followup.print.all}: |
34     import time
35     self.do_mail(cr, uid, [ref("account_followup_print_all_0")], {"active_ids": [ref("account_followup.account_followup_print_menu")], "date": time.strftime('%Y-%m-%d'), "followup_id": ref("account_followup.demo_followup1"), "active_id": ref("account_followup.account_followup_print_menu"),
36       })