mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[ADD] mrp_bom_hierarchy
This commit is contained in:
committed by
Jérémy Didderen
parent
e3cb91d140
commit
30198357b2
21
mrp_bom_hierarchy/__init__.py
Normal file
21
mrp_bom_hierarchy/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2015 Eficent (<http://www.eficent.com/>)
|
||||
# <contact@eficent.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from . import model
|
||||
103
mrp_bom_hierarchy/__openerp__.py
Normal file
103
mrp_bom_hierarchy/__openerp__.py
Normal file
@@ -0,0 +1,103 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2015 Eficent (<http://www.eficent.com/>)
|
||||
# <contact@eficent.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
"name": "MRP BOM Hierarchy",
|
||||
"version": "1.0",
|
||||
"author": "Eficent",
|
||||
"website": "www.eficent.com",
|
||||
"category": "Manufacturing",
|
||||
"depends": ["mrp"],
|
||||
"description": """
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License: AGPL-3
|
||||
|
||||
MRP BOM Hierarchy
|
||||
=================
|
||||
|
||||
This module was written to extend the functionality of Bill of
|
||||
Materials to support users to better maintain the BOM hierarchy.
|
||||
|
||||
This module replaces the existing BOM tree views with a new one, from
|
||||
which the user can create a complete BOM hierarchy.
|
||||
|
||||
The user can navigate from the tree view to child BOM's, or to the
|
||||
product's BOM components with a single click.
|
||||
|
||||
The user can now search using the field 'Complete Reference' (or Name) to
|
||||
find all the BOM hierarchy associated to a particular BOM Reference (or
|
||||
Name) at once.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
No specific installation steps are required.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
No specific configuration steps are required.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to go to 'Manufacturing | Products | Bill of
|
||||
Materials Hierarchy'
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
No issues have been identified with this module.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
.. image:: http://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: http://odoo-community.org
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
To contribute to this module, please visit http://odoo-community.org.
|
||||
""",
|
||||
"website": "http://www.eficent.com/",
|
||||
"license": "AGPL-3",
|
||||
"demo": [],
|
||||
"data": [
|
||||
"view/mrp.xml",
|
||||
],
|
||||
"test": [],
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
"active": False
|
||||
}
|
||||
21
mrp_bom_hierarchy/model/__init__.py
Normal file
21
mrp_bom_hierarchy/model/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2014 Eficent (<http://www.eficent.com/>)
|
||||
# <contact@eficent.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from . import mrp
|
||||
258
mrp_bom_hierarchy/model/mrp.py
Normal file
258
mrp_bom_hierarchy/model/mrp.py
Normal file
@@ -0,0 +1,258 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import osv, fields, expression
|
||||
|
||||
|
||||
class mrp_bom(osv.osv):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
def get_child_boms(self, cr, uid, ids, context=None):
|
||||
result = {}
|
||||
if not ids:
|
||||
return result
|
||||
for curr_id in ids:
|
||||
result[curr_id] = True
|
||||
# Now add the children
|
||||
cr.execute('''
|
||||
WITH RECURSIVE children AS (
|
||||
SELECT bom_id, id
|
||||
FROM mrp_bom
|
||||
WHERE bom_id IN %s
|
||||
UNION ALL
|
||||
SELECT a.bom_id, a.id
|
||||
FROM mrp_bom a
|
||||
JOIN children b ON(a.bom_id = b.id)
|
||||
)
|
||||
SELECT * FROM children order by bom_id
|
||||
''', (tuple(ids),))
|
||||
res = cr.fetchall()
|
||||
for x, y in res:
|
||||
result[y] = True
|
||||
return result
|
||||
|
||||
def _get_boms_from_product(self, cr, uid, ids, context=None):
|
||||
result = {}
|
||||
bom_obj = self.pool.get('mrp.bom')
|
||||
for p in ids:
|
||||
product_bom_ids = bom_obj.search(
|
||||
cr, uid, [('product_id', '=', p)])
|
||||
bom_ids = bom_obj.get_child_boms(cr, uid, product_bom_ids,
|
||||
context=context)
|
||||
for bom_id in bom_ids:
|
||||
result[bom_id] = True
|
||||
return result
|
||||
|
||||
def _is_bom(self, cr, uid, ids, name, arg, context=None):
|
||||
result = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
for bom in self.browse(cr, uid, ids, context=context):
|
||||
result[bom.id] = False
|
||||
if bom.bom_lines:
|
||||
result[bom.id] = True
|
||||
return result
|
||||
|
||||
def _bom_hierarchy_indent_calc(self, cr, uid, ids, prop, unknow_none,
|
||||
unknow_dict):
|
||||
if not ids:
|
||||
return []
|
||||
res = []
|
||||
for bom in self.browse(cr, uid, ids, context=None):
|
||||
data = []
|
||||
b = bom
|
||||
while b:
|
||||
if b.name and b.bom_id:
|
||||
data.insert(0, '>')
|
||||
else:
|
||||
data.insert(0, '')
|
||||
|
||||
b = b.bom_id
|
||||
data = ''.join(data)
|
||||
res.append((bom.id, data))
|
||||
return dict(res)
|
||||
|
||||
def _complete_bom_hierarchy_code_calc(
|
||||
self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
if not ids:
|
||||
return []
|
||||
res = []
|
||||
for bom in self.browse(cr, uid, ids, context=None):
|
||||
data = []
|
||||
b = bom
|
||||
while b:
|
||||
if b.code:
|
||||
data.insert(0, b.code)
|
||||
elif b.position:
|
||||
data.insert(0, b.position)
|
||||
elif b.product_id.default_code:
|
||||
data.insert(0, b.product_id.default_code)
|
||||
else:
|
||||
data.insert(0, '')
|
||||
|
||||
b = b.bom_id
|
||||
data = ' / '.join(data)
|
||||
data = '[' + data + '] '
|
||||
|
||||
res.append((bom.id, data))
|
||||
return dict(res)
|
||||
|
||||
def _complete_bom_hierarchy_name_calc(
|
||||
self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
if not ids:
|
||||
return []
|
||||
res = []
|
||||
for bom in self.browse(cr, uid, ids, context=None):
|
||||
data = []
|
||||
b = bom
|
||||
while b:
|
||||
if b.name:
|
||||
data.insert(0, b.name)
|
||||
elif b.product_id.name:
|
||||
data.insert(0, b.product_id.name)
|
||||
else:
|
||||
data.insert(0, '')
|
||||
|
||||
b = b.bom_id
|
||||
|
||||
data = ' / '.join(data)
|
||||
res.append((bom.id, data))
|
||||
return dict(res)
|
||||
|
||||
def _is_parent(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
res = {}
|
||||
for bom in self.browse(cr, uid, ids, context=None):
|
||||
if not bom.bom_id:
|
||||
res[bom.id] = True
|
||||
else:
|
||||
res[bom.id] = False
|
||||
return res
|
||||
|
||||
def _product_has_own_bom(self, cr, uid, ids, prop, unknow_none,
|
||||
unknow_dict):
|
||||
res = {}
|
||||
for bom in self.browse(cr, uid, ids, context=None):
|
||||
bom_ids = self.pool.get('mrp.bom').search(
|
||||
cr, uid, [('product_id', '=', bom.product_id.id),
|
||||
('bom_id', '=', False)], context=None)
|
||||
if bom_ids:
|
||||
res[bom.id] = True
|
||||
else:
|
||||
res[bom.id] = False
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'is_parent': fields.function(_is_parent, string="Is parent BOM",
|
||||
type='boolean', readonly=True,
|
||||
store=True),
|
||||
'has_child': fields.function(_is_bom, string="Has components",
|
||||
type='boolean', readonly=True),
|
||||
'product_has_own_bom': fields.function(_product_has_own_bom,
|
||||
string="Product has own BOM",
|
||||
type='boolean', readonly=True),
|
||||
'bom_hierarchy_indent': fields.function(_bom_hierarchy_indent_calc,
|
||||
method=True,
|
||||
type='char', string='Level',
|
||||
size=32, readonly=True),
|
||||
'complete_bom_hierarchy_code': fields.function(
|
||||
_complete_bom_hierarchy_code_calc, method=True, type='char',
|
||||
string='Complete Reference', size=250,
|
||||
help='Describes the full path of this '
|
||||
'component within the BOM hierarchy using the BOM reference.',
|
||||
store={
|
||||
'mrp.bom': (get_child_boms, ['name', 'code', 'position',
|
||||
'bom_id'], 20),
|
||||
'product.product': (_get_boms_from_product, ['default_code'],
|
||||
20),
|
||||
}),
|
||||
'complete_bom_hierarchy_name': fields.function(
|
||||
_complete_bom_hierarchy_name_calc, method=True, type='char',
|
||||
string='Complete Name', size=250,
|
||||
help='Describes the full path of this '
|
||||
'component within the BOM hierarchy using the BOM name.',
|
||||
store={
|
||||
'mrp.bom': (get_child_boms, ['name', 'bom_id'], 20),
|
||||
'product.product': (_get_boms_from_product, ['name'], 20),
|
||||
},
|
||||
),
|
||||
}
|
||||
|
||||
_order = 'complete_bom_hierarchy_code'
|
||||
|
||||
def action_openChildTreeView(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
:return dict: dictionary value for created view
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
bom = self.browse(cr, uid, ids[0], context)
|
||||
child_bom_ids = self.pool.get('mrp.bom').search(
|
||||
cr, uid, [('bom_id', '=', bom.id)])
|
||||
res = self.pool.get('ir.actions.act_window').for_xml_id(
|
||||
cr, uid, 'mrp_bom_hierarchy', 'action_mrp_bom_hierarchy_tree2',
|
||||
context)
|
||||
res['context'] = {
|
||||
'default_bom_id': bom.id,
|
||||
}
|
||||
res['domain'] = "[('id', 'in', ["+','.join(
|
||||
map(str, child_bom_ids))+"])]"
|
||||
res['nodestroy'] = False
|
||||
return res
|
||||
|
||||
def action_openParentTreeView(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
:return dict: dictionary value for created view
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
bom = self.browse(cr, uid, ids[0], context)
|
||||
res = self.pool.get('ir.actions.act_window').for_xml_id(
|
||||
cr, uid, 'mrp_bom_hierarchy', 'action_mrp_bom_hierarchy_tree2',
|
||||
context)
|
||||
if bom.bom_id:
|
||||
for parent_bom_id in self.pool.get('mrp.bom').search(
|
||||
cr, uid, [('id', '=',
|
||||
bom.bom_id.id)]):
|
||||
res['domain'] = "[('id','=',"+str(parent_bom_id)+")]"
|
||||
res['nodestroy'] = False
|
||||
return res
|
||||
|
||||
def action_openProductBOMTreeView(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
:return dict: dictionary value for created view
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
bom = self.browse(cr, uid, ids[0], context)
|
||||
product_bom_ids = self.pool.get('mrp.bom').search(
|
||||
cr, uid, [('product_id', '=', bom.product_id.id),
|
||||
('bom_id', '=', False)], context=context)
|
||||
res = self.pool.get('ir.actions.act_window').for_xml_id(
|
||||
cr, uid, 'mrp', 'mrp_bom_form_action2',
|
||||
context)
|
||||
|
||||
res['context'] = {
|
||||
'default_product_id': bom.product_id.id,
|
||||
}
|
||||
res['domain'] = "[('id', 'in', ["+','.join(
|
||||
map(str, product_bom_ids))+"])]"
|
||||
res['nodestroy'] = False
|
||||
return res
|
||||
BIN
mrp_bom_hierarchy/static/description/icon.png
Normal file
BIN
mrp_bom_hierarchy/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
92
mrp_bom_hierarchy/static/description/index.html
Normal file
92
mrp_bom_hierarchy/static/description/index.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">MRP BOM Hierarchy</h2>
|
||||
<p>
|
||||
This module was written to extend the functionality of Bill of
|
||||
Materials to support users to better maintain the BOM hierarchy.
|
||||
|
||||
This module replaces the existing BOM tree views with a new one, from
|
||||
which the user can create a complete BOM hierarchy.
|
||||
|
||||
The user can navigate from the tree view to child BOM's, or to the
|
||||
product's BOM components with a single click.
|
||||
|
||||
The user can now search using the field 'Complete Reference' (or Name) to
|
||||
find all the BOM hierarchy associated to a particular BOM Reference (or
|
||||
Name) at once.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Installation</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">No specific installation steps are required.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Configuration</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">No specific configuration steps are required.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Usage</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">To use this module, you need to go to 'Manufacturing | Products | Bill of
|
||||
Materials Hierarchy'
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Known issues / Roadmap</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">No issues have been identified with this module.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Credits</h2>
|
||||
</div>
|
||||
<div class="oe_span12">
|
||||
<h3>Contributors</h3>
|
||||
<ul>
|
||||
<li>Jordi Ballester Alomar <<a
|
||||
href="mailto:jordi.ballester@eficent.com">jordi.ballester@eficent.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_span12">
|
||||
<h3>Maintainer</h3>
|
||||
<p>
|
||||
This module is maintained by the OCA.<br/>
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.<br/>
|
||||
To contribute to this module, please visit <a href="http://odoo-community.org">http://odoo-community.org</a>.<br/>
|
||||
<a href="http://odoo-community.org"><img class="oe_picture oe_centered" src="http://odoo-community.org/logo.png"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
95
mrp_bom_hierarchy/view/mrp.xml
Normal file
95
mrp_bom_hierarchy/view/mrp.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="mrp_bom_form_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.form</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook/page/field[@name='bom_lines']/tree//field[@name='product_id']" position="after">
|
||||
<field name="is_parent" invisible="1"/>
|
||||
<field name="product_has_own_bom"/>
|
||||
<button string="View product's BOM"
|
||||
name="action_openProductBOMTreeView"
|
||||
type="object"
|
||||
icon="terp-folder-orange"
|
||||
attrs="{'invisible': [('is_parent', '=', True)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_bom_filter" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.select</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.view_mrp_bom_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="before">
|
||||
<field name="complete_bom_hierarchy_code"/>
|
||||
<field name="complete_bom_hierarchy_name"/>
|
||||
<field name="bom_id"/>
|
||||
<field name="is_parent"/>
|
||||
<filter string="Parent BOM" name="parent_bom"
|
||||
domain="[('is_parent','=','True')]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_hierarchy_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="field_parent">child_complete_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bill of Materials"
|
||||
colors="blue:method">
|
||||
<button string="Child BOMs"
|
||||
name="action_openChildTreeView"
|
||||
type="object"
|
||||
icon="STOCK_GO_DOWN"/>
|
||||
<field name="has_child"/>
|
||||
<field name="complete_bom_hierarchy_code"/>
|
||||
<field name="bom_hierarchy_indent"/>
|
||||
<field name="sequence"/>
|
||||
<field name="code"/>
|
||||
<field name="position"/>
|
||||
<field name="name"/>
|
||||
<field name="bom_id"/>
|
||||
<field name="is_parent" invisible="1"/>
|
||||
<field name="product_id" context="{'default_supply_method':'produce'}" on_change="onchange_product_id(product_id, name)"/>
|
||||
<field name="product_has_own_bom"/>
|
||||
<button string="View product's BOM"
|
||||
name="action_openProductBOMTreeView"
|
||||
type="object"
|
||||
icon="terp-folder-orange"
|
||||
attrs="{'invisible': [('is_parent', '=', True)]}"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
|
||||
<field name="type"/>
|
||||
<field name="method"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp.mrp_bom_form_action2" model="ir.actions.act_window">
|
||||
<field name="view_id" ref="mrp_bom_hierarchy_tree_view"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp.mrp_bom_form_action" model="ir.actions.act_window">
|
||||
<field name="view_id" ref="mrp_bom_hierarchy_tree_view"/>
|
||||
</record>
|
||||
|
||||
<record id="action_mrp_bom_hierarchy_tree2"
|
||||
model="ir.actions.act_window">
|
||||
<field name="name">Bill of Material Hierarchy</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="mrp_bom_hierarchy_tree_view"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user