diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index fd1945691ba..44269104370 100644 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -159,7 +159,6 @@ I fill amounts 180 for the invoice of 200$ and 70 for the invoice of 100$> - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_1_case1')) data = [] @@ -254,7 +253,6 @@ I fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$ - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_2_case1')) data = [] diff --git a/addons/account_voucher/test/case2_suppl_usd_eur.yml b/addons/account_voucher/test/case2_suppl_usd_eur.yml index 91fb99f6360..c13bfcbd5d4 100644 --- a/addons/account_voucher/test/case2_suppl_usd_eur.yml +++ b/addons/account_voucher/test/case2_suppl_usd_eur.yml @@ -131,7 +131,6 @@ I fill amounts 180 for the invoice of 200$ and 70 for the invoice of 100$ - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_1_case2_suppl')) data = [] @@ -234,7 +233,6 @@ I fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$> - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_2_case2_suppl')) data = [] diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml index b049fc7692e..52c416e06cc 100644 --- a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml +++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml @@ -163,7 +163,6 @@ I fill amounts 130 for the invoice of 200$ and 70 for the invoice of 100$> - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_1_case2b')) data = [] @@ -244,7 +243,6 @@ and I fully reconcil the 2 previous invoices - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_2_case2b')) data = [] diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index d0b18a5231b..99153ceeca4 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -118,7 +118,6 @@ I fill amounts 100 for the invoice of 150€ and 20 for the invoice of 80€ - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_1_case3')) data = [] @@ -206,7 +205,6 @@ I fill amounts 50 for the invoice of 150€ and 70 for the invoice of 80€ - !python {model: account.voucher}: | - import netsvc, time vals = {} voucher_id = self.browse(cr, uid, ref('account_voucher_2_case3')) data = [] diff --git a/addons/hr_holidays/test/test_hr_holiday.yml b/addons/hr_holidays/test/test_hr_holiday.yml index e78c2fd08bc..2bb60300cff 100644 --- a/addons/hr_holidays/test/test_hr_holiday.yml +++ b/addons/hr_holidays/test/test_hr_holiday.yml @@ -18,7 +18,6 @@ I again set to draft and then confirm. - !python {model: hr.holidays}: | - import netsvc self.set_to_draft(cr, uid, [ref('hr_holidays_employee1_cl')]) self.signal_confirm(cr, uid, [ref('hr_holidays_employee1_cl')]) - diff --git a/addons/hr_payroll_account/test/hr_payroll_account.yml b/addons/hr_payroll_account/test/hr_payroll_account.yml index ad0197c7905..c8b6bf42fdd 100644 --- a/addons/hr_payroll_account/test/hr_payroll_account.yml +++ b/addons/hr_payroll_account/test/hr_payroll_account.yml @@ -89,7 +89,7 @@ I verify the payslip is in draft state. - !python {model: hr.payslip}: | - from tools.translate import _ + from openerp.tools.translate import _ payslip_brw=self.browse(cr, uid, ref("hr_payslip_0")) assert(payslip_brw.state == 'draft'), _('State not changed!') - @@ -120,7 +120,7 @@ I verify that the payslip is in done state. - !python {model: hr.payslip}: | - from tools.translate import _ + from openerp.tools.translate import _ payslip_brw=self.browse(cr, uid, ref("hr_payslip_0")) assert(payslip_brw.state == 'done'), _('State not changed!') diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml index 8e8e7887b44..6fb392670e9 100644 --- a/addons/membership/test/test_membership.yml +++ b/addons/membership/test/test_membership.yml @@ -31,7 +31,6 @@ I'm Opening that Invoice which is created for "Seagate". - !python {model: res.partner}: | - import netsvc from tools.translate import _ invoice_pool = self.pool.get('account.invoice') partner_pool = self.pool.get('res.partner') diff --git a/addons/purchase_requisition/test/purchase_requisition.yml b/addons/purchase_requisition/test/purchase_requisition.yml index f23737d21b8..8fd36e07d71 100644 --- a/addons/purchase_requisition/test/purchase_requisition.yml +++ b/addons/purchase_requisition/test/purchase_requisition.yml @@ -82,7 +82,8 @@ I print a Requisition report - !python {model: purchase.requisition}: | - import netsvc, tools, os + import os + from openerp import netsvc, tools (data, format) = netsvc.LocalService('report.purchase.requisition').create(cr, uid, [ref('purchase_requisition.requisition1')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'purchase_requisition-purchase_requisition_report.'+format), 'wb+').write(data) diff --git a/addons/sale_mrp/test/sale_mrp.yml b/addons/sale_mrp/test/sale_mrp.yml index c2eff008943..9b70e052854 100644 --- a/addons/sale_mrp/test/sale_mrp.yml +++ b/addons/sale_mrp/test/sale_mrp.yml @@ -92,7 +92,7 @@ I verify that a procurement has been generated for sale order - !python {model: procurement.order}: | - from tools.translate import _ + from openerp.tools.translate import _ sale_order_obj = self.pool.get('sale.order') so = sale_order_obj.browse(cr, uid, ref("sale_order_so0")) proc_ids = self.search(cr, uid, [('origin','=',so.name)]) diff --git a/addons/sale_stock/test/picking_order_policy.yml b/addons/sale_stock/test/picking_order_policy.yml index 406aaf0bf8a..f761dfb65db 100644 --- a/addons/sale_stock/test/picking_order_policy.yml +++ b/addons/sale_stock/test/picking_order_policy.yml @@ -22,7 +22,7 @@ !python {model: sale.order}: | from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta - from tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT + from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT order = self.browse(cr, uid, ref("sale.sale_order_6")) for order_line in order.order_line: procurement = order_line.procurement_id @@ -44,7 +44,7 @@ !python {model: sale.order}: | from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta - from tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT + from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT sale_order = self.browse(cr, uid, ref("sale.sale_order_6")) assert sale_order.picking_ids, "Delivery order is not created." for picking in sale_order.picking_ids: @@ -161,7 +161,8 @@ I print a sale order report. - !python {model: sale.order}: | - import netsvc, tools, os + import os + from openerp import netsvc, tools (data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.sale_order_6')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data)