Remove allowed_contacts_mechanisms field in Work Asterisk Result view
This commit is contained in:
parent
1cf7cb45fd
commit
eb1437bfe3
|
@ -2,10 +2,6 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:project.work.asterisk.result,allowed_contacts_mechanisms:"
|
||||
msgid "Allowed Contacts Mechanisms"
|
||||
msgstr "Mitjans de contacte disponibles"
|
||||
|
||||
msgctxt "field:project.work.asterisk.result,contact_mechanisms:"
|
||||
msgid "Contact Mechanisms"
|
||||
msgstr "Mitjans de contacte"
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:project.work.asterisk.result,allowed_contacts_mechanisms:"
|
||||
msgid "Allowed Contacts Mechanisms"
|
||||
msgstr "Medios de contacto disponibles"
|
||||
|
||||
msgctxt "field:project.work.asterisk.result,contact_mechanisms:"
|
||||
msgid "Contact Mechanisms"
|
||||
msgstr "Medios de contacto"
|
||||
|
|
11
work.py
11
work.py
|
@ -4,7 +4,6 @@
|
|||
from trytond.model import ModelView, fields
|
||||
from trytond.pool import Pool
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pyson import Eval
|
||||
from trytond.wizard import Wizard, StateView, StateTransition, Button
|
||||
|
||||
__all__ = ['WorkAsteriskResult', 'WorkAsterisk']
|
||||
|
@ -15,15 +14,8 @@ class WorkAsteriskResult(ModelView):
|
|||
__name__ = 'project.work.asterisk.result'
|
||||
|
||||
phone = fields.Selection('get_phones', 'Phone', required=True)
|
||||
allowed_contacts_mechanisms = fields.Function(fields.One2Many(
|
||||
'party.contact_mechanism', None, 'Allowed Contacts Mechanisms'),
|
||||
'on_change_with_allowed_contacts_mechanisms')
|
||||
contact_mechanisms = fields.Many2One('party.contact_mechanism',
|
||||
'Contact Mechanisms',
|
||||
domain=[
|
||||
('id', 'in', Eval('allowed_contacts_mechanisms', [])),
|
||||
],
|
||||
depends=['allowed_contacts_mechanisms'])
|
||||
'Contact Mechanisms')
|
||||
|
||||
|
||||
class WorkAsterisk(Wizard):
|
||||
|
@ -66,7 +58,6 @@ class WorkAsterisk(Wizard):
|
|||
mechanisms.extend(self.get_mechanims(contact))
|
||||
mechanisms = list(set(mechanisms))
|
||||
return {
|
||||
'allowed_contacts_mechanisms': [m.id for m in mechanisms],
|
||||
'contact_mechanisms': mechanisms and mechanisms[0].id or None
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue