Browse Source
Merge branch '8.0' into 9.0
Merge branch '8.0' into 9.0
Conflicts: _web_last_viewed_records/__openerp__.py mail_move_message/__openerp__.py reminder_base/__openerp__.pypull/2/head
Ivan Yelizariev
9 years ago
13 changed files with 725 additions and 41 deletions
-
1__init__.py
-
5__openerp__.py
-
1controllers/__init__.py
-
55controllers/main.py
-
9data/mail_move_message_data.xml
-
5doc/changelog.rst
-
168i18n/mail_move_message.pot
-
160i18n/sl.po
-
212mail_move_message_models.py
-
90mail_move_message_views.xml
-
BINstatic/description/inbox-move.png
-
4static/src/css/mail_move_message.css
-
56static/src/js/mail_move_message.js
@ -1 +1,2 @@ |
|||
import controllers |
|||
import mail_move_message_models |
@ -0,0 +1 @@ |
|||
import main |
@ -0,0 +1,55 @@ |
|||
from openerp.addons.web.controllers.main import DataSet |
|||
from openerp.tools.translate import _ |
|||
from openerp import http |
|||
from openerp.http import request |
|||
|
|||
class DataSetCustom(DataSet): |
|||
|
|||
def _extend_name(self, model, records): |
|||
cr, uid, context = request.cr, request.uid, request.context |
|||
Model = request.registry[model] |
|||
fields = Model.fields_get(cr, uid, False, context) |
|||
contact_field = False |
|||
for n, f in fields.iteritems(): |
|||
if f['type'] == 'many2one' and f['relation'] == 'res.partner': |
|||
contact_field = n |
|||
break |
|||
partner_info = {} |
|||
if contact_field: |
|||
partner_info = Model.read(cr, uid, [r[0] for r in records], [contact_field], context) |
|||
partner_info = dict([(p['id'], p[contact_field]) for p in partner_info]) |
|||
res = [] |
|||
for r in records: |
|||
if partner_info.get(r[0]): |
|||
res.append((r[0], _('%s [%s] ID %s') % (r[1], partner_info.get(r[0])[1], r[0]))) |
|||
else: |
|||
res.append((r[0], _('%s ID %s') % (r[1], r[0]))) |
|||
return res |
|||
|
|||
|
|||
@http.route('/web/dataset/call_kw/<model>/name_search', type='json', auth="user") |
|||
def name_search(self, model, method, args, kwargs): |
|||
context = kwargs.get('context') |
|||
if context and context.get('extended_name_with_contact'): |
|||
#add order by ID desc |
|||
cr, uid = request.cr, request.uid |
|||
Model = request.registry[model] |
|||
search_args = list(kwargs.get('args') or []) |
|||
limit = int(kwargs.get('limit') or 100) |
|||
operator = kwargs.get('operator') |
|||
name = kwargs.get('name') |
|||
if Model._rec_name and (not name == '' and operator == 'ilike'): |
|||
search_args += [(Model._rec_name, operator, name)] |
|||
ids = Model.search(cr, uid, search_args, limit=limit, order='id desc', context=context) |
|||
res = Model.name_get(cr, uid, ids, context) |
|||
return self._extend_name(model, res) |
|||
|
|||
return self._call_kw(model, method, args, kwargs) |
|||
|
|||
@http.route('/web/dataset/call_kw/<model>/name_get', type='json', auth="user") |
|||
def name_get(self, model, method, args, kwargs): |
|||
res = self._call_kw(model, method, args, kwargs) |
|||
context = kwargs.get('context') |
|||
if context and context.get('extended_name_with_contact'): |
|||
res = self._extend_name(model, res) |
|||
return res |
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data noupdate="1"> |
|||
<record id="mail_relocation_models" model="ir.config_parameter"> |
|||
<field name="key">mail_relocation_models</field> |
|||
<field name="value">crm.lead,project.task</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,168 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_move_message |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 8.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2015-08-11 06:53+0000\n" |
|||
"PO-Revision-Date: 2015-08-11 06:53+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Cancel" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,create_uid:0 |
|||
msgid "Created by" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,create_date:0 |
|||
msgid "Created on" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,id:0 |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,is_moved:0 |
|||
msgid "Is moved" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,write_uid:0 |
|||
msgid "Last Updated by" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,write_date:0 |
|||
msgid "Last Updated on" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,record_url:0 |
|||
msgid "Link to record" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: model:ir.model,name:mail_move_message.model_mail_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
#: field:mail_move_message.wizard,message_id:0 |
|||
msgid "Message" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Move" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: help:mail_move_message.wizard,move_back:0 |
|||
msgid "Move message and submessages to original place" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Move Message" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,move_back:0 |
|||
msgid "Move to origin" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#. openerp-web |
|||
#: code:addons/mail_move_message/static/src/xml/mail_move_message_main.xml:5 |
|||
#, python-format |
|||
msgid "Move to thread" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_by_message_id:0 |
|||
msgid "Moved by message" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_by_user_id:0 |
|||
msgid "Moved by user" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Open message" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_from_parent_id:0 |
|||
msgid "Parent Message (Original)" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: code:addons/mail_move_message/mail_move_message_models.py:107 |
|||
#, python-format |
|||
msgid "Record" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,res_id:0 |
|||
msgid "Record ID" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,model_id:0 |
|||
msgid "Record type" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_from_res_id:0 |
|||
msgid "Related Document ID (Original)" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_from_model:0 |
|||
msgid "Related Document Model (Original)" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#. openerp-web |
|||
#: code:addons/mail_move_message/static/src/js/mail_move_message.js:17 |
|||
#, python-format |
|||
msgid "Relocate Message" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,parent_id:0 |
|||
msgid "Search by name" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: help:mail.message,moved_by_message_id:0 |
|||
msgid "Top message, that initate moving this message" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "You cannot move this message. It was already moved with a message bellow. Open one and apply changes there." |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: help:mail_move_message.wizard,model_id:0 |
|||
msgid "List available Models is configured at Settings\Technical\Emails\Mail Relocation. Empty for unassigned email" |
|||
msgstr "" |
|||
|
|||
#. module: mail_move_message |
|||
#: help:mail_move_message.wizard,filter_by_partner:0 |
|||
msgid "Show only records with the same partner as email author" |
|||
msgstr "" |
@ -0,0 +1,160 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_move_message |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 8.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2015-08-11 06:53+0000\n" |
|||
"PO-Revision-Date: 2015-08-11 08:58+0200\n" |
|||
"Last-Translator: Matjaz Mozetic <m.mozetic@matmoz.si>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: 8bit\n" |
|||
"Plural-Forms: \n" |
|||
"Language: sl\n" |
|||
"X-Generator: Poedit 1.8.2\n" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Cancel" |
|||
msgstr "Preklic" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,create_uid:0 |
|||
msgid "Created by" |
|||
msgstr "Ustvaril" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,create_date:0 |
|||
msgid "Created on" |
|||
msgstr "Ustvarjeno" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,id:0 |
|||
msgid "ID" |
|||
msgstr "ID" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,is_moved:0 |
|||
msgid "Is moved" |
|||
msgstr "Je premaknjeno" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,write_uid:0 |
|||
msgid "Last Updated by" |
|||
msgstr "Zadnjič posodobil" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,write_date:0 |
|||
msgid "Last Updated on" |
|||
msgstr "Zadnjič posodobljeno" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,record_url:0 |
|||
msgid "Link to record" |
|||
msgstr "Povezava do zapisa" |
|||
|
|||
#. module: mail_move_message |
|||
#: model:ir.model,name:mail_move_message.model_mail_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
#: field:mail_move_message.wizard,message_id:0 |
|||
msgid "Message" |
|||
msgstr "Sporočilo" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Move" |
|||
msgstr "Premik" |
|||
|
|||
#. module: mail_move_message |
|||
#: help:mail_move_message.wizard,move_back:0 |
|||
msgid "Move message and submessages to original place" |
|||
msgstr "Premik sporočila in podrejenih sporočil na izvorno mesto" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Move Message" |
|||
msgstr "Premik sporočila" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,move_back:0 |
|||
msgid "Move to origin" |
|||
msgstr "Premik na izvor" |
|||
|
|||
#. module: mail_move_message |
|||
#. openerp-web |
|||
#: code:addons/mail_move_message/static/src/xml/mail_move_message_main.xml:5 |
|||
#, python-format |
|||
msgid "Move to thread" |
|||
msgstr "Premik v nit" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_by_message_id:0 |
|||
msgid "Moved by message" |
|||
msgstr "Premaknjeno s sporočilom" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_by_user_id:0 |
|||
msgid "Moved by user" |
|||
msgstr "Premaknil uporabnik" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "Open message" |
|||
msgstr "Odpri sporočilo" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_from_parent_id:0 |
|||
msgid "Parent Message (Original)" |
|||
msgstr "Nadrejeno sporočilo (original)" |
|||
|
|||
#. module: mail_move_message |
|||
#: code:addons/mail_move_message/mail_move_message_models.py:107 |
|||
#, python-format |
|||
msgid "Record" |
|||
msgstr "Zapis" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,res_id:0 |
|||
msgid "Record ID" |
|||
msgstr "ID zapisa" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,model_id:0 |
|||
msgid "Record type" |
|||
msgstr "Tip zapisa" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_from_res_id:0 |
|||
msgid "Related Document ID (Original)" |
|||
msgstr "ID povezanega dokumenta (original)" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail.message,moved_from_model:0 |
|||
msgid "Related Document Model (Original)" |
|||
msgstr "Model povezanega dokumenta (original)" |
|||
|
|||
#. module: mail_move_message |
|||
#. openerp-web |
|||
#: code:addons/mail_move_message/static/src/js/mail_move_message.js:17 |
|||
#, python-format |
|||
msgid "Relocate Message" |
|||
msgstr "Premik sporočila" |
|||
|
|||
#. module: mail_move_message |
|||
#: field:mail_move_message.wizard,parent_id:0 |
|||
msgid "Search by name" |
|||
msgstr "Iskanje po nazivu" |
|||
|
|||
#. module: mail_move_message |
|||
#: help:mail.message,moved_by_message_id:0 |
|||
msgid "Top message, that initate moving this message" |
|||
msgstr "Zgornje sporočilo, ki je sprožilo premik tega sporočila" |
|||
|
|||
#. module: mail_move_message |
|||
#: view:mail_move_message.wizard:mail_move_message.view_wizard |
|||
msgid "You cannot move this message. It was already moved with a message bellow. Open one and apply changes there." |
|||
msgstr "Tega sporočila ne morete premakniti, ker je bilo že premaknjeno s spodnjim sporočilom. Tam lahko uveljavljate spremembe." |
Before Width: 750 | Height: 400 | Size: 90 KiB After Width: 1054 | Height: 562 | Size: 85 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue