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
10001 Widoki

I want show other name in the kanban view, in the tree view works, but no in kanban.

This is my record:

    <record id="view_project_kanban_inherited" model="ir.ui.view">
        <field name="name">project.project.kanban.inherited</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.view_project_kanban"/>
        <field name="arch" type="xml">
            <field name="name" position="replace">
                <field name="shortcut_name"/>
            </field>
        </field>
    </record>
Awatar
Odrzuć
Najlepsza odpowiedź

I believe you have to insert your field also within the template to be shown in view. So, besides the field you inserted, you may need to add a xpath reference to an element inside the template. There is an example of this in the project_timesheet addon:

<record id="view_project_kanban_inherited" model="ir.ui.view">
        <field name="name">project.project.kanban.inherited</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.view_project_kanban"/>
        <field name="arch" type="xml">
            <field name="use_tasks" position="after">
                <field name="use_timesheets"/>
                <field name="hours_quantity"/>
                <field name="currency_id"/>
                <field name="partner_id"/>
            </field>
            <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
                <a t-if="record.use_timesheets.raw_value" style="margin-right: 10px"
                    name="open_timesheets" type="object"><field name="hours_quantity"/> Hours</a>
            </xpath>
        </field>
    </record>
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 24
1571
1
lis 16
5073
0
mar 22
2911
1
gru 19
5039
3
gru 17
6681