You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
9.3 KiB
174 lines
9.3 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Search Panel -->
|
|
<record id="product_template_view_search" model="ir.ui.view">
|
|
<field name="name">product.template.view.search</field>
|
|
<field name="model">product.template</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Product Management">
|
|
<field name="name" string="Product"
|
|
filter_domain="['|', '|', '|', ('default_code', 'ilike', self), ('product_variant_ids.default_code', 'ilike', self),('name', 'ilike', self), ('barcode', 'ilike', self)]"/>
|
|
<field name="categ_id"
|
|
filter_domain="[('categ_id', 'child_of', raw_value)]"/>
|
|
<separator/>
|
|
<filter string="Services" name="services"
|
|
domain="[('type','=','service')]"/>
|
|
<filter string="Products" name="consumable"
|
|
domain="[('type', 'in', ['consu', 'product'])]"/>
|
|
<separator/>
|
|
<filter string="Can be Sold" name="filter_to_sell"
|
|
domain="[('sale_ok','=',True)]"/>
|
|
<filter string="Can be Purchased" name="filter_to_purchase"
|
|
domain="[('purchase_ok', '=', True)]"/>
|
|
<separator/>
|
|
<field string="Attributes" name="attribute_line_ids"
|
|
groups="product.group_product_variant"/>
|
|
<filter invisible="1" string="Late Activities"
|
|
name="activities_overdue"
|
|
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
|
help="Show all records which has next action date is before today"/>
|
|
<filter invisible="1" string="Today Activities"
|
|
name="activities_today"
|
|
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
|
<filter invisible="1" string="Future Activities"
|
|
name="activities_upcoming_all"
|
|
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))
|
|
]"/>
|
|
<separator/>
|
|
<filter string="Favorites" name="favorites"
|
|
domain="[('priority','=','1')]"/>
|
|
<separator/>
|
|
<filter string="Warnings" name="activities_exception"
|
|
domain="[('activity_exception_decoration', '!=', False)]"/>
|
|
<separator/>
|
|
<filter string="Archived" name="inactive"
|
|
domain="[('active','=',False)]"/>
|
|
<group expand="1" string="Group By">
|
|
<filter string="Product Type" name="type"
|
|
context="{'group_by':'type'}"/>
|
|
<filter string="Product Category" name="categ_id"
|
|
context="{'group_by':'categ_id'}"/>
|
|
</group>
|
|
<searchpanel>
|
|
<field name="company_id" select="multi" string="Company"
|
|
icon="fa-cutlery" color="#875A7B"
|
|
enable_counters="1"/>
|
|
<field name="type" select="multi" string="Types"
|
|
icon="fa-th-large" color="#875A7B"
|
|
enable_counters="1"/>
|
|
<field name="categ_id" select="multi" string="Categories"
|
|
icon="fa-th-list" color="#875A7B"
|
|
enable_counters="1"/>
|
|
</searchpanel>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<!-- Kanban View -->
|
|
<record id="product_template_view_kanban" model="ir.ui.view">
|
|
<field name="name">Product.template.view.kanban</field>
|
|
<field name="model">product.template</field>
|
|
<field name="arch" type="xml">
|
|
<kanban create="false" sample="1" js_class="product_management_kanban_view">
|
|
<field name="id"/>
|
|
<field name="product_variant_count"/>
|
|
<field name="currency_id"/>
|
|
<field name="activity_state"/>
|
|
<progressbar field="activity_state"
|
|
colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_kanban_card oe_kanban_global_click"
|
|
style="width:430px;">
|
|
<div class="o_kanban_image me-1">
|
|
<img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)"
|
|
alt="Product" class="o_image_64_contain"/>
|
|
</div>
|
|
<div class="oe_kanban_details" t-attf-id="{{record.id.value}}">
|
|
<div class="o_kanban_record_top mb-0">
|
|
<div class="o_kanban_record_headings">
|
|
<strong class="o_kanban_record_title"
|
|
style="font-size:large;">
|
|
<field name="priority"
|
|
widget="priority"/>
|
|
<field name="name"/>
|
|
</strong>
|
|
<t t-if="record.default_code.value">
|
|
[<field name="default_code"/>]
|
|
</t>
|
|
</div>
|
|
<input type="checkbox"
|
|
class="product_check_box"
|
|
t-attf-id="{{record.id.value}}"
|
|
t-att-data-id="record.id.value"
|
|
style="height:20px;width:20px;"/>
|
|
</div>
|
|
<br/>
|
|
Category:
|
|
<strong>
|
|
<field name="categ_id"/>
|
|
</strong>
|
|
<div t-if="record.product_variant_count.value > 1"
|
|
groups="product.group_product_variant">
|
|
<strong>
|
|
<t t-esc="record.product_variant_count.value"/>
|
|
Variants
|
|
</strong>
|
|
</div>
|
|
<div name="product_lst_price" class="mt-1">
|
|
Price:
|
|
<strong>
|
|
<field name="list_price"
|
|
widget="monetary"
|
|
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
|
</strong>
|
|
</div>
|
|
<div>
|
|
Type :
|
|
<strong>
|
|
<field name="type"/>
|
|
</strong>
|
|
<br/>
|
|
Invoice Policy :
|
|
<strong>
|
|
<field name="invoice_policy"/>
|
|
</strong>
|
|
<br/>
|
|
<strong>
|
|
<field name="sale_ok"/>
|
|
</strong>
|
|
Can be sold
|
|
<br/>
|
|
<strong>
|
|
<field name="purchase_ok"/>
|
|
</strong>
|
|
Can be Purchased
|
|
<br/>
|
|
<strong>
|
|
<field name="is_published"/>
|
|
</strong>
|
|
Website Published
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
<!-- Kanban View Action -->
|
|
<record id="product_template_action" model="ir.actions.act_window">
|
|
<field name="name">Product Management</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">product.template</field>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="view_id"
|
|
ref="product_management_system.product_template_view_kanban"/>
|
|
<field name="search_view_id"
|
|
ref="product_management_system.product_template_view_search"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new product
|
|
</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|