Pyflakes fixes.
This commit is contained in:
parent
67b9a58870
commit
8be89957f4
|
@ -5,8 +5,8 @@ from trytond.model import fields, ModelView
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.wizard import Wizard, StateAction
|
from trytond.wizard import Wizard, StateAction
|
||||||
from trytond.pyson import Eval, Bool
|
from trytond.pyson import Eval, Bool
|
||||||
from email.utils import parseaddr, formataddr, formatdate, make_msgid
|
from email.utils import formataddr, formatdate, make_msgid
|
||||||
from email import encoders, message_from_bytes
|
from email import encoders
|
||||||
from email.mime.multipart import MIMEMultipart
|
from email.mime.multipart import MIMEMultipart
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
from email.mime.base import MIMEBase
|
from email.mime.base import MIMEBase
|
||||||
|
@ -299,17 +299,17 @@ class Activity(metaclass=PoolMeta):
|
||||||
def create_activity(cls):
|
def create_activity(cls):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
ModelData = pool.get('ir.model.data')
|
ModelData = pool.get('ir.model.data')
|
||||||
Employee = pool.get('company.employee')
|
|
||||||
ElectronicMail = pool.get('electronic.mail')
|
ElectronicMail = pool.get('electronic.mail')
|
||||||
Mailbox = pool.get('electronic.mail.mailbox')
|
|
||||||
Activity = pool.get('activity.activity')
|
Activity = pool.get('activity.activity')
|
||||||
ActivityType = pool.get('activity.type')
|
ActivityType = pool.get('activity.type')
|
||||||
ActivityConfiguration = pool.get('activity.configuration')
|
ActivityConfiguration = pool.get('activity.configuration')
|
||||||
|
|
||||||
mails = ElectronicMail.search([
|
mails = ElectronicMail.search([
|
||||||
('mailbox', '=', ActivityConfiguration(0).pending_mailbox)
|
('mailbox', '=', ActivityConfiguration(0).pending_mailbox)
|
||||||
], order=[('date', 'ASC'), ('id', 'ASC')])
|
], order=[('date', 'ASC'), ('id', 'ASC')])
|
||||||
activity_type = ActivityType(ModelData.get_id('activity',
|
activity_type = ActivityType(ModelData.get_id('activity',
|
||||||
'incoming_email_type'))
|
'incoming_email_type'))
|
||||||
|
|
||||||
employee = ActivityConfiguration(0).employee
|
employee = ActivityConfiguration(0).employee
|
||||||
processed_mailbox = ActivityConfiguration(0).processed_mailbox
|
processed_mailbox = ActivityConfiguration(0).processed_mailbox
|
||||||
activities = []
|
activities = []
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
from trytond.pool import Pool, PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.model import fields, ModelView
|
from trytond.model import fields
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['Configuration']
|
|
||||||
|
|
||||||
|
|
||||||
class Configuration(metaclass=PoolMeta):
|
class Configuration(metaclass=PoolMeta):
|
||||||
|
@ -13,4 +10,4 @@ class Configuration(metaclass=PoolMeta):
|
||||||
pending_mailbox = fields.Many2One('electronic.mail.mailbox', 'Pending Mailbox',
|
pending_mailbox = fields.Many2One('electronic.mail.mailbox', 'Pending Mailbox',
|
||||||
required=True)
|
required=True)
|
||||||
processed_mailbox = fields.Many2One('electronic.mail.mailbox', 'Processed Mailbox',
|
processed_mailbox = fields.Many2One('electronic.mail.mailbox', 'Processed Mailbox',
|
||||||
required=True)
|
required=True)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
# The COPYRIGHT file at the top level of this repository contains the full
|
# The COPYRIGHT file at the top level of this repository contains the full
|
||||||
# copyright notices and license terms.
|
# copyright notices and license terms.
|
||||||
from .test_electronic_mail_activity import suite
|
from .test_electronic_mail_activity import suite
|
||||||
|
|
||||||
|
__all__ = ['suite']
|
||||||
|
|
Loading…
Reference in New Issue