diff options
| author | Raphael Collet <rco@openerp.com> | 2011-12-20 10:07:52 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2011-12-20 10:07:52 +0100 |
| commit | 33155125bddc195475e7f1cb41ca6f9ee088df79 (patch) | |
| tree | d1942b7ce41b82d81c3fbf6f6034ebe70c16d469 /addons/purchase/test/process | |
| parent | df44e44cc2a55ca65f94f6fbbc24c3f3a9cab225 (diff) | |
| parent | 0919bba650c7df37b97bfea623671faf05c6c8da (diff) | |
[MERGE] purchase, purchase_double_validation: clean yml
bzr revid: rco@openerp.com-20111220090752-25d6vv195l193rfy
Diffstat (limited to 'addons/purchase/test/process')
| -rw-r--r-- | addons/purchase/test/process/invoice_on_poline.yml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/addons/purchase/test/process/invoice_on_poline.yml b/addons/purchase/test/process/invoice_on_poline.yml new file mode 100644 index 00000000000..c2ad07aab95 --- /dev/null +++ b/addons/purchase/test/process/invoice_on_poline.yml @@ -0,0 +1,27 @@ +- + I confirm purchase order which has invoicing control method "Based on Purchase Order Lines". +- + !workflow {model: purchase.order, action: purchase_confirm, ref: order_purchase6} +- + In order to test create invoice for purchase order line. +- + !python {model: purchase.order}: | + invoice_line_obj = self.pool.get('purchase.order.line_invoice') + purchase_order = self.browse(cr, uid, ref("order_purchase6")) + context.update({'active_model': 'purchase.order', 'active_ids': [ref("order_purchase6")]}) + for purchase_line in purchase_order.order_line: + invoice_line_obj.makeInvoices(cr, uid, purchase_line.id, context=context) +- + I check the invoice of order. +- + !python {model: purchase.order}: | + purchase_order = self.browse(cr, uid, ref("order_purchase6")) + for purchase_line in purchase_order.order_line: + assert len(purchase_order.invoice_ids) == 1, "Invoice should be generated." +- + I set the default invoicing control method "Based on Purchase Order Lines". +- + !python {model: purchase.config.wizard}: | + new_id = self.create(cr ,uid, {'default_method': 'manual'}) + self.execute(cr, uid, [new_id]) + |
