merged with trunk
[odoo/odoo.git] / addons / account_followup / test / account_followup.yml
1 -
2   In order to test account followup module in OpenERP I create a FollowUp structure
3 -
4   !record {model: account_followup.followup, id: account_followup_followup_testfollowups0}:
5     description: First letter after 15 net days, 30 net days and 45 days end of month levels.
6     followup_line:
7       - delay: 15
8         name: 'level 0: 15 days'
9         sequence: 0
10         start: days
11         description: Dear %(partner_name)s,\n\nException made if there was a mistake
12           of ours, it seems that the following amount staid unpaid. Please, take appropriate
13           measures in order to carry out this payment in the next 1 days.\n\nWould your
14           payment have been carried out after this mail was sent, please consider the
15           present one as void. Do not hesitate to contact our accounting department at
16           (+32).10.68.94.39.\n\nBest Regards,\n
17       - delay: 30
18         name: 'level1: 30 days'
19         sequence: 1
20         start: days
21         description: Dear %(partner_name)s,\n\nException made if there was a mistake
22           of ours, it seems that the following amount staid unpaid. Please, take appropriate
23           measures in order to carry out this payment in the next 2 days.\n\nWould your
24           payment have been carried out after this mail was sent, please consider the
25           present one as void. Do not hesitate to contact our accounting department at
26           (+32).10.68.94.39.\n\nBest Regards,\n
27       - delay: 45
28         name: 'level 2: 45 days'
29         sequence: 2
30         start: days
31         description: Dear %(partner_name)s,\n\nException made if there was a mistake
32           of ours, it seems that the following amount staid unpaid. Please, take appropriate
33           measures in order to carry out this payment in the next 3 days.\n\nWould your
34           payment have been carried out after this mail was sent, please consider the
35           present one as void. Do not hesitate to contact our accounting department at
36           (+32).10.68.94.39.\n\nBest Regards,
37     name: My followups
38
39 -
40   I create an invoice
41 -
42   !record {model: account.invoice, id: account_invoice_followup}:
43     account_id: account.a_recv
44     address_contact_id: base.res_partner_address_3000
45     address_invoice_id: base.res_partner_address_3000
46     company_id: base.main_company
47     currency_id: base.EUR
48     invoice_line:
49       - account_id: account.a_sale
50         name: '[PC1] Basic PC'
51         price_unit: 450.0
52         quantity: 1.0
53         product_id: product.product_product_pc1
54         uos_id: product.product_uom_unit
55     journal_id: account.sales_journal
56     partner_id: base.res_partner_desertic_hispafuentes
57     reference_type: none
58
59
60 -
61   I change the state of the invoice using create button
62 -
63   !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_followup}
64
65 -
66   I create a send followup record
67 -
68   !record {model: account.followup.print, id: account_followup_print_0}:
69     date: '2010-06-08'
70     followup_id: account_followup_followup_testfollowups0
71
72
73 -
74   I Select Followup and clicked on Continue Button
75 -
76   !python {model: account.followup.print}: |
77     self.do_continue(cr, uid, [ref("account_followup_print_0")], {"lang": 'en_US',
78       "active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")],
79       "tz": False, "active_id": ref("account_followup.account_followup_print_menu"),
80       })
81
82
83 -
84   I select partners whom I want to send followups
85 -
86   !record {model: account.followup.print.all, id: account_followup_print_all_0}:
87     email_body: 'Date : %(date)s\n\nDear %(partner_name)s,\n\nPlease find in attachment
88       a reminder of all your unpaid invoices, for a total amount due of:\n\n%(followup_amount).2f
89       %(company_currency)s\n\nThanks,\n--\n%(user_signature)s\n%(company_name)s'
90     email_subject: Invoices Reminder
91     partner_ids:
92       - base.res_partner_desertic_hispafuentes
93     partner_lang: 1
94
95
96 -
97   I clicked on Print Follow Ups to print Followups reports
98 -
99   !python {model: account.followup.print.all}: |
100     self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US',
101       "active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")],
102       "tz": False, "date": "2010-06-08", "followup_id": ref("account_followup_followup_testfollowups0"), "active_id": ref("account_followup.account_followup_print_menu"),
103       })