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 9 many2one fields inside notebook on create

By
David Todd
on 11/22/16, 5:09 PM 52 views

So in this module I'm writing, I have a lot of fields (100+) and I thought it would be better to separate these fields into their own little sub modules. The main class of the module has many2one fields that point to the sub classes.

I have one form view that requires the use of all of the fields, seperated with pages in a notebook. I've found that if I put one of my many2one fields on a page, and within that field define the fields that I require, I can see them in the form. However I am not able to edit this data unless I click the many2one field itself (which I plan to have invisible eventually) and use the built in "Create and edit" option. 

How would I go about changing this to do one of the options below:

  1. When I click the create button, the module creates new records for all these many2one fields and allows me to edit them in the notebook

  2. When I click the create button, the module will require some preliminary information and when they save it, create new records for these many2one fields and allow me to edit them within the notebook

Note that I do not want to use the built-in "Create and edit" option as I need to style these fields, and the employees that I'm writing this module for require the module be very easy to use without unnecessary steps that they would have to perform.

I suspect that I will need to override the save or create functions to get this to work, which should be fine. 

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: 11/22/16, 5:09 PM
Seen: 52 times
Last updated: 11/23/16, 1:46 AM