Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

[Odoo 8] How to inherit purchase.requisition correctly

By
Dachi Darchiashvili
on 3/11/16, 5:56 AM 344 views

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

0
Dachi Darchiashvili
On 3/11/16, 7:45 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/11/16, 5:56 AM
Seen: 344 times
Last updated: 3/24/16, 2:54 AM