[FIX] import openerp.netsvc instead of netsvc in YML tests.

bzr revid: vmt@openerp.com-20130209063134-ui2p9g3i395sjl7x
This commit is contained in:
Vo Minh Thu 2013-02-09 07:31:34 +01:00
parent 51a25029ba
commit f4b6be2f66
19 changed files with 31 additions and 31 deletions

View File

@ -183,7 +183,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
@ -281,7 +281,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)

View File

@ -162,7 +162,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
@ -268,7 +268,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)

View File

@ -180,7 +180,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
@ -256,7 +256,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)

View File

@ -180,7 +180,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
@ -271,7 +271,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)

View File

@ -142,7 +142,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
@ -233,7 +233,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)

View File

@ -142,7 +142,7 @@
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_19'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)

View File

@ -37,7 +37,7 @@
I will create and post an account voucher of amount 450.0 for the partner Seagate.
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
vals = {}
journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_19"), journal_id, 0.0, 1, ttype='receipt', date=False)

View File

@ -45,7 +45,7 @@
I create and post a voucher payment of amount 30000.0 for the partner Seagate
-
!python {model: account.voucher}: |
import netsvc
from openerp import netsvc
vals = {}
journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_19"), journal_id, 0.0, 1, ttype='receipt', date=False)

View File

@ -104,7 +104,7 @@
I want to check cancel button. So I first cancel the sheet then make it set to draft.
-
!python {model: hr.payslip}: |
import netsvc
from openerp import netsvc
wf_service = netsvc.LocalService("workflow")
self.cancel_sheet(cr, uid, [ref("hr_payslip_0")], None)
wf_service.trg_validate(uid, 'hr.payslip', ref("hr_payslip_0"), 'draft', cr)

View File

@ -115,6 +115,6 @@
I click on "Create Invoice" button to create Invoice and validate the invoice.
-
!python {model: hr.timesheet.invoice.create.final}: |
import netsvc
from openerp import netsvc
wkf_service = netsvc.LocalService("workflow")
res = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_agrolait")]})

View File

@ -114,6 +114,6 @@
I click on "Create Invoice" button to create Invoice and validate the invoice.
-
!python {model: hr.timesheet.invoice.create.final}: |
import netsvc
from openerp import netsvc
wkf_service = netsvc.LocalService("workflow")
res = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_agrolait")]})

View File

@ -39,7 +39,7 @@
Production start on first work center, so I start work operation on first work center.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_start_working', cr)
@ -47,7 +47,7 @@
Now I pause first work operation due to technical fault of work center.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_pause', cr)
@ -55,7 +55,7 @@
I resume first work operation.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_resume', cr)
@ -64,7 +64,7 @@
I cancel first work operation.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_cancel', cr)
@ -72,7 +72,7 @@
I reset first work operation and start after resolving techninal fault of work center.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_draft', cr)
@ -81,7 +81,7 @@
I close first work operation as this work center completed its process.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', order.workcenter_lines[0].id, 'button_done', cr)
@ -89,7 +89,7 @@
Now I close other operations one by one which are in start state.
-
!python {model: mrp.production}: |
import netsvc
from openerp import netsvc
order = self.browse(cr, uid, ref("mrp.mrp_production_1"), context=context)
wf_service = netsvc.LocalService("workflow")
for work_line in order.workcenter_lines[1:]:

View File

@ -59,7 +59,7 @@
I Validate Invoice of Purchase Order.
-
!python {model: purchase.order}: |
import netsvc
from openerp import netsvc
invoice_ids = [x.id for x in self.browse(cr, uid, ref("purchase_order_1")).invoice_ids]
wf_service = netsvc.LocalService("workflow")
for invoice in invoice_ids:

View File

@ -69,7 +69,7 @@
I confirmed RFQ which has best price.
-
!python {model: purchase.order}: |
import netsvc
from openerp import netsvc
wf_service = netsvc.LocalService("workflow")
purchase = self.browse(cr, uid, ref('rfq2'), context=context)
wf_service.trg_validate(uid, 'purchase.order', purchase.id, 'purchase_confirm', cr)

View File

@ -51,7 +51,7 @@
I cancel all the invoices.
-
!python {model: sale.order}: |
import netsvc
from openerp import netsvc
invoice_ids = self.browse(cr, uid, ref("sale_order_8")).invoice_ids
wf_service = netsvc.LocalService("workflow")
for invoice in invoice_ids:

View File

@ -41,7 +41,7 @@
I open the Invoice.
-
!python {model: sale.order}: |
import netsvc
from openerp import netsvc
wf_service = netsvc.LocalService("workflow")
so = self.browse(cr, uid, ref("sale_order_2"))
for invoice in so.invoice_ids:

View File

@ -103,7 +103,7 @@
!python {model: procurement.order}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
import netsvc
from openerp import netsvc
wf_service = netsvc.LocalService("workflow")
proc_ids = self.search(cr, uid, [('origin','=',so.name)])
for proc in proc_ids:

View File

@ -17,7 +17,7 @@
Now I cancel latest shipment.
-
!python {model: stock.picking}: |
import netsvc
from openerp import netsvc
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
last_delivery_order_id = delivery_orders[0]
wf_service = netsvc.LocalService("workflow")
@ -50,7 +50,7 @@
To cancel the sale order from Invoice Exception, I have to cancel the invoice of sale order.
-
!python {model: sale.order}: |
import netsvc
from openerp import netsvc
invoice_ids = self.browse(cr, uid, ref("sale.sale_order_8")).invoice_ids
wf_service = netsvc.LocalService("workflow")
first_invoice_id = invoice_ids[0]

View File

@ -132,7 +132,7 @@
I open the Invoice.
-
!python {model: sale.order}: |
import netsvc
from openerp import netsvc
wf_service = netsvc.LocalService("workflow")
so = self.browse(cr, uid, ref("sale.sale_order_6"))
for invoice in so.invoice_ids: