diff --git a/__init__.py b/__init__.py
index 8938926..983a242 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,17 +1,17 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.pool import Pool
-from .drawing import *
-from .bom import *
-from .production import *
+from . import drawing
+from . import bom
+from . import production
def register():
Pool.register(
- Drawing,
- DrawingPosition,
- BOM,
- BOMDrawingLine,
- Production,
- ProductionDrawingLine,
+ drawing.Drawing,
+ drawing.DrawingPosition,
+ bom.BOM,
+ bom.BOMDrawingLine,
+ production.Production,
+ production.ProductionDrawingLine,
module='production_drawing', type_='model')
diff --git a/bom.xml b/bom.xml
index 55ad28c..fbdf1d9 100644
--- a/bom.xml
+++ b/bom.xml
@@ -45,13 +45,11 @@
production.bom
- form
bom_form
production.bom
- tree
bom_list
diff --git a/production.py b/production.py
index e0a0015..ea26d6d 100644
--- a/production.py
+++ b/production.py
@@ -25,13 +25,11 @@ class Production:
cls.bom.on_change.add('drawing_lines')
def on_change_bom(self):
- res = super(Production, self).on_change_bom()
- res['drawing'] = self.on_change_with_drawing()
+ super(Production, self).on_change_bom()
self.drawing = (self.bom.drawing.id if self.bom and self.bom.drawing
else None)
- res['drawing_image'] = self.on_change_with_drawing_image()
- res['drawing_lines'] = self.on_change_with_drawing_lines()
- return res
+ self.on_change_with_drawing_image()
+ self.on_change_with_drawing_lines()
@fields.depends('drawing')
def on_change_with_drawing_lines(self):
@@ -66,8 +64,8 @@ class Production:
production.drawing_lines = []
for line in production.bom.drawing_lines:
production.drawing_lines.append(Line(
- position = line.position,
- product = line.product,
+ position=line.position,
+ product=line.product,
))
return production
diff --git a/production.xml b/production.xml
index 9330e30..8d5119d 100644
--- a/production.xml
+++ b/production.xml
@@ -43,7 +43,6 @@
production
- form
production_form
diff --git a/tryton.cfg b/tryton.cfg
index 7c446ce..6197be6 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.4.0
+version=4.0
depends:
production
extras_depend:
diff --git a/view/bom_form.xml b/view/bom_form.xml
index e36a0bc..bad8764 100644
--- a/view/bom_form.xml
+++ b/view/bom_form.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/view/drawing_form.xml b/view/drawing_form.xml
index 598ea48..842efe0 100644
--- a/view/drawing_form.xml
+++ b/view/drawing_form.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/view/production_form.xml b/view/production_form.xml
index 50a585d..8c70593 100644
--- a/view/production_form.xml
+++ b/view/production_form.xml
@@ -10,7 +10,7 @@ this repository contains the full copyright notices and license terms. -->
-
+