Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
624 มุมมอง

When I try to search the starting date of fiscal year using the following code 

drp = self.env['account.fiscal.year'].sudo().search([('date_from', '=', current_date)])

This code does not work. The error is 


return self.models[model_name]

KeyError: 'account.fiscal.year'


This kind of code works for other model such as date.range. Why does it does not work for account.fiscal.year ? 

I am working on odoo v 13


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

It works ! Apology ! I don't know what was wrong before


อวตาร
ละทิ้ง