Hello everybody, I have a problem with report printing whenever I press the print button to print the contract, it gives me this error :
File "/usr/lib/python3.8/mimetypes.py", line 116, in guess_type url = os.fspath(url) TypeError: expected str, bytes or os.PathLike object, not bool
Here is the report.xml file :
and here is the contract.xml file :id="report_contract"
model="hr.contract"
string="contract Report"
name="permanentinitiative.contract_report"
file="permanentinitiative.contract_report"
report_type="qweb-pdf"
attachment="True"
/>
and here is the models.py and the contract.py in case you want to have an idea about the models:
Report title
This object's name is
models.py file :
class permanentinitiative(models.Model):contract.py file :
_inherit = 'hr.employee'
from odoo import models, fieldsI will be grateful if you can help me with this matter and give me hints to solve the problem. Thank you.
class HrContract(models.Model):
_inherit = "hr.contract"
term_ids = fields.One2many('hr.contract.type.term', 'contract_type_id')
class HrContractTypeTerm(models.Model):
_name = 'hr.contract.type.term'
_description = 'Employee Contract Types Terms'
contract_type_id = fields.Many2one('hr.contract.type')
sequence = fields.Integer(default=10)
name = fields.Char(required=True)
body = fields.Text(required=True)