mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[9.0] [MIG] mrp_bom_product_details (#187)
This commit is contained in:
72
mrp_bom_product_details/README.rst
Normal file
72
mrp_bom_product_details/README.rst
Normal file
@@ -0,0 +1,72 @@
|
||||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||
:target: https://www.gnu.org/licenses/agpl
|
||||
:alt: License: AGPL-3
|
||||
|
||||
===================
|
||||
Bom product details
|
||||
===================
|
||||
|
||||
|
||||
This module adds product price and stock to bom view.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
To install this module, you just need to select the module and insure
|
||||
yourself dependencies are available.
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
* Go to Manufacturing > Products > Bill of Materials
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/129/9.0
|
||||
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
|
||||
`here <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_production_note%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Module developed and tested with Odoo version 9.0
|
||||
For questions, please contact our support services <support@savoirfairelinux.com>
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Solutions Libergia inc. <david.dufresne@savoirfairelinux.com>
|
||||
* QubiQ <marsal.isern@qubiq.es>
|
||||
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://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 https://odoo-community.org.
|
||||
@@ -1,23 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015 - Solutions Libergia inc.
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2013 Solutions Libergia inc. (<http://www.libergia.com>).
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import mrp_bom_product_details
|
||||
from . import models
|
||||
|
||||
@@ -1,36 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2013 Solutions Libergia inc. (<http://www.libergia.com>).
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Marsal Isern
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
'name': 'Bom product details',
|
||||
'version': '0.1',
|
||||
'author': "Solutions Libergia inc.,Odoo Community Association (OCA)",
|
||||
'license': 'GPL-3 or any later version',
|
||||
'category': 'Manufacturing',
|
||||
'description': """
|
||||
'summary': """
|
||||
This module adds product price and stock to bom view
|
||||
""",
|
||||
'version': '9.0.1.0.0',
|
||||
'author': "Solutions Libergia inc., "
|
||||
"QubiQ, "
|
||||
"Odoo Community Association (OCA)",
|
||||
'category': 'Manufacturing',
|
||||
'depends': ["base", "mrp"],
|
||||
'demo': [],
|
||||
'data': ['mrp_bom_product_details.xml'],
|
||||
'license': 'AGPL-3',
|
||||
'data': ['views/mrp_bom_product_details.xml', ],
|
||||
'auto_install': False,
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
63
mrp_bom_product_details/i18n/en_US.po
Normal file
63
mrp_bom_product_details/i18n/en_US.po
Normal file
@@ -0,0 +1,63 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mrp_bom_product_details
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 9.0c-20160726\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-19 06:52+0000\n"
|
||||
"PO-Revision-Date: 2017-04-19 06:52+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model,name:mrp_bom_product_details.model_mrp_bom
|
||||
msgid "Bill of Material"
|
||||
msgstr "Bill of Material"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_line_product_standard_price
|
||||
msgid "Cost"
|
||||
msgstr "Cost"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_product_standard_price
|
||||
msgid "Cost Price"
|
||||
msgstr "Cost Price"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_line_product_standard_price
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_product_standard_price
|
||||
msgid "Cost of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
|
||||
msgstr "Cost of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_line_product_qty_available
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_product_qty_available
|
||||
msgid "Current quantity of products.\n"
|
||||
"In a context with a single Stock Location, this includes goods stored at this Location, or any of its children.\n"
|
||||
"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n"
|
||||
"stored in the Stock Location of the Warehouse of this Shop, or any of its children.\n"
|
||||
"Otherwise, this includes goods stored in any Stock Location with 'internal' type."
|
||||
msgstr "Current quantity of products.\n"
|
||||
"In a context with a single Stock Location, this includes goods stored at this Location, or any of its children.\n"
|
||||
"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n"
|
||||
"stored in the Stock Location of the Warehouse of this Shop, or any of its children.\n"
|
||||
"Otherwise, this includes goods stored in any Stock Location with 'internal' type."
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_line_product_qty_available
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_product_qty_available
|
||||
msgid "Quantity On Hand"
|
||||
msgstr "Quantity On Hand"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model,name:mrp_bom_product_details.model_mrp_bom_line
|
||||
msgid "mrp.bom.line"
|
||||
msgstr "mrp.bom.line"
|
||||
|
||||
65
mrp_bom_product_details/i18n/es.po
Normal file
65
mrp_bom_product_details/i18n/es.po
Normal file
@@ -0,0 +1,65 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mrp_bom_product_details
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 9.0c-20160726\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-04-19 06:51+0000\n"
|
||||
"PO-Revision-Date: 2017-04-19 08:59+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: es\n"
|
||||
"X-Generator: Poedit 1.8.6\n"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model,name:mrp_bom_product_details.model_mrp_bom
|
||||
msgid "Bill of Material"
|
||||
msgstr "Lista de materiales"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_line_product_standard_price
|
||||
msgid "Cost"
|
||||
msgstr "Coste"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_product_standard_price
|
||||
msgid "Cost Price"
|
||||
msgstr "Coste"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_line_product_standard_price
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_product_standard_price
|
||||
msgid "Cost of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
|
||||
msgstr "Coste para la plantilla de producto usada para la valoración de existencias estándar en contabilidad, y utilizada como precio de referencia en órdenes de compra. Se expresa en la unidad de medida por defecto del producto."
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_line_product_qty_available
|
||||
#: model:ir.model.fields,help:mrp_bom_product_details.field_mrp_bom_product_qty_available
|
||||
msgid ""
|
||||
"Current quantity of products.\n"
|
||||
"In a context with a single Stock Location, this includes goods stored at this Location, or any of its children.\n"
|
||||
"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n"
|
||||
"stored in the Stock Location of the Warehouse of this Shop, or any of its children.\n"
|
||||
"Otherwise, this includes goods stored in any Stock Location with 'internal' type."
|
||||
msgstr ""
|
||||
"Cantidad actual de los productos.\n"
|
||||
"En un contexto de una sola ubicación de existencias, esto incluye los bienes almacenados en esta ubicación, o cualquiera de sus hijas.\n"
|
||||
"En un contexto de un solo almacén, esto incluye los bienes almacenados en la ubicación de existencias de ese almacén, o cualquiera de sus hijas.\n"
|
||||
"En cualquier otro caso, esto incluye los bienes almacenados en cualquier ubicación de existencias de tipo 'Interna'."
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_line_product_qty_available
|
||||
#: model:ir.model.fields,field_description:mrp_bom_product_details.field_mrp_bom_product_qty_available
|
||||
msgid "Quantity On Hand"
|
||||
msgstr "Stock real"
|
||||
|
||||
#. module: mrp_bom_product_details
|
||||
#: model:ir.model,name:mrp_bom_product_details.model_mrp_bom_line
|
||||
msgid "mrp.bom.line"
|
||||
msgstr "mrp.bom.line"
|
||||
5
mrp_bom_product_details/models/__init__.py
Normal file
5
mrp_bom_product_details/models/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015 - Solutions Libergia inc.
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from . import mrp_bom_product_details
|
||||
26
mrp_bom_product_details/models/mrp_bom_product_details.py
Normal file
26
mrp_bom_product_details/models/mrp_bom_product_details.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015 Oihane Crucelaegui - AvanzOSC
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from openerp import fields, models
|
||||
|
||||
|
||||
class MrpBom(models.Model):
|
||||
_inherit = 'mrp.bom'
|
||||
|
||||
product_standard_price = fields.Float(
|
||||
related='product_id.standard_price', string='Cost Price',
|
||||
readonly=True)
|
||||
|
||||
product_qty_available = fields.Float(
|
||||
related='product_id.qty_available',
|
||||
string='Quantity On Hand', readonly=True)
|
||||
|
||||
|
||||
class MrpBomLine(models.Model):
|
||||
_inherit = 'mrp.bom.line'
|
||||
|
||||
product_standard_price = fields.Float(related='product_id.standard_price',
|
||||
readonly=True)
|
||||
product_qty_available = fields.Float(related='product_id.qty_available',
|
||||
readonly=True)
|
||||
@@ -1,35 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2013 Solutions Libergia inc. (<http://www.libergia.com>).
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, orm
|
||||
|
||||
|
||||
class mrp_bom(orm.Model):
|
||||
_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
|
||||
),
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="mrp_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom" position="after">
|
||||
<field name="product_standard_price" />
|
||||
<field name="product_qty_available" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_component_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.component.tree</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_component_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom" position="after">
|
||||
<field name="product_standard_price" />
|
||||
<field name="product_qty_available" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<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="//field[@name='bom_lines']/tree" position="inside" >
|
||||
<field name="product_standard_price" />
|
||||
<field name="product_qty_available" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
41
mrp_bom_product_details/views/mrp_bom_product_details.xml
Normal file
41
mrp_bom_product_details/views/mrp_bom_product_details.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record id="mrp_bom_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.tree</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom" position="after">
|
||||
<field name="product_standard_price" />
|
||||
<field name="product_qty_available" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="mrp_bom_component_tree_view" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.component.tree</field>
|
||||
<field name="model">mrp.bom.line</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_component_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_qty" position="before">
|
||||
<field name="product_standard_price" />
|
||||
</field>
|
||||
<field name="product_uom" position="after">
|
||||
<field name="product_qty_available" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<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="//field[@name='bom_line_ids']/tree" position="inside" >
|
||||
<field name="product_standard_price" />
|
||||
<field name="product_qty_available" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user