lino.core.merge

This defines the MergeAction class.

It should not be used on models that have MTI children.

(This module's source code is available here.)

Functions

traverse_ddh_fklist(model[, ignore_mti_parents])

When an application uses MTI (e.g.

Classes

MergeAction(model, **kw)

Merge this object into another object of same class.

MergePlan(obj, merge_to[, keep_volatiles])

A volatile object which represents what is going to happen if we merge two objects.

lino.core.merge.traverse_ddh_fklist(model, ignore_mti_parents=True)

When an application uses MTI (e.g. with a Participant model being a specialization of Person, which itself a specialization of Partner) and we merge two Participants, then we must of course also merge their invoices and bank statement items (linked via a FK to Partner) and their contact roles (linked via a FK to Person).

class lino.core.merge.MergeAction(model, **kw)

Bases: lino.core.actions.Action

Merge this object into another object of same class.

This action has a dynamically generated parameters window.

run_from_ui(ar)

Implements lino.core.actions.Action.run_from_ui().

class lino.core.merge.MergePlan(obj, merge_to, keep_volatiles={})

Bases: object

A volatile object which represents what is going to happen if we merge two objects.