[IMP]account_payment: added a new file for test tha onchange ,copy and filed_view_get

bzr revid: mma@tinyerp.com-20111115103123-gnhn1zyjcqy8fg36
This commit is contained in:
Mayur Maheshwari (OpenERP) 2011-11-15 16:01:23 +05:30
parent 82bfb28027
commit c01f177771
2 changed files with 35 additions and 0 deletions

View File

@ -54,6 +54,7 @@ This module provides :
'test/process/draft2cancel_payment_order.yml',
'test/process/draft2done_payment_order.yml',
'test/process/draft2valid_bank_statement.yml',
'test/ui/payment_order_form.yml',
'test/account_payment_report.yml'
],
'installable': True,

View File

@ -0,0 +1,34 @@
-
In order to test the features of payment mode form
-
I call a onchange event to change the company of payment mode
-
!python {model: payment.mode}: |
self.onchange_company_id(cr, uid, [ref("account_payment.payment_mode_1")], ref("base.main_company"))
-
I call a onchange event to change the company and partner of payment line
-
!python {model: payment.line}: |
payment = self.pool.get('payment.order').browse(cr, uid, ref("account_payment.payment_order_1"))
payment_line = payment.line_ids[0]
self.onchange_amount(cr, uid, [payment_line.id], 14, ref("base.EUR"), ref("base.EUR"))
self.onchange_partner(cr, uid, [payment_line.id], ref("base.res_partner_maxtor"), 1)
-
I view the payment entries record
-
!python {model: account.payment.populate.statement}: |
self.fields_view_get(cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False)
-
I view the payment entries record
-
!python {model: payment.order.create}: |
self.fields_view_get(cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False)
-
I copy the payment order record
-
!python {model: payment.mode}: |
self.copy(cr, uid, (ref("account_payment.payment_order_1")))