From 81573380c853dae4aa0539099d4c188b592fabef Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Wed, 8 Dec 2021 07:56:32 +0100 Subject: [PATCH] :x: delete unmaintained modules :cry: --- mail_partner_lang/README.rst | 29 ------ mail_partner_lang/__init__.py | 2 - mail_partner_lang/__openerp__.py | 13 --- mail_partner_lang/doc/changelog.rst | 4 - mail_partner_lang/doc/index.rst | 13 --- mail_partner_lang/models.py | 88 ------------------ mail_partner_lang/static/description/icon.png | Bin 2140 -> 0 bytes 7 files changed, 149 deletions(-) delete mode 100644 mail_partner_lang/README.rst delete mode 100644 mail_partner_lang/__init__.py delete mode 100644 mail_partner_lang/__openerp__.py delete mode 100644 mail_partner_lang/doc/changelog.rst delete mode 100644 mail_partner_lang/doc/index.rst delete mode 100644 mail_partner_lang/models.py delete mode 100644 mail_partner_lang/static/description/icon.png diff --git a/mail_partner_lang/README.rst b/mail_partner_lang/README.rst deleted file mode 100644 index 3f6e864..0000000 --- a/mail_partner_lang/README.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. image:: https://itpp.dev/images/infinity-readme.png - :alt: Tested and maintained by IT Projects Labs - :target: https://itpp.dev - -============================== - Use partner language in mail -============================== - - FIXME: there is issue with frozen dict in new odoo. - -Questions? -========== - -To get an assistance on this module contact us by email :arrow_right: help@itpp.dev - -Contributors -============ -* `Ivan Yelizariev `__ - - - The module is not maintained since Odoo 9.0. - -Further information -=================== - -Odoo Apps Store: https://apps.odoo.com/apps/modules/8.0/mail_partner_lang/ - - -Tested on `Odoo 8.0 `_ diff --git a/mail_partner_lang/__init__.py b/mail_partner_lang/__init__.py deleted file mode 100644 index a0fdc10..0000000 --- a/mail_partner_lang/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -from . import models diff --git a/mail_partner_lang/__openerp__.py b/mail_partner_lang/__openerp__.py deleted file mode 100644 index b8b50ae..0000000 --- a/mail_partner_lang/__openerp__.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -{ - 'name': 'Use partner language in mail', - 'version': '1.0.0', - 'author': 'IT-Projects LLC, Ivan Yelizariev', - 'license': 'GPL-3', - "category": "Discuss", - 'website': 'https://yelizariev.github.io', - - 'depends': ['mail'], - 'data': [], - 'installable': False, -} diff --git a/mail_partner_lang/doc/changelog.rst b/mail_partner_lang/doc/changelog.rst deleted file mode 100644 index 9ee2b48..0000000 --- a/mail_partner_lang/doc/changelog.rst +++ /dev/null @@ -1,4 +0,0 @@ -`1.0.0` -------- - -- Init version diff --git a/mail_partner_lang/doc/index.rst b/mail_partner_lang/doc/index.rst deleted file mode 100644 index dd13d0a..0000000 --- a/mail_partner_lang/doc/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -============================== - Use partner language in mail -============================== - -Installation -============ - -* `Install `__ this module in a usual way - -Configuration -============= - -This module do not need any special configuration. diff --git a/mail_partner_lang/models.py b/mail_partner_lang/models.py deleted file mode 100644 index d4e37a2..0000000 --- a/mail_partner_lang/models.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -from openerp.osv import osv - - -class MailThread(osv.Model): - _inherit = "mail.thread" - - def message_track(self, cr, uid, ids, tracked_fields, initial_values, context={}): - - def convert_for_display(value, col_info): - if not value and col_info['type'] == 'boolean': - return 'False' - if not value: - return '' - if col_info['type'] == 'many2one': - return value.name_get()[0][1] - if col_info['type'] == 'selection': - return dict(col_info['selection'])[value] - return value - - def format_message(message_description, tracked_values): - message = '' - if message_description: - message = '%s' % message_description - for name, change in tracked_values.items(): - message += '
    • %s: ' % change.get('col_info') - if change.get('old_value'): - message += '%s → ' % change.get('old_value') - message += '%s
' % change.get('new_value') - return message - - if not tracked_fields: - return True - - update_fields = [f for f in tracked_fields] - - for browse_record in self.browse(cr, uid, ids, context=context): - p = getattr(browse_record, 'partner_id', None) - if p: - browse_record._context.update({'lang': p.lang}) - - initial = initial_values[browse_record.id] - changes = set() - tracked_values = {} - - # update translation - tracked_fields = self._get_tracked_fields(cr, uid, update_fields, browse_record._context) - - # generate tracked_values data structure: {'col_name': {col_info, new_value, old_value}} - for col_name, col_info in tracked_fields.items(): - initial_value = initial[col_name] - record_value = getattr(browse_record, col_name) - - if record_value == initial_value and getattr(self._all_columns[col_name].column, 'track_visibility', None) == 'always': - tracked_values[col_name] = dict(col_info=col_info['string'], - new_value=convert_for_display(record_value, col_info)) - elif record_value != initial_value and (record_value or initial_value): # because browse null != False - if getattr(self._all_columns[col_name].column, 'track_visibility', None) in ['always', 'onchange']: - tracked_values[col_name] = dict(col_info=col_info['string'], - old_value=convert_for_display(initial_value, col_info), - new_value=convert_for_display(record_value, col_info)) - if col_name in tracked_fields: - changes.add(col_name) - if not changes: - continue - - # find subtypes and post messages or log if no subtype found - subtypes = [] - for field, track_info in self._track.items(): - if field not in changes: - continue - for subtype, method in track_info.items(): - if method(self, cr, uid, browse_record, context): - subtypes.append(subtype) - - posted = False - for subtype in subtypes: - subtype_rec = self.pool.get('ir.model.data').xmlid_to_object(cr, uid, subtype, context=context) - if not (subtype_rec and subtype_rec.exists()): - _logger.debug('subtype %s not found' % subtype) - continue - message = format_message(subtype_rec.description if subtype_rec.description else subtype_rec.name, tracked_values) - self.message_post(cr, uid, browse_record.id, body=message, subtype=subtype, context=context) - posted = True - if not posted: - message = format_message('', tracked_values) - self.message_post(cr, uid, browse_record.id, body=message, context=context) - return True diff --git a/mail_partner_lang/static/description/icon.png b/mail_partner_lang/static/description/icon.png deleted file mode 100644 index 79f7d8fe294f838cf2996940c40dc08dde60642f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2140 zcmV-i2&4CjP)=D+Wys1fe}G$Q#Z2832St25n<}h#$%L7sUBHn zgVlR~4gtNOs+KA#@5q|?_&of{fCW3h;+eI-@is^))^C>Ap=O06Yq-$?c7APo?&VKv z))(zizAhAwtYInZ&irDhM>SGBFM>?d${LzoxNVMo=er+dj|dVX82(itvPy&nJI7R} zxal|{b!VXeY~=?NW24HG!g#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