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
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.
-
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.
-
!workflow {model: sale.order, action: manual_invoice, ref: sale_order_so5}
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
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 "
\ No newline at end of file
+ assert (crm.ref),("sale order has not been created")
\ No newline at end of file