diff --git a/addons/portal_crm/__openerp__.py b/addons/portal_crm/__openerp__.py index 81b6815b942..102ec36bb42 100644 --- a/addons/portal_crm/__openerp__.py +++ b/addons/portal_crm/__openerp__.py @@ -27,11 +27,14 @@ 'complexity': 'easy', 'description': """ This module adds a contact page (with a contact form creating a lead when submitted) to your portal if crm and portal are installed. -==================================================================================================================================== +==================================================================================================================================== """, 'author': 'OpenERP SA', 'depends': ['crm','portal'], 'data': ['wizard/contact_view.xml'], + 'test': [ + 'test/submit_contact_form.yml', + ], 'installable': True, 'auto_install': True, 'category': 'Hidden', diff --git a/addons/portal_crm/test/submit_contact_form.yml b/addons/portal_crm/test/submit_contact_form.yml new file mode 100644 index 00000000000..026d2c76c11 --- /dev/null +++ b/addons/portal_crm/test/submit_contact_form.yml @@ -0,0 +1,12 @@ +- + As a portal user, I fill in the contact form and submit it +- + !python {model: portal_crm.crm_contact_us}: | + values = { + 'name': 'Need information about your products', + 'partner_name': 'Mr. John Doe', + 'email_from': 'mister@john.doe', + 'phone': '+32 444 11 22 33', + 'description': 'Dear Sir or Madam, could you get back to me asap ? Regards.' + } + self.create(cr, ref("portal.demo_user0"), values, context=context) \ No newline at end of file