diff --git a/addons/sale/test/advance_invoice.yml b/addons/sale/test/advance_invoice.yml index f926548046f..7bb1ac8e902 100644 --- a/addons/sale/test/advance_invoice.yml +++ b/addons/sale/test/advance_invoice.yml @@ -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. - diff --git a/addons/sale/test/data_test.yml b/addons/sale/test/data_test.yml index ef3b0bfe0ed..4a9eb489500 100644 --- a/addons/sale/test/data_test.yml +++ b/addons/sale/test/data_test.yml @@ -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 diff --git a/addons/sale_crm/test/sale_crm.yml b/addons/sale_crm/test/sale_crm.yml index 3d4542dc7b1..86095929691 100644 --- a/addons/sale_crm/test/sale_crm.yml +++ b/addons/sale_crm/test/sale_crm.yml @@ -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 " \ No newline at end of file + assert (crm.ref),("sale order has not been created") \ No newline at end of file