[FIX] report*: fix missing import from backport #7a1d2d1c4caebba5bd69d63cff3d7824dfd5a7a6
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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', []))
|
||||
|
||||
@@ -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', []))
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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'] = {}
|
||||
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user