MIG account_invoice_margin For Odoo 13.0 ( Test Case have error. Module works perfect).

This commit is contained in:
Bhoomi
2019-09-26 12:27:32 -04:00
parent 41c3f8f5e4
commit 22c96bb9d3
4 changed files with 25 additions and 25 deletions

View File

@@ -6,7 +6,7 @@ class TestInvoiceMargin(TestSaleMargin):
def setUp(self):
super(TestInvoiceMargin, self).setUp()
self.AccountInvoice = self.env['account.invoice']
self.AccountMove = self.env['account.move']
def test_invoice_margin(self):
""" Test the sale_margin module in Odoo. """
@@ -42,12 +42,12 @@ class TestInvoiceMargin(TestSaleMargin):
sale_order_so11.order_line.write({'qty_delivered': 10.0})
# Invoice the sales order.
inv_id = sale_order_so11.action_invoice_create()
inv = self.AccountInvoice.browse(inv_id)
inv_id = sale_order_so11._create_invoices()
inv = self.AccountMove.browse(inv_id)
self.assertEqual(inv.margin, sale_order_so11.margin)
account = self.env['account.account'].search([('internal_type', '=', 'other')], limit=1)
inv = self.AccountInvoice.create({
inv = self.AccountMove.create({
'partner_id': self.partner_id,
'invoice_line_ids': [
(0, 0, {