how can I edit many objects in one form?

Asked by Cuong

Hi,

I want to edit several objects in one form. Is it possible?

For ex: I have 2 class test01 (with 3 fields, a, b, c), test02 (with 3 fields d, e, f). Now I want to make a view so that I can edit data of these 2 classes (tables) at a time.

Thanks,

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Riken Bhorania (OpenERP) (rch-openerp) said :
#1

Hello Cuong,

It is possible in OpenERP.

The one of best example in OpenERP is 'Product' Form View. From the 'Product' Form View you can also edit the 'product.template' object's information.

It's little tricky but you should be used to deal with "Inheritance by Delegation" concept. (http://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/object_inherits.html)

To access/edit two different objects from one Form view use _inherits in your class definition according to your database design.
As for example, the class 'product_template' is _inherits in 'product_product' class in order to edit both object's fields in Product Form view.

Hope this will help you.

Can you help with this problem?

Provide an answer of your own, or ask Cuong for more information if necessary.

To post a message you must log in.