Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I want to create a one2one relation in two objects of openerp
I know that one2one relation has been depricated from OpenERP version>5
While searching over internet found following two links helpful for the same :
http://tutorialopenerp.wordpress.com/2014/04/23/one2one/ (don't know the language in which it's written but example is more than enough to explain)
So there are two methods to achieve one2one relation:
1) using inheritance by deligation and
2) using many2one fields in both the objects. For example 'employee_medical_detail_id':fields.many2one('hr.employee.medical.details', 'Medical Details') in hr_employee object
'employee_id':fields.many2one('hr.employee', 'Employee') in hr.employee.medical.details object
Questions : 1) When will we use one method over the other to achieve one2one functionality
2) Because i want to make one2one relationship and would like to show customized form directly instead of any 'Add an item' button. How can I do this in view file? so that only one entry is added?
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/9/14, 5:31 AM|
|Seen: 7165 times|
|Last updated: 11/18/15, 6:35 AM|