A framework can not create a datatable with a relation manyToOne to itself

Bug #1328567 reported by Donatas Baliuka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openerp-mobile
New
Undecided
Unassigned

Bug Description

A method for database creation cycles if model has a relation manyToOne to it self. For example:

public class ResPartnerDB extends OEDatabase {

 Context mContext = null;
 public ResPartnerDB(Context context) {
  super(context);
  mContext = context;
 }

 @Override
 public String getModelName() {
  return "res.partner";
 }

 @Override
 public List<OEColumn> getModelColumns() {
  List<OEColumn> columns = new ArrayList<OEColumn>();
                                               ...

                     columns.add(new OEColumn("parent_id", "Related company", OEFields.manyToOne(new ResPartnerDB(mContext))));
  return columns;
 }

}

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.