Atik Agewan(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-account-followup-yml-aag into 
lp:openobject-addons.

Requested reviews:
  Atik Agewan(OpenERP) (aag-openerp)
  Ujjvala Collins (OpenERP) (uco-openerp)
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-followup-yml-aag/+merge/85815


  
   Hello,

    account_followup: Improved yml.

  Thanks,
   Atik 
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-followup-yml-aag/+merge/85815
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-account-followup-yml-aag.
=== modified file 'account/demo/account_invoice_demo.xml'
--- account/demo/account_invoice_demo.xml	2011-08-06 00:21:04 +0000
+++ account/demo/account_invoice_demo.xml	2011-12-19 08:54:27 +0000
@@ -18,6 +18,7 @@
 			<field name="date_invoice">2011-06-01</field>
 			<field eval="14.0" name="amount_untaxed"/>
 			<field eval="14.0" name="amount_total"/>
+			<field eval="14.0" name="check_total"/>
 			<field name="partner_id" ref="base.res_partner_maxtor"/>
 		</record>
 		<record id="demo_invoice_0_line_rpanrearpanelshe0" model="account.invoice.line">

=== modified file 'account_followup/__openerp__.py'
--- account_followup/__openerp__.py	2011-11-11 13:52:47 +0000
+++ account_followup/__openerp__.py	2011-12-19 08:54:27 +0000
@@ -57,7 +57,9 @@
         'account_followup_data.xml',
     ],
     'demo_xml': [],
-    'test': ['test/account_followup.yml'],
+    'test': ['test/account_followup.yml',
+             'test/account_followup_report.yml'],
+    
     'installable': True,
     'active': False,
     'certificate': '0072481076453',

=== modified file 'account_followup/test/account_followup.yml'
--- account_followup/test/account_followup.yml	2011-11-17 14:51:49 +0000
+++ account_followup/test/account_followup.yml	2011-12-19 08:54:27 +0000
@@ -1,91 +1,23 @@
 -
-  In order to test account followup module in OpenERP I create a FollowUp structure
--
-  !record {model: res.company, id: ymltest_company_2}:
-        name: Acme 2
--
-  !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.
-    company_id: ymltest_company_2
-    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
-    invoice_line:
-      - account_id: account.a_sale
-        name: '[PC1] Basic PC'
-        price_unit: 450.0
-        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
+  In order to test account followup module in OpenERP, I perform action to change the state of invoice to "open".
+-
+  !workflow {model: account.invoice, action: invoice_open, ref: account.demo_invoice_0}
+-
+  I create a send followup record.
 -
   !record {model: account.followup.print, id: account_followup_print_0}:
     date: !eval time.strftime('%Y-%m-%d')
-    followup_id: account_followup_followup_testfollowups0
-
-
+    followup_id: account_followup.demo_followup1
 -
-  I Select Followup and clicked on Continue Button
+  I continue followup.
 -
   !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
+  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
@@ -95,15 +27,12 @@
     partner_ids:
       - base.res_partner_desertic_hispafuentes
     partner_lang: 1
-
-
 -
-  I clicked on Print Follow Ups to print Followups reports
+  I send a mail to partner.
 -
   !python {model: account.followup.print.all}: |
     import time
-    self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US',
+    self.do_mail(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": time.strftime('%Y-%m-%d'), "followup_id": ref("account_followup_followup_testfollowups0"), "active_id": ref("account_followup.account_followup_print_menu"),
-      "company_id": ref('base.main_company'),
+      "tz": False, "date": time.strftime('%Y-%m-%d'), "followup_id": ref("account_followup.demo_followup1"), "active_id": ref("account_followup.account_followup_print_menu"),
       })

=== added file 'account_followup/test/account_followup_report.yml'
--- account_followup/test/account_followup_report.yml	1970-01-01 00:00:00 +0000
+++ account_followup/test/account_followup_report.yml	2011-12-19 08:54:27 +0000
@@ -0,0 +1,9 @@
+-
+  In order to test the report i will print a followup report.
+-
+  !python {model: account.followup.print.all}: |
+    import time
+    ctx = {'form_view_ref':'account_followup.view_account_followup_print_all', 'followup_id': ref('account_followup.demo_followup1'),'date': time.strftime('%Y-%m-%d'),'model': 'account_followup.followup','active_ids':[ref('account_followup_print_all_0')], 'company_id':ref('base.main_company')}
+    data_dict = {'email_conf': 1}
+    from tools import test_reports
+    test_reports.try_report_action(cr, uid, 'action_account_followup_print_all', context=ctx, wiz_data=data_dict,wiz_buttons=["Print Follow Ups"], our_module='account_followup')

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to