Browse Source

[MIG] privacy_partner_report: Migration to 10.0

pull/19/head
mreficent 6 years ago
committed by Aaron Henriquez
parent
commit
d0ca4e09de
  1. 2
      privacy_partner_report/README.rst
  2. 2
      privacy_partner_report/__manifest__.py
  3. 6
      privacy_partner_report/controllers/main.py
  4. 4
      privacy_partner_report/report/privacy_partner_xlsx.py
  5. 16
      privacy_partner_report/wizard/privacy_report_partner.py

2
privacy_partner_report/README.rst

@ -21,7 +21,7 @@ To use this module, you need to:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/263/9.0
:target: https://runbot.odoo-community.org/runbot/263/10.0
Known issues / Roadmap
======================

2
privacy_partner_report/__openerp__.py → privacy_partner_report/__manifest__.py

@ -3,7 +3,7 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Privacy Partner Report',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'category': 'GDPR',
'summary': 'Show the transactions that a specific partner is involved in.',
'author': "Eficent, "

6
privacy_partner_report/controllers/main.py

@ -2,10 +2,10 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
import json
from openerp import http
from odoo import http
from openerp.addons.web.controllers.main import serialize_exception
from openerp.addons.web.controllers.main import Reports
from odoo.addons.web.controllers.main import serialize_exception
from odoo.addons.web.controllers.main import Reports
class ReportsExtended(Reports):

4
privacy_partner_report/report/privacy_partner_xlsx.py

@ -3,8 +3,8 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
import logging
from openerp.report import report_sxw
from openerp.tools.translate import _
from odoo.report import report_sxw
from odoo.tools.translate import _
_logger = logging.getLogger(__name__)

16
privacy_partner_report/wizard/privacy_report_partner.py

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import api, fields, models, _
from openerp.osv import fields as old_fields
from openerp.exceptions import UserError
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class PrivacyPartnerReport(models.TransientModel):
@ -123,17 +122,6 @@ class PrivacyPartnerReport(models.TransientModel):
def _exclude_column(self, model, column):
# To remove in v10:
# (non-stored function fields should have _fnct_search)
column_info = self.env[model]._columns.get(column)
next_model = self.env[model]
while not column_info and column in next_model._inherit_fields:
next_model = self.env[next_model._inherit_fields[column][0]]
column_info = next_model._columns.get(column)
if isinstance(column_info, old_fields.function) \
and not column_info.store and not column_info._fnct_search:
return True
# https://github.com/odoo/odoo/issues/24927
if model in ('mail.compose.message', 'survey.mail.compose.message'):
if column in ('needaction_partner_ids', 'starred_partner_ids'):

Loading…
Cancel
Save