Odoo-mobile / framework

Odoo Mobile Framework
https://play.google.com/store/apps/dev?id=8607973775002477408
Other
327 stars 374 forks source link

ODomain on Many2One Field value from another models record #298

Closed adam-nadar closed 7 years ago

adam-nadar commented 7 years ago

i want to achieve sumtin like tis int i=ResUser.browse(current logged in user).getInt(OColumn.ROW_ID); in a Many2One filed i want to add a domain .addDomain("user_id","=",i);

adam-nadar commented 7 years ago

i tried sumthing like tis bt didn't worked

public ServiceRequest(Context context,OUser user) { super(context,"service.request", user); this.partner_id.addDomain("section_id","=",browse(selectRowId(getUser().getPartnerId())).getInt("section_id")); }

adam-nadar commented 7 years ago

<odoo.controls.OField android:id="@+id/partner_id" app:fieldName="partner_id" app:widgetType="SearchableLive" android:layout_width="match_parent" android:layout_height="wrap_content"/> field type

adam-nadar commented 7 years ago

abe 2 achieve, by using local colums