Skip to Content
Menu
This question has been flagged
1537 Views

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 :    

        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 contract.xml file :  






Report title


This object's name is





















and here is the models.py and the contract.py in case you want to have an idea about the models:

models.py file :   

class permanentinitiative(models.Model):
_inherit = 'hr.employee'
contract.py file :   

from odoo import models, fields


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)
I will be grateful if you can help me with this matter and give me hints to solve the problem. Thank you.    
Avatar
Discard
Related Posts Replies Views Activity
2
Sep 23
2104
1
Dec 22
1079
3
Nov 22
2885
1
Nov 22
2948
1
May 22
2651