Odoo Help


What really happens when I press duplicate?

Dan Mendes
on 12/2/13, 2:32 PM 1,919 views

I am going crazy with OpenERP duplicate, if I duplicate a User in Employee Directory it duplicates everything (every user of the system), If I duplicate a group it duplicates only some stuff, apparently it doesn't create a copy... If I copy a Menu it doesn't duplicate the submenu options.

WTF does duplicate do "under the hood"? Is duplicate the same as copy? Does it create a new reference that points to the same object? Is it a shallow or a deep copy?

I am on OpenERP 7 LTS.


Grover Menacho

--Grover Menacho--
WebVision Enterprise Systems
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Odoo Developer

Grover Menacho
On 12/2/13, 3:50 PM

It depends....

In a normal way it's going to duplicate everything. If your object has a one2many record it's going to duplicate them too. So they are not going to be pointed to the same one.

But....here comes the exception, some objects override the way of copy function. They can avoid some fields, or have a particular way to do it. Each object can have a particular way to handle copies.

For example if you are going to duplicate a done sale order, this new document must not be a new copy of a done sale order, this only has to copy order lines and leave the sale order in draft. So by code it's going to do something different than duplicating a product.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/2/13, 2:32 PM
Seen: 1919 times
Last updated: 3/16/15, 8:10 AM