aboutsummaryrefslogtreecommitdiff
path: root/src/ee/odoo
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-08-15 13:30:57 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-08-15 13:31:52 +0200
commitf328b015085be3eab7800e6f87cf1ae704486c0a (patch)
treed555964f532010a2db4c937ed1dc9a1c6ebb5e65 /src/ee/odoo
parentc4a1a452d344de0ee45e2fb2c8284c636eb05818 (diff)
downloadee-python-f328b015085be3eab7800e6f87cf1ae704486c0a.tar.gz
ee-python-f328b015085be3eab7800e6f87cf1ae704486c0a.tar.bz2
ee-python-f328b015085be3eab7800e6f87cf1ae704486c0a.tar.xz
ee-python-f328b015085be3eab7800e6f87cf1ae704486c0a.zip
odoo: Don't generate any Ninja code unless actually enabled.
Diffstat (limited to 'src/ee/odoo')
-rw-r--r--src/ee/odoo/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ee/odoo/__init__.py b/src/ee/odoo/__init__.py
index af872b4..9da40c2 100644
--- a/src/ee/odoo/__init__.py
+++ b/src/ee/odoo/__init__.py
@@ -3,6 +3,7 @@ from pathlib import Path
from ee.logging import log
from ee.project import Project
+from ee.tools import parse_bool
def restructure(in_path: Path, in_format, out_path: Path, out_format):
@@ -56,6 +57,11 @@ def init_project(project: Project):
def generate_ninja(project: Project):
+ enabled = parse_bool(project.get_or_create_section("odoo").get("enabled"))
+
+ if not enabled:
+ return
+
head = """
rule odoo-restructure
command = ee odoo-restructure --in $in --in-format $in_format --out $out --out-format $out_format