Odoo Help


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.


What really happens when I press duplicate?

Dan Mendes
on 12/2/13, 2:32 PM 1,329 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--
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

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.

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)


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