Reviewers: ,


Please review this at http://codereview.tryton.org/643002/

Affected files:
  M trytond/ir/rule.py


Index: trytond/ir/rule.py
===================================================================

--- a/trytond/ir/rule.py
+++ b/trytond/ir/rule.py
@@ -9,6 +9,7 @@
 from ..transaction import Transaction
 from ..cache import Cache
 from ..pool import Pool
+from ..backend import TableHandler

 __all__ = [
     'RuleGroup', 'Rule',
@@ -113,6 +114,14 @@
                 })

     @classmethod
+    def __register__(cls, module_name):
+        super(Rule, cls).__register__(module_name)
+        table = TableHandler(Transaction().cursor, cls, module_name)
+        table.drop_column('field', exception=True)
+        table.drop_column('operator', exception=True)
+        table.drop_column('operand', exception=True)
+
+    @classmethod
     def check_domain(cls, rules):
         ctx = cls._get_context()
         for rule in rules:



--
--
[email protected] mailing list



Reply via email to