تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1718 أدوات العرض

This is my block of code that opens the dialog box:

const resModel = field.relation; 
this .addDialog(SelectCreateDialog, {
title: sprintf( this .env._t( "Select: %s" ) ), field.string),
noCreate: true ,
multiSelect: true ,
resModel: resModel,
context: field.context || { },
onSelected: async (resIds) => {
console.log( "************onSelected**********" );
const data = await this .fetchData( resModel,[[ "id" , "in" , resIds]]);
if (!data.length) {
condition.
condition.displayedValue = "" ;
return ;
}
// replace comma with ¶ to avoid split errors (in case of comma in display_name)
condition.value = field.type == "one2many" || field.type == "many2many" ? data.map(d => d.id).join( "," ) : data.map(d => d.display_name.replace( "," , "¶" )).join( "," );
condition.displayedValue = data.map(d => ` "${d.display_name}" `).join( "," );
// click on apply to trigger the onApply()
$( ".

},
{
onClose: () => {
console.log( "************onClose**********" );
},
}
);

I would appreciate any help!


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 24
5165
0
يناير 24
1827
1
أكتوبر 23
2320
1
يناير 25
3829
1
يونيو 24
4506