[TYPO] Set the right category for the Point Of Sale
[odoo/odoo.git] / addons / mrp_repair / test / test_mrp_repair_afterinv.yml
1 -
2   In order to test invoice type after repair.
3 -
4   I Confirm Repair order For Invoice Type After repair.
5 -
6   !workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp0}
7 -
8   I start the repairing  process by click on "Start Repair" Button For Invoice Type After repair.
9 -
10   !workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp0}
11 -
12   I check that state is "Under Repair".
13 -
14   !assert {model: mrp.repair, id: mrp_repair_rmrp0}:
15       - state == 'under_repair'
16 -
17   Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
18 -
19   !workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp0}
20 -
21   I define invoiced after repair option in this Repair order.
22   so I create Invoice by click on "Make Invoice" wizard.
23 -
24   !record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}:
25     group: 1
26 -
27   I click on "Create Invoice" button of this wizard to make invoice.
28 -
29   !python {model: mrp.repair.make_invoice}: |
30     self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rmrp0")]})
31 -
32   I check that Invoice is created for this repair order.
33 -
34   !python {model: mrp.repair}: |
35      repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp0')], context=context)[0]
36      assert repair_id.invoice_id.id, _("No invoice exists for this repair order")