mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
254 lines
11 KiB
XML
254 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record model="ir.ui.view" id="qc_inspection_form_view">
|
|
<field name="name">qc.inspection.form</field>
|
|
<field name="model">qc.inspection</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Inspection">
|
|
<header>
|
|
<button name="action_draft"
|
|
type="object"
|
|
attrs="{'invisible': [('state', '!=', 'canceled')]}"
|
|
string="Draft" />
|
|
<button name="action_todo"
|
|
type="object"
|
|
class="oe_highlight"
|
|
states="draft"
|
|
string="Mark todo" />
|
|
<button name="action_confirm"
|
|
type="object"
|
|
class="oe_highlight"
|
|
states="ready"
|
|
string="Confirm"
|
|
icon="gtk-ok" />
|
|
<button name="action_approve"
|
|
type="object"
|
|
states="waiting"
|
|
class="oe_highlight"
|
|
groups="quality_control.group_quality_control_manager"
|
|
string="Approve" />
|
|
<button name="action_cancel"
|
|
type="object"
|
|
attrs="{'invisible': [('state', 'not in', ['waiting', 'ready', 'failed', 'success'])]}"
|
|
string="Cancel"
|
|
icon="gtk-cancel" />
|
|
<field name="state"
|
|
widget="statusbar"
|
|
statusbar_visible="draft,waiting,success"
|
|
statusbar_colors='{"success": "blue", "failed": "red"}' />
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_right oe_button_box" name="buttons">
|
|
<button class="oe_inline oe_stat_button"
|
|
type="action"
|
|
name="%(action_qc_inspection_set_test)d"
|
|
icon="fa-bookmark-o"
|
|
states="draft"
|
|
string="Set test" />
|
|
</div>
|
|
<h1>
|
|
<label string="Inspection "/>
|
|
<field name="name" class="oe_inline"/>
|
|
</h1>
|
|
<group>
|
|
<group>
|
|
<field name="test" />
|
|
<field name="user" />
|
|
<field name="object_id" />
|
|
<field name="qty" />
|
|
<field name="product" />
|
|
</group>
|
|
<group>
|
|
<field name="date" />
|
|
<field name="success" />
|
|
<field name="auto_generated" />
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Questions">
|
|
<field name="inspection_lines" nolabel="1">
|
|
<tree string="Inspection lines" editable="top" delete="false" create="false">
|
|
<field name="name" />
|
|
<field name="question_type" />
|
|
<field name="possible_ql_values" invisible="1" />
|
|
<field name="qualitative_value"
|
|
attrs="{'readonly': [('question_type', '=', 'quantitative')]}" />
|
|
<field name="quantitative_value"
|
|
attrs="{'readonly': [('question_type', '=', 'qualitative')]}" />
|
|
<field name="uom_id"
|
|
groups="product.group_uom"
|
|
attrs="{'readonly': [('question_type', '=', 'qualitative')]}" />
|
|
<field name="test_uom_category" invisible="1"/>
|
|
<field name="valid_values" />
|
|
<field name="success" />
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Notes">
|
|
<group string="Internal notes" >
|
|
<field name="internal_notes"
|
|
nolabel="1" />
|
|
</group>
|
|
<group string="External notes" >
|
|
<field name="external_notes"
|
|
nolabel="1" />
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="qc_inspection_tree_view">
|
|
<field name="name">qc.inspection.tree</field>
|
|
<field name="model">qc.inspection</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Inspections">
|
|
<field name="name" />
|
|
<field name="user" />
|
|
<field name="test" />
|
|
<field name="qty" />
|
|
<field name="product" />
|
|
<field name="success" />
|
|
<field name="state" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="qc_inspection_search_view">
|
|
<field name="name">qc.inspection.search</field>
|
|
<field name="model">qc.inspection</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search inspection">
|
|
<group>
|
|
<field name="name" />
|
|
<field name="user" />
|
|
<field name="object_id" />
|
|
<field name="product" />
|
|
<field name="test" />
|
|
</group>
|
|
<newline />
|
|
<filter string="Correct"
|
|
domain="[('success', '=', True)]"/>
|
|
<filter string="Incorrect"
|
|
domain="[('success', '=', False)]"/>
|
|
<newline />
|
|
<group expand="0" string="Group by...">
|
|
<filter string="Reference"
|
|
domain="[]"
|
|
context="{'group_by': 'object_id'}" />
|
|
<filter string="Test"
|
|
domain="[]"
|
|
context="{'group_by': 'test'}" />
|
|
<filter string="Responsible"
|
|
domain="[]"
|
|
context="{'group_by': 'user'}" />
|
|
<filter string="Product"
|
|
domain="[]"
|
|
context="{'group_by': 'product'}" />
|
|
<filter string="State"
|
|
domain="[]"
|
|
context="{'group_by': 'state'}" />
|
|
<filter string="Success"
|
|
domain="[]"
|
|
context="{'group_by': 'success'}" />
|
|
<filter string="Auto-generated"
|
|
domain="[]"
|
|
context="{'group_by': 'auto_generated'}" />
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_qc_inspection">
|
|
<field name="name">Inspections</field>
|
|
<field name="res_model">qc.inspection</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<menuitem name="Inspections"
|
|
parent="qc_inspection_menu_parent"
|
|
id="qc_inspection_menu"
|
|
action="action_qc_inspection" />
|
|
|
|
<record model="ir.ui.view" id="qc_inspection_line_tree_view">
|
|
<field name="name">qc.inspection.line.tree</field>
|
|
<field name="model">qc.inspection.line</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Inspection lines" delete="false" create="false" colors="red: success==False">
|
|
<field name="inspection_id" />
|
|
<field name="product" />
|
|
<field name="name" />
|
|
<field name="question_type" />
|
|
<field name="possible_ql_values" invisible="1" />
|
|
<field name="qualitative_value"
|
|
attrs="{'readonly': [('question_type', '=', 'quantitative')]}" />
|
|
<field name="quantitative_value"
|
|
attrs="{'readonly': [('question_type', '=', 'qualitative')]}" />
|
|
<field name="uom_id"
|
|
groups="product.group_uom"
|
|
attrs="{'readonly': [('question_type', '=', 'qualitative')]}" />
|
|
<field name="test_uom_category" invisible="1"/>
|
|
<field name="valid_values" />
|
|
<field name="success" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="qc_inspection_line_search_view">
|
|
<field name="name">qc.inspection.line.search</field>
|
|
<field name="model">qc.inspection.line</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search inspection line">
|
|
<group>
|
|
<field name="name" />
|
|
<field name="inspection_id" />
|
|
<field name="product" />
|
|
<field name="success" />
|
|
</group>
|
|
<newline />
|
|
<filter string="Correct"
|
|
domain="[('success', '=', True)]"/>
|
|
<filter string="Incorrect"
|
|
domain="[('success', '=', False)]"/>
|
|
<newline />
|
|
<group expand="0" string="Group by...">
|
|
<filter string="Inspection"
|
|
domain="[]"
|
|
context="{'group_by': 'inspection_id'}" />
|
|
<filter string="Product"
|
|
domain="[]"
|
|
context="{'group_by': 'product'}" />
|
|
<filter string="Question"
|
|
domain="[]"
|
|
context="{'group_by': 'name'}" />
|
|
<filter string="Success"
|
|
domain="[]"
|
|
context="{'group_by': 'success'}" />
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_qc_inspection_line">
|
|
<field name="name">Inspection lines</field>
|
|
<field name="res_model">qc.inspection.line</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree</field>
|
|
</record>
|
|
|
|
<menuitem name="Inspection lines"
|
|
parent="qc_inspection_menu_parent"
|
|
id="qc_inspection_lines_menu"
|
|
action="action_qc_inspection_line" />
|
|
|
|
</odoo>
|
|
|