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.
165 lines
7.1 KiB
165 lines
7.1 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<!-- MRP_Indent Form View -->
|
|
<record id='view_mrp_indent_indent_form' model='ir.ui.view'>
|
|
<field name="name">mrp.indent.form</field>
|
|
<field name="model">mrp.indent</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Indents">
|
|
<header>
|
|
<button name="mrp_indent_confirm" string="Confirm" states="draft" type="object"
|
|
class="oe_highlight"/>
|
|
<button name="action_assign" string="Approve" type="object"
|
|
class="oe_highlight" groups="stock.group_stock_manager"
|
|
attrs="{'invisible': ['|',('item_for', '!=', 'mrp'),('state', '!=', 'waiting_approval')]}"/>
|
|
<button name="mrp_indent_inprogress" string="Approve" type="object"
|
|
class="oe_highlight" groups="stock.group_stock_user"
|
|
attrs="{'invisible': ['|',('item_for', '=', 'mrp'),('state', '!=', 'waiting_approval')]}"/>
|
|
<button name="indent_reject" string="Reject" states="waiting_approval,inprogress,move_created" type="object"
|
|
groups="mrp.group_mrp_user,mrp.group_mrp_manager,stock.group_stock_manager"/>
|
|
<button name="indent_transfer" string="Ready To Transfer" states="inprogress" type="object"
|
|
class="oe_highlight" groups="stock.group_stock_manager"/>
|
|
<button name="indent_transfer_move_confirm" string="Confirm Transfer" states="move_created" type="object"
|
|
class="oe_highlight" groups="stock.group_stock_manager"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft,waiting_approval,inprogress,move_created,done"
|
|
statusbar_colors='{"reject":"red"}' />
|
|
</header>
|
|
<sheet>
|
|
<h1>
|
|
<field name="name" class="oe_inline" readonly="1"/>
|
|
</h1>
|
|
<group>
|
|
<group>
|
|
<field name="requirement"/>
|
|
<field name="issued_by" />
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
<group>
|
|
<field name="indent_date" />
|
|
<field name="required_date" />
|
|
<field name="issued_date" />
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Products" attrs="{'invisible':[('item_for', '=', 'mrp')]}">
|
|
<field name="product_lines">
|
|
<form string="Products">
|
|
<group>
|
|
<group>
|
|
<field name="product_id" groups="base.group_user"
|
|
on_change="onchange_product_id(product_id, product_uom_qty, product_uom, name)" />
|
|
<field name="original_product_id"/>
|
|
<label for="product_uom_qty" />
|
|
<div>
|
|
<field name="product_uom_qty" class="oe_inline" />
|
|
<field name="product_uom" groups="product.group_uom"
|
|
class="oe_inline oe_no_button"
|
|
on_change="onchange_product_id(product_id, product_uom_qty,
|
|
product_uom, name)" />
|
|
</div>
|
|
</group>
|
|
|
|
</group>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="state"/>
|
|
</group>
|
|
|
|
<group string ="Locations">
|
|
<field name="location_id"/>
|
|
<field name="location_dest_id"/>
|
|
</group>
|
|
</form>
|
|
<tree string="Products">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="product_id"/>
|
|
<field name="state" invisible="1"/>
|
|
<field name="product_uom_qty" sum="Total Qty"/>
|
|
<field name="product_uom" string="Unit" groups="product.group_uom"/>
|
|
<field name="location_id"/>
|
|
<field name="location_dest_id"/>
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
<div class="oe_clear">
|
|
<label for="description" />
|
|
</div>
|
|
<field name="description" class="oe_inline" placeholder="Additional note..." />
|
|
</page>
|
|
|
|
<page string="Moves">
|
|
<field name="move_lines">
|
|
<tree string="Products" colors="grey:state == 'cancel';black:state == 'done';red:(state not in ('cancel','done')) and date > current_date;blue:(state not in ('cancel','done'))">
|
|
<field name="product_id"/>
|
|
<field name="name"/>
|
|
<field name="product_uom_qty"/>
|
|
<field name="product_uom" groups="product.group_uom"/>
|
|
<field name="state" invisible="1"/>
|
|
<field name="location_id"/>
|
|
<field name="location_dest_id"/>
|
|
<field name="mrp_indent_id" invisible="1"/>
|
|
<field name="date" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
<div class="oe_clear">
|
|
<label for="description" />
|
|
</div>
|
|
<field name="description" class="oe_inline" placeholder="Additional note..." />
|
|
</page>
|
|
<page string="Other Info">
|
|
<group>
|
|
<group><field name="origin" readonly="True"/></group>
|
|
<group><field name="item_for" readonly="True"/></group>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- MRP Indent Tree View -->
|
|
<record id='view_mrp_indent_indent_tree' model='ir.ui.view'>
|
|
<field name="name">mrp.indent.tree</field>
|
|
<field name="model">mrp.indent</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Indents"
|
|
colors="red:(state == 'waiting_approval' and requirement == '2') or (state == 'inprogress' and requirement == '2');black:state=='draft';blue:state=='waiting_approval';green:state=='inprogress';gray:state=='reject';">
|
|
<field name="name" />
|
|
<field name="indent_date" />
|
|
<field name="required_date" />
|
|
<field name="requirement" invisible="1"/>
|
|
<field name="state" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Indent Window Action -->
|
|
<record id='menu_mrp_indent_indent' model='ir.actions.act_window'>
|
|
<field name="name">Indents</field>
|
|
<field name="res_model">mrp.indent</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('state', 'in', ('draft','waiting_approval','inprogress','move_created','done','reject'))]</field>
|
|
<field name="view_ids"
|
|
eval="[(5, 0, 0),
|
|
(0, 0, {'view_mode': 'tree', 'view_id': ref('view_mrp_indent_indent_tree')}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('view_mrp_indent_indent_form')})]"/>
|
|
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a new indent.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_mrp_indent_main" name="Indents"
|
|
parent="mrp.menu_mrp_root" sequence="10" groups="mrp.group_mrp_user"/>
|
|
<menuitem action="menu_mrp_indent_indent"
|
|
id="menu_mrp_production_order_indent_action" name="Indents"
|
|
parent="menu_mrp_indent_main" sequence="1"/>
|
|
</data>
|
|
</odoo>
|