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

I have a this field in Odoo

third_check_ids = fields.Many2many('account.third.check', 'third_check_voucher_rel',
'dest_voucher_id', 'third_check_id', 'Third Checks', readonly=True,
states={'draft': [('readonly', False)]})

My problem happens when I need to select the checks from "Add an item". The list view of thirs_check_ids has a lot of fields, and when I click on "Add an Item" it show a m2m selection just a like a wizard (Is not a wizard), but I can only see some of the fields. I'd like to see ALL fields in the view, so I need to resize the window. How can i do this?

<field name="third_check_ids" string="Third Checks" nolabel="1" colspan="4"
  domain="[('state', '=', 'wallet')]">




الصورة الرمزية
إهمال
أفضل إجابة

Hi,

By default, Many2many shows the default tree view, You can either inherit the existing tree view to add new fields or create your own custom tree view.

You can pass the custom tree view through context as follows:

context="{'tree_view_ref': 'module_name.custom_tree_view'}" widget="many2one_barcode"/>

الصورة الرمزية
إهمال

<field name="m2m_field_name" required="1" context="{'tree_view_ref': 'module_name.custom_tree_view'}" widget="many2one_barcode"/>

المنشورات ذات الصلة الردود أدوات العرض النشاط
3
أغسطس 20
5119
0
فبراير 18
2671
0
أبريل 16
4344
0
ديسمبر 22
1888
1
نوفمبر 22
3009