Initial commit
This commit is contained in:
19
pdf_print_preview/models/ir_http.py
Normal file
19
pdf_print_preview/models/ir_http.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models
|
||||
|
||||
class Http(models.AbstractModel):
|
||||
_inherit = "ir.http"
|
||||
|
||||
def session_info(self):
|
||||
result = super(Http, self).session_info()
|
||||
|
||||
user = self.env.user
|
||||
|
||||
result.update({
|
||||
"preview_print": user.preview_print,
|
||||
"automatic_printing": user.automatic_printing,
|
||||
"report_layout": bool(user.company_id.external_report_layout_id)
|
||||
})
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user