Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3951 Widoki

Hello everyone,

i tried in different way to get one2many field in kanban view but it's not working. is there any solution for this. I know that some modules are available to do this. I want to know is there any builtin way to do this. i know that i am able to get image field using  t-att-src="kanban_image('model', 'image_field', rec)" but i want to print other all fields like char, integer field etc.


Can any one help me


Thanks in advance

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

The bellow is an example of view for adding custom fields into a kanban view. Please give more details about what you want to do.

.py file :

class ResPartner(models.Model):
_inherit = "res.partner"

your_field = fields.Char('Your Field')


xml file: 

<record id="your_id" model="ir.ui.view">
<field
name="name">your.id</field>
<field
name="inherit_id" ref="base.res_partner_kanban_view"/>
<field
name="model">res.partner</field>
<field
name="priority" eval="2"/>
<field
name="arch" type="xml">
<xpath
expr="//field[@name='email']" position="after">
<field
name="your_field"/>
</xpath>
</field>
</record>
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
wrz 21
10693
1
wrz 23
2252
2
lip 18
3636
3
lip 23
11869
2
sie 22
13892