This question has been flagged
1 Reply
2560 Views

It's like a clone of an object, but I'm afraid that it will generate some XML errors, Could I do that kind of clone ?

Avatar
Discard
Best Answer

You can have more than one model with the same columns. Unless you use one of the Odoo inheritance ways (see inherit/inherits about that in the technical documentation of Odoo), you will not be able to use your new model in the views of the original object. You will have to define new views for your new model. The view is related to the model through a tag in the definition of the record of the view (<field name="model">my.new.model</field>). Feel free to give some reasons for introducing the copy of the model, if you need more help. Best, Ioan.

Avatar
Discard
Author

Hello, Yes there is no problem to clone with the same columns name, I tried to clone sale order object, I had several problems with database dependecies ( foregin key) and with many2amny fields, I had to clone the sale_order_line to another object and link it with the new object, and for the many2many fields, I had to change the relation table, ( wich makes the link between the two objects). because, this relation table, is related to the sale_order_line object. at the end, that was the two main problems with cloning the sale_order object.