add Department views.xml
This commit is contained in:
@@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- LIST VIEW -->
|
||||||
|
<record id="view_secretariat_category_list" model="ir.ui.view">
|
||||||
|
<field name="name">secretariat.category.list</field>
|
||||||
|
<field name="model">secretariat.category</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<list string="دستهبندیهای اسناد" sample="1">
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="parent_id"/>
|
||||||
|
<field name="description"/>
|
||||||
|
<field name="color" widget="color_picker"/>
|
||||||
|
<field name="active" column_invisible="True"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- FORM VIEW -->
|
||||||
|
<record id="view_secretariat_category_form" model="ir.ui.view">
|
||||||
|
<field name="name">secretariat.category.form</field>
|
||||||
|
<field name="model">secretariat.category</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="دستهبندی سند">
|
||||||
|
<sheet>
|
||||||
|
<widget name="web_ribbon" title="بایگانی شده" bg_color="text-bg-danger" invisible="active"/>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
|
<field name="active" widget="boolean_toggle"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="oe_title">
|
||||||
|
<label for="name"/>
|
||||||
|
<h1>
|
||||||
|
<field name="name" placeholder="نام دستهبندی..."/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<group string="اطلاعات پایه">
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="parent_id"/>
|
||||||
|
<field name="color" widget="color_picker"/>
|
||||||
|
</group>
|
||||||
|
<group string="سایر">
|
||||||
|
<field name="active" widget="boolean_toggle"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group string="توضیحات">
|
||||||
|
<field name="description" nolabel="1" placeholder="توضیحات دستهبندی..."/>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page string="زیرمجموعهها" name="children">
|
||||||
|
<field name="child_ids">
|
||||||
|
<list string="زیردستهها">
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="color" widget="color_picker"/>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
<chatter/>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- SEARCH VIEW -->
|
||||||
|
<record id="view_secretariat_category_search" model="ir.ui.view">
|
||||||
|
<field name="name">secretariat.category.search</field>
|
||||||
|
<field name="model">secretariat.category</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search string="جستجوی دستهبندی">
|
||||||
|
<field name="name" string="دستهبندی" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]"/>
|
||||||
|
<field name="parent_id"/>
|
||||||
|
<filter string="فعال" name="active" domain="[('active','=',True)]"/>
|
||||||
|
<filter string="آرشیو شده" name="inactive" domain="[('active','=',False)]"/>
|
||||||
|
<group expand="0" string="گروهبندی">
|
||||||
|
<filter string="دستهبندی مادر" name="group_parent" context="{'group_by':'parent_id'}"/>
|
||||||
|
</group>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- ACTION -->
|
||||||
|
<record id="action_secretariat_category" model="ir.actions.act_window">
|
||||||
|
<field name="name">دستهبندی اسناد</field>
|
||||||
|
<field name="res_model">secretariat.category</field>
|
||||||
|
<field name="view_mode">list,form</field>
|
||||||
|
<field name="search_view_id" ref="view_secretariat_category_search"/>
|
||||||
|
<field name="context">{'search_default_active': 1}</field>
|
||||||
|
<field name="help" type="html">
|
||||||
|
<p class="o_view_nocontent_smiling_face">
|
||||||
|
اولین دستهبندی سند را ایجاد کنید
|
||||||
|
</p>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user