[ADD,IMP] purchase_requisition:
[ADD]purchase_requisition/test/ui/requisiton2request_quotation.yml [IMP]add new file in __openerp__.py [IMP]Improve code of onchange_events.yml bzr revid: dbr@tinyerp.com-20111102102809-c3cjgz7a331sdawr
This commit is contained in:
@@ -45,7 +45,8 @@ This new object will regroup and will allow you to easily keep track and order a
|
||||
"active": False,
|
||||
"test":[
|
||||
'test/process/purchase_requisition.yml',
|
||||
'test/process/purchase_requisition_exclusive.yml',
|
||||
'test/process/purchase_requisition_exclusive.yml',
|
||||
'test/ui/requisiton2request_quotation.yml',
|
||||
'test/process/cancel_purchase_requisition.yml',
|
||||
'test/ui/onchange_events.yml',
|
||||
'test/ui/purchase_requisition_report.yml',
|
||||
|
||||
@@ -28,7 +28,3 @@
|
||||
assert po_id[0].state == 'approved',"After confirm a purchase order it should be in confirm state"
|
||||
assert po_id[1].state == 'cancel',"After confirmed a purchase order form the this requisition the second purchase order should be automatically goes in to cancelled state"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,4 +20,9 @@
|
||||
-
|
||||
!python {model: purchase.requisition}: |
|
||||
self.tender_reset(cr, uid, ref('order_purchase_requisition1'))
|
||||
|
||||
-
|
||||
I call onchange event to change the partner of purchase requisition.
|
||||
-
|
||||
!python {model: purchase.requisition.partner}: |
|
||||
self.onchange_partner_id(cr, uid, ref('order_purchase_requisition1'), ref('base.res_partner_desertic_hispafuentes'))
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
-
|
||||
In order to create a Quotatoion, I click on the wizard 'Request a Quotation' and create record from wizard.
|
||||
-
|
||||
!record {model: purchase.requisition.partner, id: purchase_requisition_partner_0}:
|
||||
partner_address_id: base.res_partner_address_3000
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
-
|
||||
I click on 'Create Quotation' for creating PO.
|
||||
-
|
||||
!python {model: purchase.requisition.partner}: |
|
||||
self.create_order(cr, uid, [ref("purchase_requisition_partner_0")], {"active_model": "purchase.requisition",
|
||||
"active_ids": [ref("order_purchase_requisition1")],"active_id": ref("order_purchase_requisition1"), })
|
||||
-
|
||||
I check that the purchase order is created.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
purchase_ids= self.search(cr, uid, [('requisition_id','=',ref("order_purchase_requisition1"))])
|
||||
assert purchase_ids, "Purchase Order is not created from this wizard"
|
||||
rfq = self.browse(cr, uid, purchase_ids[0])
|
||||
assert rfq.state == 'draft',"Purchase Order should be in draft state"
|
||||
assert rfq.partner_address_id.id == ref('base.res_partner_address_3000'),"Purchase Order Partner address is not correspond"
|
||||
assert rfq.partner_id.id == ref('base.res_partner_desertic_hispafuentes'),"Purchase Order Partner is not correspond"
|
||||
|
||||
Reference in New Issue
Block a user