2 In order to test account_payment in OpenERP I create a new record Type.
4 !record {model: payment.type, id: payment_type_t0}:
9 I created a new Bank Record
11 Creating a res.partner.bank record
13 !record {model: res.partner.bank, id: res_partner_bank_0}:
15 partner_id: base.res_partner_9
20 I created a new Payment Mode
22 Creating a payment.mode record
24 !record {model: payment.mode, id: payment_mode_m0}:
25 bank_id: res_partner_bank_0
26 journal: account.bank_journal
31 I created a Supplier Invoice
33 Creating a account.invoice record
35 !record {model: account.invoice, id: account_invoice_payment}:
36 account_id: account.a_pay
37 address_contact_id: base.res_partner_address_tang
38 address_invoice_id: base.res_partner_address_tang
40 company_id: base.main_company
43 - account_id: account.a_expense
44 name: '[PC1] Basic PC'
46 product_id: product.product_product_pc1
48 uos_id: product.product_uom_unit
49 journal_id: account.expenses_journal
50 partner_id: base.res_partner_asus
55 I make the supplier invoice in Open state
57 Performing a workflow action invoice_open on module account.invoice
59 !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_payment}
62 I create a new payment order
64 Creating a payment.order record
66 !record {model: payment.order, id: payment_order_0}:
70 user_id: base.user_root
74 Creating a payment.order.create record
76 !record {model: payment.order.create, id: payment_order_create_0}:
80 I searched the entries using "Payment Create Order" wizard
82 Performing an osv_memory action search_entries on module payment.order.create
84 !python {model: payment.order.create}: |
85 self.search_entries(cr, uid, [ref("payment_order_create_0")], {"lang": "en_US",
86 "active_model": "payment.order", "active_ids": [ref("payment_order_0")],
87 "tz": False, "active_id": ref("payment_order_0"), })
89 I check that Initially Payment order is in "draft" state
91 !assert {model: payment.order, id: payment_order_0}:
94 I pressed the confirm payment button to confirm the payment
96 Performing a workflow action open on module payment.order
98 !workflow {model: payment.order, action: open, ref: payment_order_0}
100 I check that Payment order is in "Confirmed" state
102 !assert {model: payment.order, id: payment_order_0}:
105 I paid the payment using "Make Payments" Button
107 Creating a account.payment.make.payment record
109 !record {model: account.payment.make.payment, id: account_payment_make_payment_0}:
113 Performing an osv_memory action launch_wizard on module account.payment.make.payment
115 !python {model: account.payment.make.payment}: |
116 self.launch_wizard(cr, uid, [ref("account_payment_make_payment_0")], {"lang":
117 "en_US", "active_model": "payment.order", "active_ids": [ref("payment_order_0")], "tz":
118 False, "active_id": ref("payment_order_0"), })
121 I check that Payment order is in "Done" state
123 !assert {model: payment.order, id: payment_order_0}: