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

Hello,
I'm currently working to change some fields in the purchase.requisition. I want to instead of adding data to 'data_end' added to 'scheduled_data' date field. So in my module, i'm inheriting like this

in _openrp__.py

'depends': ['purchase_requisition']
and in model file

class purchase_req(models.Model):
     _name = 'purchase.requisition'
     _inherit = 'purchase.requisition'

but it gives me this error:

File "/home/user/odoo/openerp/models.py", line 603, in _build_model
    'You may need to add a dependency on the parent class\' module.' % (name, parent))
TypeError: The model "purchase_requisitiont" specifies an unexisting parent class "purchase_requisition"
You may need to add a dependency on the parent class' module.
So, if you will help me I'll be very happy

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

I fixed it :D there was not any problem in lines which i mentioned here :D I was using wrong field name one "d" was extra in name so It was very stupid mistake :D

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 17
3425
2
เม.ย. 18
3578
1
ก.พ. 17
4075
0
มิ.ย. 16
2851
5
ต.ค. 23
7895