Browse Source

[FIX] 8.0-travis-fix (#58)

* [FIX] CamelCase

* [FIX] Changing signs of the tabs to 4 spaces

* [FIX] relative-import

* [FIX] delete unused imports

* [FIX] delete prints

* [FIX] lint for js

* [FIX] Duplicate implicit target name: "changelog"

* [FIX] links in rst files

* [FIX] flake8 E115

* [FIX] pylint E1124

* [FIX] pylint W1401
pull/63/head
manawi 8 years ago
committed by Ivan Yelizariev
parent
commit
c2b3905a87
  1. 4
      mail_all/README.rst
  2. 4
      mail_all/doc/changelog.rst
  3. 4
      mail_check_immediately/doc/changelog.rst
  4. 2
      mail_delete_access_link/mail_delete_access_link.py
  5. 2
      mail_delete_sent_by_footer/mail_delete_sent_by_footer.py
  6. 4
      mail_fix_553/mail_fix_553.py
  7. 4
      mail_fix_empty_body/models.py
  8. 4
      mail_move_message/doc/changelog.rst
  9. 18
      mail_move_message/mail_move_message_models.py
  10. 6
      mail_outgoing/mail_outgoing_models.py
  11. 2
      mail_partner_lang/models.py
  12. 6
      mail_private/README.rst
  13. 2
      mail_private/__init__.py
  14. 4
      mail_private/doc/changelog.rst
  15. 4
      mail_private/models.py
  16. 10
      mail_private/static/src/js/mail_private.js
  17. 8
      mail_private/static/src/xml/mail_private.xml
  18. 6
      mail_recovery/README.rst
  19. 4
      mail_recovery/doc/changelog.rst
  20. 4
      mail_sent/doc/changelog.rst
  21. 8
      mail_sent/models.py
  22. 2
      mail_wall_menu/static/lib/masonry.pkgd.min.js
  23. 8
      mail_wall_menu/static/src/js/mail_wall_menu.js
  24. 8
      mail_wall_widgets/models.py
  25. 2
      res_partner_mails_count/models.py
  26. 4
      res_partner_mails_count/tests/test_phantom.py
  27. 6
      res_partner_strip_email/models.py

4
mail_all/README.rst

@ -9,8 +9,8 @@ Further information
HTML Description: https://apps.odoo.com/apps/modules/8.0/mail_all/
Usage instructions: `<doc/index.rst>`__
Usage instructions: `<doc/index.rst>`___
Changelog: `<doc/changelog.rst>`__
Changelog: `<doc/changelog.rst>`___
Tested on Odoo 8.0 0af32f3f84bae07b11abb8538d02e35c7369a348

4
mail_all/doc/changelog.rst

@ -1,5 +1,5 @@
Changelog
=========
Updates
=======
`1.0.0`
-------

4
mail_check_immediately/doc/changelog.rst

@ -1,7 +1,7 @@
.. _changelog:
Changelog
=========
Updates
=======
`1.0.1`
-------

2
mail_delete_access_link/mail_delete_access_link.py

@ -2,7 +2,7 @@
from openerp.osv import osv
class mail_mail(osv.Model):
class MailMail(osv.Model):
_inherit = 'mail.mail'
def _get_partner_access_link(self, cr, uid, mail, partner=None, context=None):

2
mail_delete_sent_by_footer/mail_delete_sent_by_footer.py

@ -3,7 +3,7 @@ from openerp.osv import osv
from openerp import tools, SUPERUSER_ID
class mail_notification(osv.Model):
class MailNotification(osv.Model):
_inherit = 'mail.notification'
def get_signature_footer(self, cr, uid, user_id, res_model=None, res_id=None, context=None, user_signature=True):

4
mail_fix_553/mail_fix_553.py

@ -15,7 +15,7 @@ from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
class mail_mail(osv.Model):
class MailMail(osv.Model):
_inherit = "mail.mail"
def send(self, cr, uid, ids, auto_commit=False, raise_exception=False, context=None):
@ -40,7 +40,7 @@ class mail_mail(osv.Model):
catchall_alias_name = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.name_alias_from", context=context)
catchall_domain = self.pool['ir.config_parameter'].get_param(cr, uid, "mail.catchall.domain", context=context)
correct_email_from = '@%s>?\s*$' % catchall_domain
correct_email_from = r'@%s>?\s*$' % catchall_domain
default_email_from = '%s@%s' % (catchall_alias, catchall_domain)
context = dict(context or {})

4
mail_fix_empty_body/models.py

@ -2,11 +2,11 @@
from openerp import models
class mail_compose_message(models.TransientModel):
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def get_mail_values(self, cr, uid, wizard, res_ids, context=None):
res = super(mail_compose_message, self).get_mail_values(cr, uid, wizard, res_ids, context)
res = super(MailComposeMessage, self).get_mail_values(cr, uid, wizard, res_ids, context)
for id, d in res.iteritems():
d['body'] = d.get('body') or ''
return res

4
mail_move_message/doc/changelog.rst

@ -1,7 +1,7 @@
.. _changelog:
Changelog
=========
Updates
=======
`1.0.4`
-------

18
mail_move_message/mail_move_message_models.py

@ -4,7 +4,7 @@ from openerp.tools import email_split
from openerp.tools.translate import _
class wizard(models.TransientModel):
class Wizard(models.TransientModel):
_name = 'mail_move_message.wizard'
def _model_selection(self):
@ -26,7 +26,7 @@ class wizard(models.TransientModel):
@api.model
def default_get(self, fields_list):
res = super(wizard, self).default_get(fields_list)
res = super(Wizard, self).default_get(fields_list)
model_fields = self.fields_get()
if model_fields['model']['selection']:
@ -231,7 +231,7 @@ class wizard(models.TransientModel):
return {'type': 'ir.actions.act_window_close'}
class mail_message(models.Model):
class MailMessage(models.Model):
_inherit = 'mail.message'
is_moved = fields.Boolean('Is moved')
@ -300,7 +300,7 @@ class mail_message(models.Model):
r_vals['parent_id'] = r.moved_from_parent_id.id
r_vals['res_id'] = r.moved_from_res_id
r_vals['model'] = r.moved_from_model
print 'update message', r, r_vals
# print 'update message', r, r_vals
if move_followers:
r.sudo().move_followers(r_vals.get('model'), r_vals.get('res_id'))
r.sudo().write(r_vals)
@ -311,7 +311,7 @@ class mail_message(models.Model):
def name_get(self, cr, uid, ids, context=None):
if not (context or {}).get('extended_name'):
return super(mail_message, self).name_get(cr, uid, ids, context=context)
return super(MailMessage, self).name_get(cr, uid, ids, context=context)
if isinstance(ids, (list, tuple)) and not len(ids):
return []
if isinstance(ids, (long, int)):
@ -325,12 +325,12 @@ class mail_message(models.Model):
return res
def _message_read_dict(self, cr, uid, message, parent_id=False, context=None):
res = super(mail_message, self)._message_read_dict(cr, uid, message, parent_id, context)
res = super(MailMessage, self)._message_read_dict(cr, uid, message, parent_id, context)
res['is_moved'] = message.is_moved
return res
class mail_move_message_configuration(models.TransientModel):
class MailMoveMessageConfiguration(models.TransientModel):
_name = 'mail_move_message.config.settings'
_inherit = 'res.config.settings'
@ -361,12 +361,12 @@ class mail_move_message_configuration(models.TransientModel):
config_parameters.set_param('mail_relocation_move_followers', record.move_followers or '')
class res_partner(models.Model):
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.model
def create(self, vals):
res = super(res_partner, self).create(vals)
res = super(ResPartner, self).create(vals)
if 'update_message_author' in self.env.context and 'email' in vals:
mail_message_obj = self.env['mail.message']
# Escape special SQL characters in email_address to avoid invalid matches

6
mail_outgoing/mail_outgoing_models.py

@ -2,7 +2,7 @@
from openerp.osv import osv
class mail_message(osv.Model):
class MailMessage(osv.Model):
_inherit = 'mail.message'
def check_access_rule(self, cr, uid, ids, operation, context=None):
@ -13,10 +13,10 @@ class mail_message(osv.Model):
if user_groups.issuperset(group_all_emails):
return
return super(mail_message, self).check_access_rule(cr, uid, ids, operation, context)
return super(MailMessage, self).check_access_rule(cr, uid, ids, operation, context)
class mail_mail(osv.Model):
class MailMail(osv.Model):
_name = 'mail.mail'
_inherit = ['mail.mail', 'ir.needaction_mixin']
_needaction = True

2
mail_partner_lang/models.py

@ -2,7 +2,7 @@
from openerp.osv import osv
class mail_thread(osv.Model):
class MailThread(osv.Model):
_inherit = "mail.thread"
def message_track(self, cr, uid, ids, tracked_fields, initial_values, context={}):

6
mail_private/README.rst

@ -13,7 +13,7 @@ Contributors
Sponsors
--------
* `IT-Projects LLC <https://it-projects.info>`_
* `IT-Projects LLC <https://it-projects.info>`__
Further information
===================
@ -22,8 +22,8 @@ Demo: http://runbot.it-projects.info/demo/mail-addons/8.0
HTML Description: https://apps.odoo.com/apps/modules/8.0/mail_private/
Usage instructions: `<doc/index.rst>`_
Usage instructions: `<doc/index.rst>`__
Changelog: `<doc/changelog.rst>`_
Changelog: `<doc/changelog.rst>`__
Tested on Odoo 8.0 0af32f3f84bae07b11abb8538d02e35c7369a348

2
mail_private/__init__.py

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
import models
from . import models

4
mail_private/doc/changelog.rst

@ -1,5 +1,5 @@
Changelog
=========
Updates
=======
`1.0.0`
-------

4
mail_private/models.py

@ -1,11 +1,9 @@
# -*- coding: utf-8 -*-
from openerp import api
from openerp.osv import osv, fields
from openerp import SUPERUSER_ID
class mail_compose_message(osv.TransientModel):
class MailComposeMessage(osv.TransientModel):
_inherit = 'mail.compose.message'
_columns = {

10
mail_private/static/src/js/mail_private.js

@ -52,7 +52,7 @@ openerp.mail_private = function(instance){
};
self.do_action(action, {
'on_close': function(){ !self.parent_thread.options.view_inbox && self.parent_thread.message_fetch() }
'on_close': function(){ !self.parent_thread.options.view_inbox && self.parent_thread.message_fetch(); }
});
self.on_cancel();
});
@ -75,10 +75,10 @@ openerp.mail_private = function(instance){
'content_subtype': 'plaintext',
};
if (log || self.private) {
values['subtype'] = false;
values.subtype = false;
}
else {
values['subtype'] = 'mail.mt_comment';
values.subtype = 'mail.mt_comment';
}
this.parent_thread.ds_thread._model.call('message_post', [this.context.default_res_id], values).done(function (message_id) {
var thread = self.parent_thread;
@ -128,7 +128,7 @@ openerp.mail_private = function(instance){
'name': parsed_email[0],
'email_address': parsed_email[1],
'reason': recipient[2],
})
});
}
});
});
@ -141,7 +141,7 @@ openerp.mail_private = function(instance){
if (!r.partner_id){
r.checked = false;
}
})
});
// when call for suggested partners finished: re-render the widget
$.when(suggested_partners).pipe(function (additional_recipients) {

8
mail_private/static/src/xml/mail_private.xml

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
<t t-extend="mail.compose_message">
<t t-jquery="a[title='Send a message to all followers of the document']" t-operation="after">
<span class="oe_grey oe_sep_word">or</span><a class="oe_compose_post_private" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox" title="Send a message to specified recipients only">Send internal message</a>
</t>
</t>
<t t-jquery="a[title='Send a message to all followers of the document']" t-operation="after">
<span class="oe_grey oe_sep_word">or</span><a class="oe_compose_post_private" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox" title="Send a message to specified recipients only">Send internal message</a>
</t>
</t>
<t t-extend="mail.thread.list_recipients">
<t t-jquery="[t-if='!widget.is_private']" t-operation="replace">
<t t-if="!widget.is_private and !widget.private">

6
mail_recovery/README.rst

@ -18,7 +18,7 @@ Contributors
Sponsors
--------
* `IT-Projects LLC <https://it-projects.info>`__
* `IT-Projects LLC <https://it-projects.info>`___
Further information
===================
@ -27,8 +27,8 @@ Demo: http://runbot.it-projects.info/demo/mail-addons/8.0
HTML Description: https://apps.odoo.com/apps/modules/8.0/mail_recovery/
Usage instructions: `<doc/index.rst>`__
Usage instructions: `<doc/index.rst>`___
Changelog: `<doc/changelog.rst>`__
Changelog: `<doc/changelog.rst>`___
Tested on Odoo 8.0 17a130428516d9dd8105f90e8c9a65a0b4e8901b

4
mail_recovery/doc/changelog.rst

@ -1,5 +1,5 @@
Changelog
=========
Updates
=======
`1.0.0`
-------

4
mail_sent/doc/changelog.rst

@ -1,7 +1,7 @@
.. _changelog:
Changelog
=========
Updates
=======
`1.0.2`
-------

8
mail_sent/models.py

@ -2,7 +2,7 @@
from openerp import api, models, fields
class mail_message(models.Model):
class MailMessage(models.Model):
_inherit = 'mail.message'
@api.one
@ -14,15 +14,15 @@ class mail_message(models.Model):
sent = fields.Boolean('Sent', compute=_get_sent, help='Was message sent to someone', store=True)
class mail_notification(models.Model):
class MailNotification(models.Model):
_inherit = 'mail.notification'
def _notify(self, cr, uid, message_id, **kwargs):
super(mail_notification, self)._notify(cr, uid, message_id, **kwargs)
super(MailNotification, self)._notify(cr, uid, message_id, **kwargs)
self.pool['mail.message'].browse(cr, uid, message_id)._get_sent()
class mail_compose_message(models.TransientModel):
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
sent = fields.Boolean('Sent', help='dummy field to fix inherit error')

2
mail_wall_menu/static/lib/masonry.pkgd.min.js
File diff suppressed because it is too large
View File

8
mail_wall_menu/static/src/js/mail_wall_menu.js

@ -21,16 +21,16 @@ openerp.mail_wall_menu = function(instance){
update = 0;
msnry.reloadItems();
msnry.layout();
}, 1000)
}, 1000);
return;
}
this._super.apply(this, arguments)
this._super.apply(this, arguments);
},
destroy: function(){
clearInterval(this.msnry_interval);
this._super.apply(this, arguments);
}
})
}
});
};

8
mail_wall_widgets/models.py

@ -17,7 +17,7 @@ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
class mail_wall_widgets_widget(models.Model):
class MailWallWidgetsWidget(models.Model):
_name = 'mail.wall.widgets.widget'
_order = "sequence, id"
@ -229,7 +229,7 @@ Slice - use "domain" for total and "won_domain" for target
return res
class mail_wall_widgets_cache(models.Model):
class MailWallWidgetsCache(models.Model):
_name = 'mail.wall.widgets.cache'
cache = fields.Text('Cached data')
@ -238,12 +238,12 @@ class mail_wall_widgets_cache(models.Model):
user_id = fields.Many2one('res.users')
class res_users(models.Model):
class ResUsers(models.Model):
_inherit = 'res.users'
@api.v7
def get_serialised_mail_wall_widgets_summary(self, cr, uid, excluded_categories=None, context=None):
return self._get_serialised_mail_wall_widgets_summary(cr, uid, uid, excluded_categories=excluded_categories, context=context)[0]
return self._get_serialised_mail_wall_widgets_summary(cr, uid, uid, excluded_categories, context=context)[0]
@api.one
def _get_serialised_mail_wall_widgets_summary(self, excluded_categories=None):

2
res_partner_mails_count/models.py

@ -3,7 +3,7 @@
from openerp import models, fields, api
class res_partner(models.Model):
class ResPartner(models.Model):
_inherit = 'res.partner'
mails_to = fields.Integer(compute="_mails_to")
mails_from = fields.Integer(compute="_mails_from")

4
res_partner_mails_count/tests/test_phantom.py

@ -7,8 +7,8 @@ import openerp.tests
class TestUi(openerp.tests.HttpCase):
# TODO test returns error "Timeout after 10000 ms"
# def test_01_res_partner_mails_to_count(self):
# self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
# def test_01_res_partner_mails_to_count(self):
# self.phantom_js('/', "openerp.Tour.run('mails_count_tour', 'test')", "openerp.Tour.tours.mails_count_tour", login="admin")
def test_02_res_partner_mails_from_count(self):
# wait till page loaded and then click and wait again

6
res_partner_strip_email/models.py

@ -4,18 +4,18 @@ from openerp import api
from openerp import models
class res_partner_strip_email(models.Model):
class ResPartnerStripEmail(models.Model):
_inherit = 'res.partner'
@api.one
def write(self, vals):
vals = self._check_email_field(vals)
return super(res_partner_strip_email, self).write(vals)
return super(ResPartnerStripEmail, self).write(vals)
@api.model
def create(self, vals):
vals = self._check_email_field(vals)
return super(res_partner_strip_email, self).create(vals)
return super(ResPartnerStripEmail, self).create(vals)
def _check_email_field(self, vals):
if vals.get('email'):

Loading…
Cancel
Save