summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-09-10 19:21:57 +0200
committerChristophe Simonis <chs@odoo.com>2018-09-10 19:21:57 +0200
commit826cd9b3d3281fa78bf7a8b10d2ca1efff87d703 (patch)
tree538e6b7162ba66be03958ddf5f7b7cf027b98a75 /odoo
parent4850fb08385de3f0851a732c97c90402e89838b7 (diff)
parentc3ea0a781132b6bb4c00e7856b2e0aa1b5c20f28 (diff)
[MERGE] forward port branch 11.0 up to c3ea0a78113
Diffstat (limited to 'odoo')
-rw-r--r--odoo/addons/base/data/res_country_data.xml2
-rw-r--r--odoo/addons/test_main_flows/__init__.py15
-rw-r--r--odoo/addons/test_main_flows/__manifest__.py1
3 files changed, 16 insertions, 2 deletions
diff --git a/odoo/addons/base/data/res_country_data.xml b/odoo/addons/base/data/res_country_data.xml
index 54497ad8f97..2eaa0d0abf3 100644
--- a/odoo/addons/base/data/res_country_data.xml
+++ b/odoo/addons/base/data/res_country_data.xml
@@ -651,7 +651,7 @@
<field name="name">Guatemala</field>
<field name="code">gt</field>
<field file="base/static/img/country_flags/gt.png" name="image" type="base64" />
- <field name="currency_id" ref="QTQ" />
+ <field name="currency_id" ref="GTQ" />
<field eval="502" name="phone_code" />
</record>
<record id="gu" model="res.country">
diff --git a/odoo/addons/test_main_flows/__init__.py b/odoo/addons/test_main_flows/__init__.py
index ac45264fad4..ba375620a33 100644
--- a/odoo/addons/test_main_flows/__init__.py
+++ b/odoo/addons/test_main_flows/__init__.py
@@ -1,4 +1,17 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-#from . import models
+from odoo import api, SUPERUSER_ID
+
+#
+# Conditional installation of enterprise modules.
+#
+# This module is defined in community but some steps (defined with 'edition: "enterprise"')
+# are only used to test enterprise. As it's not possible to direcly add enterprise
+# modules dependencies, this post install hook will install account_accountant if exists.
+#
+def _auto_install_enterprise_dependencies(cr, registry):
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ module_list = ['account_accountant']
+ module_ids = env['ir.module.module'].search([('name', 'in', module_list), ('state', '=', 'uninstalled')])
+ module_ids.sudo().button_install()
diff --git a/odoo/addons/test_main_flows/__manifest__.py b/odoo/addons/test_main_flows/__manifest__.py
index f0c471a0566..bde9b933d27 100644
--- a/odoo/addons/test_main_flows/__manifest__.py
+++ b/odoo/addons/test_main_flows/__manifest__.py
@@ -13,4 +13,5 @@ It will install some main apps and will try to execute the most important action
'views/templates.xml',
],
'installable': True,
+ 'post_init_hook': '_auto_install_enterprise_dependencies',
}