X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Faccount_followup%2Ftest%2Faccount_followup.yml;h=ceb7ec2ea9bf81e45450c587c6db0e95a5561dd9;hb=8a90401507c7e02deb5fd8c7627c66a2f331c546;hp=cd197f1b862d1f4bd3216d228970a7dc9aa6b5af;hpb=8622032818465b628a2187e8b4ea8abf021a95e4;p=odoo%2Fodoo.git diff --git a/addons/account_followup/test/account_followup.yml b/addons/account_followup/test/account_followup.yml index cd197f1..ceb7ec2 100644 --- a/addons/account_followup/test/account_followup.yml +++ b/addons/account_followup/test/account_followup.yml @@ -1,111 +1,25 @@ - - In order to test account followup module in OpenERP I create a FollowUp structure + In order to test account follow-up module in OpenERP, I change the state of invoice to "open". - - !record {model: account_followup.followup, id: account_followup_followup_testfollowups0}: - description: First letter after 15 net days, 30 net days and 45 days end of month levels. - followup_line: - - delay: 15 - name: 'level 0: 15 days' - sequence: 0 - start: days - description: Dear %(partner_name)s,\n\nException made if there was a mistake - of ours, it seems that the following amount staid unpaid. Please, take appropriate - measures in order to carry out this payment in the next 1 days.\n\nWould your - payment have been carried out after this mail was sent, please consider the - present one as void. Do not hesitate to contact our accounting department at - (+32).10.68.94.39.\n\nBest Regards,\n - - delay: 30 - name: 'level1: 30 days' - sequence: 1 - start: days - description: Dear %(partner_name)s,\n\nException made if there was a mistake - of ours, it seems that the following amount staid unpaid. Please, take appropriate - measures in order to carry out this payment in the next 2 days.\n\nWould your - payment have been carried out after this mail was sent, please consider the - present one as void. Do not hesitate to contact our accounting department at - (+32).10.68.94.39.\n\nBest Regards,\n - - delay: 45 - name: 'level 2: 45 days' - sequence: 2 - start: days - description: Dear %(partner_name)s,\n\nException made if there was a mistake - of ours, it seems that the following amount staid unpaid. Please, take appropriate - measures in order to carry out this payment in the next 3 days.\n\nWould your - payment have been carried out after this mail was sent, please consider the - present one as void. Do not hesitate to contact our accounting department at - (+32).10.68.94.39.\n\nBest Regards, - name: My followups - -- - I create an invoice -- - !record {model: account.invoice, id: account_invoice_followup}: - account_id: account.a_recv - address_contact_id: base.res_partner_address_3000 - address_invoice_id: base.res_partner_address_3000 - company_id: base.main_company - currency_id: base.EUR + !record {model: account.invoice, id: account.demo_invoice_0}: + check_total: 14.0 + date_invoice: !eval "'%s-06-2' %(datetime.now().year)" invoice_line: - - account_id: account.a_sale - name: '[PC1] Basic PC' - price_unit: 450.0 + - account_id : account.a_sale + name: 'Test PC' quantity: 1.0 - product_id: product.product_product_pc1 - uos_id: product.product_uom_unit - journal_id: account.sales_journal - partner_id: base.res_partner_desertic_hispafuentes - reference_type: none - - -- - I change the state of the invoice using create button -- - !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_followup} - -- - I create a send followup record -- - !record {model: account.followup.print, id: account_followup_print_0}: - date: '2010-06-08' - followup_id: account_followup_followup_testfollowups0 - - -- - I Select Followup and clicked on Continue Button -- - !python {model: account.followup.print}: | - self.do_continue(cr, uid, [ref("account_followup_print_0")], {"lang": 'en_US', - "active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")], - "tz": False, "active_id": ref("account_followup.account_followup_print_menu"), - }) - - -- - I select partners whom I want to send followups -- - !record {model: account.followup.print.all, id: account_followup_print_all_0}: - email_body: 'Date : %(date)s\n\nDear %(partner_name)s,\n\nPlease find in attachment - a reminder of all your unpaid invoices, for a total amount due of:\n\n%(followup_amount).2f - %(company_currency)s\n\nThanks,\n--\n%(user_signature)s\n%(company_name)s' - email_subject: Invoices Reminder - partner_ids: - - base.res_partner_desertic_hispafuentes - partner_lang: 1 - - -- - I clicked on Print Follow Ups to print Followups reports -- - !python {model: account.followup.print.all}: | - self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US', - "active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")], - "tz": False, "date": "2010-06-08", "followup_id": 3, "active_id": ref("account_followup.account_followup_print_menu"), - }) - - - - - - - - + journal_id: account.bank_journal + partner_id: base.res_partner_12 + reference_type: none +- + !workflow {model: account.invoice, action: invoice_open, ref: account.demo_invoice_0} +- + I create a follow-up. +- + !record {model: account_followup.print, id: account_followup_print_0}: + {} +- + I will process follow-ups +- + !python {model: account_followup.print}: | + self.do_process(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"),}) \ No newline at end of file