diff --git a/.drone.yml b/.drone.yml
index c4fd423..897fc2e 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,9 +1,57 @@
-image: python:all
-env:
- - POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
- - MYSQL_URI=mysql://root@127.0.0.1:3306/
-script:
- - pip install tox
- - tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
+clone:
+ hg:
+ image: plugins/hg
+
+pipeline:
+ tox:
+ image: ${IMAGE}
+ environment:
+ - CFLAGS=-O0
+ - DB_CACHE=/cache
+ - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
+ - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
+ commands:
+ - pip install tox
+ - tox -e "${TOXENV}-${DATABASE}"
+ notify:
+ image: drillster/drone-email
+ from: drone@localhost
+ host: smtp
+ port: 25
+ skip_verify: true
+ when:
+ status: [ changed, failure ]
+
services:
- - postgres
+ postgresql:
+ image: postgres
+ when:
+ matrix:
+ DATABASE: postgresql
+
+matrix:
+ include:
+ - IMAGE: python:2.7
+ TOXENV: py27
+ DATABASE: sqlite
+ - IMAGE: python:2.7
+ TOXENV: py27
+ DATABASE: postgresql
+ - IMAGE: python:3.4
+ TOXENV: py34
+ DATABASE: sqlite
+ - IMAGE: python:3.4
+ TOXENV: py34
+ DATABASE: postgresql
+ - IMAGE: python:3.5
+ TOXENV: py35
+ DATABASE: sqlite
+ - IMAGE: python:3.5
+ TOXENV: py35
+ DATABASE: postgresql
+ - IMAGE: python:3.6
+ TOXENV: py36
+ DATABASE: sqlite
+ - IMAGE: python:3.6
+ TOXENV: py36
+ DATABASE: postgresql
diff --git a/electronic_mail.py b/electronic_mail.py
index ecee958..6591346 100644
--- a/electronic_mail.py
+++ b/electronic_mail.py
@@ -3,7 +3,7 @@
# copyright notices and license terms.
from datetime import datetime
-from trytond.model import ModelSQL, ModelView, fields
+from trytond.model import ModelSQL, ModelView, fields, DeactivableMixin
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Bool, Eval, Not
from trytond.transaction import Transaction
@@ -12,7 +12,7 @@ from trytond.transaction import Transaction
__all__ = ['ElectronicMailFilter', 'SearchingStart']
-class ElectronicMailFilter(ModelSQL, ModelView):
+class ElectronicMailFilter(DeactivableMixin, ModelSQL, ModelView):
'eMail Filter'
__name__ = 'electronic.mail.filter'
@@ -23,7 +23,6 @@ class ElectronicMailFilter(ModelSQL, ModelView):
model = fields.Function(fields.Many2One('ir.model', 'Model'),
'on_change_with_model')
cron = fields.Many2One('ir.cron', 'Cron', readonly=True)
- active = fields.Boolean('Active')
profile = fields.Many2One('searching.profile', 'Profile',
domain=[
('model', '=', Eval('model')),
@@ -77,10 +76,6 @@ class ElectronicMailFilter(ModelSQL, ModelView):
},
})
- @staticmethod
- def default_active():
- return True
-
@staticmethod
def default_mix_operator():
return 'all'
diff --git a/electronic_mail.xml b/electronic_mail.xml
index 7a4361b..e9b2382 100644
--- a/electronic_mail.xml
+++ b/electronic_mail.xml
@@ -32,6 +32,26 @@ copyright notices and license terms. -->
+
+ test_profile
+ Test Profile
+
+
+
+ send_emails
+ Send emails
+
+
+
+ create_cron
+ Create Cron
+
+
+
+ delete_cron
+ Delete Cron
+
+