[PS] Problem with duplication of custom object

Bug #753653 reported by Harmel Delphine (OpenERP)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

Bug Description

trunk, revno 3377

* Administration > Customization > Database > Object, duplicate an existing object

Obtained result : the new object contains twice the fields of the duplicated object. Moreover it is impossible to create a menu entry for this duplicated object

Expected result : it creates a new object containing once each field and it is possible to create a menu entry for this duplicated object

reported by dha, OpenERP Prof. Services

Tags: profserv

Related branches

affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Medium → Low
status: New → Confirmed
Revision history for this message
xrg (xrg) wrote : Re: [Bug 753653] [NEW] [PS] Problem with duplication of custom object

On Thursday 07 April 2011, you wrote:
> Public bug reported:
>
> trunk, revno 3377
>
> * Administration > Customization > Database > Object, duplicate an
> existing object

Let me check that.
It is quite related to the "monster" patch in that part of the code.

Revision history for this message
xrg (xrg) wrote :

On Thursday 07 April 2011, you wrote:
> Public bug reported:
>
> trunk, revno 3377
>
> * Administration > Customization > Database > Object, duplicate an
> existing object

> Expected result : it creates a new object containing once each field and
> it is possible to create a menu entry for this duplicated object
Not really, IMHO. If the new model name and fields are not all prefixed by 'x_'
, we couldn't really duplicate the object. It may be safer to just forbid all.

> Obtained result : the new object contains twice the fields of the
> duplicated object. Moreover it is impossible to create a menu entry for
> this duplicated object
That's because you may be missing commit: e3d74645dd7e
A new record for ir.model is created, but both of them still reference the
same ORM object, thus duplicating the fields on it.

Revision history for this message
Rutul Shah(Open ERP) (rts-openerp) wrote :

Hello,

we should rename the fields, model names with "x_" when duplication occurs
Please share your views ?

Thanks

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello Harmel Delphine,

can you please try out with the latest revisions of server. As it seems to work as expected.

when ever we try to duplicate an existing object it will fire the constraint
''' new row for relation "ir_model_fields" violates check constraint "ir_model_fields_size_gt_zero" '''

where as If I create a new custom object and field then try to duplicate its easily being duplicated..

Correct me if I am missing something !

Thanks

Changed in openobject-server:
status: Confirmed → Incomplete
Revision history for this message
Harmel Delphine (OpenERP) (dha-openerp) wrote :

hello,

I just tested with server revno 3461. It seems even worst.

* I create a custom object with 2 custom fields
* from this view I duplicate (CTRL-Shift-D)

Obtained result : it duplicates the last field of the custom object and if i look in the list view it duplicates also the object but with no field on it

Expected result : it duplicates the whole object (not the field on the custom object) with the correct fields

Changed in openobject-server:
status: Incomplete → Triaged
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello Harmel Delphine,

yes I too reproduced today with server on revision 3465 and I am confirming the issue too

Thanks,

Changed in openobject-server:
status: Triaged → Confirmed
Changed in openobject-server:
status: Confirmed → Fix Committed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

This was fixed by the server-side correction of bug 789019 and merged in trunk at revision 3615 revid: <email address hidden>
Thanks!

Changed in openobject-server:
milestone: none → 6.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.