This question has been flagged
3 Replies
7215 Views

Hi all,

I see a bunch of custom module having to do with merging:

- merging partners

- merging products

- merging purchase orders 

etc ..


Wouldn't it be easier to implement merging at the model level so that any type of records could be merged ? 

Perhaps through postgres ?

Does any one know of something similar going on? I feel this is a much needed feature.


Ben

 

Avatar
Discard
Best Answer

You can use merge_records function from openupgradelib.

You can install the lib in your env with

$ pip install -e "git+https://github.com/OCA/openupgradelib.git@master#egg=openupgradelib"

then run

$ odoo shell

and

>>> from openupgradelib.openupgrade_merge_records import merge_records
>>> merge_records(env, 'MODEL_NAME', [SOURCE_RECORD_IDS], TARGET_RECORD_ID)
>>> env.cr.commit()


Avatar
Discard
Best Answer

Hi Ben,

There are indeed quite some modules to merge records (such as partners, products, purchase orders, ...)
Odoo doesn't want to support this functionality by default as they want to keep the product simple and transparant.
Usually the requirements for merging records are quite different, depending on the customer his/her needs. As far as I know there is no universal solution available at this point.
You're always welcome to create such a module and share it on the appstore or through OCA though! I'm sure it could benefit more people.

P.S: You can already combine/merge partner records in Odoo by default by selecting multiple contacts in the tree view. Next click on 'Action' and then choose for the option 'Merge Contacts' to combine them. 

Regards,
Yenthe

Avatar
Discard
Best Answer

Hello

we have module that merge records. see this below app.

https://apps.odoo.com/apps/modules/13.0/eq_merge_duplicate_data/

https://apps.odoo.com/apps/modules/13.0/eq_merge_duplicate_data_extended/

Avatar
Discard