Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3148 Widoki
how to hide a stage "start" from kanban group in odoo 14? here is my xml code.

<record id="maintenance.hr_equipment_request_view_kanban" model="ir.ui.view">
<field name="name">equipment.request.kanbanfield>


<field name="model">maintenance.requestfield>
<field name="arch" type="xml">
<kanban default_group_by="stage_id" quick_create="false" sample="1" draggable="false" records_draggable="false" group_create="false"
group_delete="true" group_edit="true" archivable="true" class="o_kanban_mobile o_kanban_small_column o_kanban_project_tasks">
<field name="stage_id" readonly="1"/>
<field name="equipment_id"/>
<field name="user_id"/>
<field name="classification"/>
<field name="category"/>
<field name="trouble_category"/>

<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown">
<a role="button" class="dropdown-toggle o-no-caret btn" data-toggle="dropdown" data-display="static" href="#" aria-label="Dropdown menu" title="Dropdown menu">
<span class="fa fa-ellipsis-v"/>
a>
<div class="dropdown-menu" role="menu">
<t t-if="widget.editable"><a role="menuitem" type="edit" class="dropdown-item">Edit...a>t>
<t t-if="widget.deletable"><a role="menuitem" type="delete" class="dropdown-item">Deletea>t>
div>
div>
<div class="oe_kanban_content" >
<div class="o_kanban_record_top mb16">
<div class="o_kanban_record_headings mt4">
<strong class="o_kanban_record_title"><span><t t-esc="record.trouble_category.value"/>span>strong>
div>
div>
<div class="o_kanban_record_body">
<span name="user_id" t-if="record.user_id.raw_value">Diminta oleh : <field name="user_id"/><br/>span>
<span class="oe_grey" t-if="record.equipment_id.raw_value"><field name="equipment_id"/><br/>span>

div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
<field name="name" />
div>
<div class="oe_kanban_bottom_right">
<field name="user_id" widget="many2one_avatar_user"/>
div>
div>
div>
<div class="oe_clear">div>
div>
t>
templates>
kanban>
field>
record>
Awatar
Odrzuć

You find a solution for this? I need the same but I can't find a solution

Najlepsza odpowiedź

To hide a stage named "start" from a Kanban group in Odoo 14, you can add a domain filter to the Kanban view for that group. Here is an example XML code that shows how to achieve this:

xml

In this example, the domain filter is added to the element of the Kanban view, using the domain attribute. The domain filter [('stage', '!=', 'start')] will hide the stage named "start" from the Kanban group.

Note that you need to replace my.model with the name of the model that you are creating the Kanban view for, and adjust the fields and templates to match your requirements. Also, make sure to include the templates section in your Kanban view, which defines the HTML templates used to display the records in the Kanban view.

Awatar
Odrzuć
Autor Najlepsza odpowiedź

thanks for answering,
and I have tried but failed, the error is like this

Error while validating view: 

Unknown field "maintenance.stage.stage_id" in domain of "[('stage_id', '!=', 'start')]" 

View name: equipment.request.kanban 

Error context: view: ir.ui.view(1755,) xmlid: maintenance.hr_equipment_request_view_kanban view.model: maintenance.request


my code:



 


Awatar
Odrzuć

You find a solution for this? I need to achieve the same but not find any working solution

Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
2522
2
lip 25
7972
2
lip 25
4408
2
lip 25
4128
2
cze 25
2710