You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class EmployeeAttendance extends OModel {
public static final String TAG = AttendanceReport.class.getSimpleName();
public static final String AUTHORITY = "com.odoo.addons.hremployee.att_report";
OColumn name = new OColumn("Name", OVarchar.class).setSize(100);
OColumn employee_id = new OColumn("Name", HrEmployee.class, OColumn.RelationType.ManyToOne);
OColumn employee_absent_ids = new OColumn("Employees absent", HrEmployee.class,
OColumn.RelationType.ManyToMany);
OColumn employee_present_ids = new OColumn("Employees present", HrEmployee.class,
OColumn.RelationType.ManyToMany);
public EmployeeAttendance(Context context, OUser user) {
super(context, "employee.attendance", user);
}
}
I have created a model named 'employee.attendance'. Inside it, I have created two Many2Many (employee_present_ids & employee_absent_ids).
Both Many2Many belong to HrEmployee.class.
Now when i execute this code(app), only one table named 'attendance_report_hr_empoyee_rel' is created in local database.
In python we can give many2many table name while field declaration.
Please guide me, How to create two manymany fields of same class in one Omodel?
The text was updated successfully, but these errors were encountered:
I have created a model named 'employee.attendance'. Inside it, I have created two Many2Many (employee_present_ids & employee_absent_ids).
Both Many2Many belong to HrEmployee.class.
Now when i execute this code(app), only one table named 'attendance_report_hr_empoyee_rel' is created in local database.
In python we can give many2many table name while field declaration.
Please guide me, How to create two manymany fields of same class in one Omodel?
The text was updated successfully, but these errors were encountered: