تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2088 أدوات العرض

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.    
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
سبتمبر 23
3837
1
ديسمبر 22
2145
3
نوفمبر 22
4339
1
نوفمبر 22
4649
1
مايو 22
3953