From 4f43cda69c8ed06b9492ed639d848db10af2c8bd Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Tue, 29 Nov 2011 11:05:10 +0530 Subject: [PATCH] [IMP]account_payment: remove a ui folder and its file and move a process file in test and added a demo data yml for account_payment bzr revid: mma@tinyerp.com-20111129053510-mgyesspwq3gc8a6d --- addons/account_payment/__openerp__.py | 10 +++--- .../account_payment/account_payment_demo.yml | 19 +++++++++++ .../{process => }/account_payment_report.yml | 0 .../draft2cancel_payment_order.yml | 0 .../draft2done_payment_order.yml | 0 .../draft2valid_bank_statement.yml | 0 .../test/ui/payment_order_form.yml | 34 ------------------- 7 files changed, 24 insertions(+), 39 deletions(-) create mode 100644 addons/account_payment/account_payment_demo.yml rename addons/account_payment/test/{process => }/account_payment_report.yml (100%) rename addons/account_payment/test/{process => }/draft2cancel_payment_order.yml (100%) rename addons/account_payment/test/{process => }/draft2done_payment_order.yml (100%) rename addons/account_payment/test/{process => }/draft2valid_bank_statement.yml (100%) delete mode 100644 addons/account_payment/test/ui/payment_order_form.yml diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index d5d8aa915ec..c547dc92715 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -51,11 +51,11 @@ This module provides : ], 'demo_xml': ['account_payment_demo.xml'], 'test': [ - '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/process/account_payment_report.yml' + 'test/draft2cancel_payment_order.yml', + 'test/draft2done_payment_order.yml', + 'test/draft2valid_bank_statement.yml', + 'account_payment_demo.yml', + 'test/account_payment_report.yml' ], 'installable': True, 'active': False, diff --git a/addons/account_payment/account_payment_demo.yml b/addons/account_payment/account_payment_demo.yml new file mode 100644 index 00000000000..b5069408e47 --- /dev/null +++ b/addons/account_payment/account_payment_demo.yml @@ -0,0 +1,19 @@ +- + !record {model: res.partner.bank, id: partner_bank_1}: + name: Reserve Bank + acc_number: 00987654321 + partner_id: base.res_partner_agrolait + bank: base.res_bank_1 + state: bank + +- + !record {model: payment.mode, id: payment_mode_1}: + name: Direct Payment + journal: account.bank_journal + bank_id: account_payment.partner_bank_1 + +- + !record {model: payment.order, id: payment_order_1}: + mode: account_payment.payment_mode_1 + user_id: base.user_root + date_prefered: now diff --git a/addons/account_payment/test/process/account_payment_report.yml b/addons/account_payment/test/account_payment_report.yml similarity index 100% rename from addons/account_payment/test/process/account_payment_report.yml rename to addons/account_payment/test/account_payment_report.yml diff --git a/addons/account_payment/test/process/draft2cancel_payment_order.yml b/addons/account_payment/test/draft2cancel_payment_order.yml similarity index 100% rename from addons/account_payment/test/process/draft2cancel_payment_order.yml rename to addons/account_payment/test/draft2cancel_payment_order.yml diff --git a/addons/account_payment/test/process/draft2done_payment_order.yml b/addons/account_payment/test/draft2done_payment_order.yml similarity index 100% rename from addons/account_payment/test/process/draft2done_payment_order.yml rename to addons/account_payment/test/draft2done_payment_order.yml diff --git a/addons/account_payment/test/process/draft2valid_bank_statement.yml b/addons/account_payment/test/draft2valid_bank_statement.yml similarity index 100% rename from addons/account_payment/test/process/draft2valid_bank_statement.yml rename to addons/account_payment/test/draft2valid_bank_statement.yml diff --git a/addons/account_payment/test/ui/payment_order_form.yml b/addons/account_payment/test/ui/payment_order_form.yml deleted file mode 100644 index fbe5e4dfb6b..00000000000 --- a/addons/account_payment/test/ui/payment_order_form.yml +++ /dev/null @@ -1,34 +0,0 @@ -- - 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")))