[IMP] Sale: YAML improved
bzr revid: mra@mra-laptop-20100817115859-kkdcv7ubrcyxfhx3
This commit is contained in:
parent
a5afe9f958
commit
ea78e90b3e
|
@ -26,11 +26,7 @@
|
|||
pricelist_id: product.list0
|
||||
shop_id: sale.shop
|
||||
-
|
||||
I confirm the Sale Order.
|
||||
-
|
||||
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so5}
|
||||
-
|
||||
I use the Advance Payment wizard.
|
||||
I use the Advance Payment wizard.
|
||||
-
|
||||
!record {model: sale.advance.payment.inv, id: sale_advance_payment_inv_0}:
|
||||
amount: 1000.0
|
||||
|
@ -95,19 +91,23 @@
|
|||
writeoff_acc_id: account.a_sale
|
||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
||||
-
|
||||
I verify that invoice has transit from Open to Done state
|
||||
I verify that invoice has transit from Open to Paid state
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','paid')])
|
||||
assert invoice_id, "Invoice for SO is not in done state."
|
||||
assert invoice_id, "Invoice for SO is not in paid state."
|
||||
-
|
||||
I verify that Paid has been set to true.
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
sale_id=self.browse(cr, uid, ref("sale_order_so5"))
|
||||
assert(sale_id.invoiced == True), "Paid has not been set to true"
|
||||
-
|
||||
I confirm the Sale Order.
|
||||
-
|
||||
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so5}
|
||||
-
|
||||
I click on "Create Invoice" button of Sales order to create the invoice.
|
||||
-
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
I create Minimal Chart Account.
|
||||
-
|
||||
!record {model: account.account, id: account_account_minimalchart0}:
|
||||
code: '0'
|
||||
code: MC
|
||||
company_id: base.main_company
|
||||
currency_mode: current
|
||||
name: Minimal Chart
|
||||
|
|
|
@ -36,15 +36,15 @@
|
|||
Then I click on the 'Ok' button of wizard
|
||||
-
|
||||
!python {model: crm.make.sale}: |
|
||||
crm_obj = self.pool.get('crm.lead')
|
||||
crm = crm_obj.browse(cr, uid, ref("crm_lead_opportunity0"))
|
||||
self.makeOrder(cr, uid, [ref("crm_make_sale_0")], {"lang": "en_US", "tz": False,
|
||||
"active_model": "crm.lead", "section_id": False, "default_type": "opportunity",
|
||||
"search_default_user_id": 1, "search_default_current": 1, "active_ids": [1],
|
||||
"active_id": (1)})
|
||||
"active_model": "crm.lead", "section_id": "crm.section_sales_department", "default_type": "opportunity",
|
||||
"search_default_user_id": 1, "search_default_current": 1, "active_ids": [crm.id],
|
||||
"active_id": crm.id})
|
||||
-
|
||||
I verify that a sale order has been generated from an opportunity
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
crm_obj = self.pool.get('crm.lead')
|
||||
!python {model: crm.lead}: |
|
||||
crm = self.browse(cr, uid, ref("crm_lead_opportunity0"))
|
||||
so = self.search(cr, uid, [('origin','=', 'Opportunity: %s' % str(crm.id))])
|
||||
assert so, "Sale order has not been created "
|
||||
assert (crm.ref),("sale order has not been created")
|
Loading…
Reference in New Issue