Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2104 Lượt xem

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.    
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 23
3845
1
thg 12 22
2152
3
thg 11 22
4350
1
thg 11 22
4655
1
thg 5 22
3959