From df135166799ccafd49c2aa684bb0ff845af31b09 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 20 Jul 2017 16:26:12 +0200 Subject: [PATCH] [FIX] report*: fix missing import from backport #7a1d2d1c4caebba5bd69d63cff3d7824dfd5a7a6 --- addons/account/report/account_aged_partner_balance.py | 2 +- addons/account/report/account_balance.py | 4 ++-- addons/account/report/account_general_ledger.py | 4 ++-- addons/account/report/account_journal.py | 4 ++-- addons/account/report/account_partner_ledger.py | 4 ++-- addons/account/report/account_report_financial.py | 4 ++-- addons/hr_holidays/report/holidays_summary_report.py | 4 ++-- addons/hr_payroll/report/report_contribution_register.py | 4 ++-- .../report/report_hr_salary_employee_bymonth.py | 4 ++-- .../report/report_hr_yearly_salary_detail.py | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py index b9bef25dfeb..0128c6c8b35 100644 --- a/addons/account/report/account_aged_partner_balance.py +++ b/addons/account/report/account_aged_partner_balance.py @@ -198,7 +198,7 @@ class ReportAgedPartnerBalance(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form') or not self.env.context.get('active_model') or not self.env.context.get('active_id'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) total = [] model = self.env.context.get('active_model') diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index fccc60e7680..61ece9107d4 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import time -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError @@ -61,7 +61,7 @@ class ReportTrialBalance(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form') or not self.env.context.get('active_model'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) self.model = self.env.context.get('active_model') docs = self.env[self.model].browse(self.env.context.get('active_ids', [])) diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index f7ebf8ad451..7f58736d889 100644 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import time -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError @@ -111,7 +111,7 @@ class ReportGeneralLedger(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form') or not self.env.context.get('active_model'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) self.model = self.env.context.get('active_model') docs = self.env[self.model].browse(self.env.context.get('active_ids', [])) diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index 9dfa7807f48..83b95bccb9f 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import time -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError @@ -97,7 +97,7 @@ class ReportJournal(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) target_move = data['form'].get('target_move', 'all') sort_selection = data['form'].get('sort_selection', 'date') diff --git a/addons/account/report/account_partner_ledger.py b/addons/account/report/account_partner_ledger.py index 94d12a7bd3a..9ca5875ffa4 100644 --- a/addons/account/report/account_partner_ledger.py +++ b/addons/account/report/account_partner_ledger.py @@ -2,7 +2,7 @@ from datetime import datetime import time -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError from odoo.tools import DEFAULT_SERVER_DATE_FORMAT @@ -71,7 +71,7 @@ class ReportPartnerLedger(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) data['computed'] = {} diff --git a/addons/account/report/account_report_financial.py b/addons/account/report/account_report_financial.py index 4aacdf68108..56cafdeb3cb 100644 --- a/addons/account/report/account_report_financial.py +++ b/addons/account/report/account_report_financial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import time -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError @@ -146,7 +146,7 @@ class ReportFinancial(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form') or not self.env.context.get('active_model') or not self.env.context.get('active_id'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) self.model = self.env.context.get('active_model') docs = self.env[self.model].browse(self.env.context.get('active_id')) diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py index 1428562ed62..0118429725f 100644 --- a/addons/hr_holidays/report/holidays_summary_report.py +++ b/addons/hr_holidays/report/holidays_summary_report.py @@ -3,7 +3,7 @@ from datetime import timedelta from dateutil.relativedelta import relativedelta -from odoo import api, fields, models +from odoo import api, fields, models, _ from odoo.exceptions import UserError @@ -104,7 +104,7 @@ class HrHolidaySummaryReport(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) Report = self.env['report'] holidays_report = Report._get_report_from_name('hr_holidays.report_holidayssummary') diff --git a/addons/hr_payroll/report/report_contribution_register.py b/addons/hr_payroll/report/report_contribution_register.py index c56918c88be..d1cc532cf62 100644 --- a/addons/hr_payroll/report/report_contribution_register.py +++ b/addons/hr_payroll/report/report_contribution_register.py @@ -5,7 +5,7 @@ from datetime import datetime from dateutil.relativedelta import relativedelta -from odoo import api, fields, models +from odoo import api, fields, models, _ from odoo.exceptions import UserError @@ -31,7 +31,7 @@ class ContributionRegisterReport(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) register_ids = self.env.context.get('active_ids', []) contrib_registers = self.env['hr.contribution.register'].browse(register_ids) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py index 1cc67073146..5ece594f908 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py @@ -3,7 +3,7 @@ from datetime import date -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError @@ -95,7 +95,7 @@ class ReportHrSalaryEmployeeBymonth(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not data.get('form') or not self.env.context.get('active_model') or not self.env.context.get('active_id'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) model = self.env.context.get('active_model') docs = self.env[model].browse(self.env.context.get('active_id')) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py index bb6e2c75423..82f262c8d1f 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py @@ -3,7 +3,7 @@ from datetime import date -from odoo import api, models +from odoo import api, models, _ from odoo.exceptions import UserError @@ -129,7 +129,7 @@ class EmployeesYearlySalaryReport(models.AbstractModel): @api.model def render_html(self, docids, data=None): if not self.env.context.get('active_model') or not self.env.context.get('active_id'): - raise UserError(_("Some data are missing, this report cannot be printed.")) + raise UserError(_("Form content is missing, this report cannot be printed.")) model = self.env.context.get('active_model') docs = self.env[model].browse(self.env.context.get('active_id'))