From 076bb061887ae5a52cb91774ab9938dd51f0f0d6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 17 Jan 2013 12:44:27 -0500 Subject: [PATCH] initial commit --- __init__.py | 23 ++++++++++++++++++++ __openerp__.py | 35 +++++++++++++++++++++++++++++++ mrp_bom_product_details.py | 36 +++++++++++++++++++++++++++++++ mrp_bom_product_details.xml | 42 +++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 __init__.py create mode 100644 __openerp__.py create mode 100644 mrp_bom_product_details.py create mode 100644 mrp_bom_product_details.xml diff --git a/__init__.py b/__init__.py new file mode 100644 index 000000000..1d82e0db7 --- /dev/null +++ b/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Solutions Libergia inc. (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import mrp_bom_product_details diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 000000000..d5b1a86da --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Solutions Libergia inc. (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'Bom product details', + 'version': '0.1', + 'author': 'Solutions Libergia inc.', + 'category': 'Manufacturing', + 'description': """ + This module adds product price and stock to bom view + """, + 'depends': ["base","mrp"], + 'demo': [], + 'data': ['mrp_bom_product_details.xml'], + 'auto_install': False, + 'installable': True, +} diff --git a/mrp_bom_product_details.py b/mrp_bom_product_details.py new file mode 100644 index 000000000..6f505c623 --- /dev/null +++ b/mrp_bom_product_details.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Solutions Libergia inc. (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import fields, osv +from openerp.tools.translate import _ + +class mrp_bom(osv.osv): + _inherit = 'mrp.bom' + + _columns ={ + 'product_standard_price': fields.related('product_id', 'standard_price', type='float', string='Cost Price', readonly=True), + 'product_qty_available': fields.related('product_id', 'qty_available', type='float', string='Quantity On Hand', readonly=True), + } + _defaults = { + } + +mrp_bom() diff --git a/mrp_bom_product_details.xml b/mrp_bom_product_details.xml new file mode 100644 index 000000000..50f46bca6 --- /dev/null +++ b/mrp_bom_product_details.xml @@ -0,0 +1,42 @@ + + + + + + mrp.bom.tree + mrp.bom + + + + + + + + + + + mrp.bom.component.tree + mrp.bom + + + + + + + + + + + mrp.bom.form + mrp.bom + + + + + + + + + + +