mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
Ported from odoo10 to odoo9
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="base.fr" model="res.country">
|
||||
<field name="intrastat" eval="True"/>
|
||||
@@ -85,5 +86,5 @@
|
||||
<record id="base.hr" model="res.country">
|
||||
<field name="intrastat" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -7,7 +7,7 @@ class TestIntrastatBase(TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestIntrastatBase, self).setUp()
|
||||
self.tax_intrastat = self.env["account.tax"]
|
||||
|
||||
|
||||
def test_10_countries(self):
|
||||
# check if only EU countries have the 'intrastat' bit set
|
||||
@@ -15,6 +15,10 @@ class TestIntrastatBase(TransactionCase):
|
||||
self.assertTrue(france.intrastat)
|
||||
brazil = self.env.ref('base.br')
|
||||
self.assertFalse(brazil.intrastat)
|
||||
denmark = self.env.ref('base.dk')
|
||||
self.assertTrue(denmark.intrastat)
|
||||
kenya = self.env.ref('base.ke')
|
||||
self.assertFalse(kenya.intrastat)
|
||||
|
||||
def test_20_company(self):
|
||||
# add 'Demo user' to intrastat_remind_user_ids
|
||||
@@ -27,6 +31,21 @@ class TestIntrastatBase(TransactionCase):
|
||||
self.assertEquals(demo_company.intrastat_email_list, demo_user.email)
|
||||
|
||||
|
||||
def test_exclude_intrastat(self):
|
||||
# Test if exclude_from_intrastat_if_present is false
|
||||
exclude_tax = self.env['account.tax'].search([('id', '=', 1)])
|
||||
for item in exclude_tax:
|
||||
self.assertFalse(item.exclude_from_intrastat_if_present)
|
||||
|
||||
def test_accessory_cost(self):
|
||||
accessory_cost = self.env['product.product'].search([('id', '=', 1)])
|
||||
for test in accessory_cost:
|
||||
self.assertFalse(test.is_accessory_cost)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user