[ADD] mrp_export_field_profile module
This commit is contained in:
12
mrp_export_field_profile/README.rst
Normal file
12
mrp_export_field_profile/README.rst
Normal file
@@ -0,0 +1,12 @@
|
||||
Product Export Field Profile
|
||||
============================
|
||||
|
||||
Add export list (native export screen) to:
|
||||
|
||||
* product
|
||||
* partner
|
||||
|
||||
Note to mainteners
|
||||
------------------
|
||||
You can maintain csv data file and convert in xml
|
||||
with https://github.com/akretion/csv2xml4odoo
|
||||
1
mrp_export_field_profile/__init__.py
Normal file
1
mrp_export_field_profile/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import export
|
||||
52
mrp_export_field_profile/__openerp__.py
Normal file
52
mrp_export_field_profile/__openerp__.py
Normal file
@@ -0,0 +1,52 @@
|
||||
# coding: utf-8
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2015 Akretion
|
||||
#
|
||||
# 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 Export Field Profile',
|
||||
'version': '1.0',
|
||||
'author': 'Akretion',
|
||||
'summarize': 'Add predefined list for export',
|
||||
'maintainer': 'Akretion',
|
||||
'description': """
|
||||
MRP Export Field Profile
|
||||
========================
|
||||
|
||||
Add export list (native export screen) to:
|
||||
|
||||
* mrp
|
||||
|
||||
Note to mainteners
|
||||
------------------
|
||||
You can maintain csv data file and convert in xml
|
||||
with https://github.com/akretion/csv2xml4odoo
|
||||
""",
|
||||
'category': 'manufacturing',
|
||||
'depends': [
|
||||
'mrp',
|
||||
'product_export_field_profile',
|
||||
],
|
||||
'website': 'http://www.akretion.com/',
|
||||
'data': [
|
||||
'misc_data.xml',
|
||||
'ir_exports_line_data.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'license': 'AGPL-3',
|
||||
}
|
||||
27
mrp_export_field_profile/export.py
Normal file
27
mrp_export_field_profile/export.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# coding: utf-8
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright 2015 Akretion
|
||||
#
|
||||
# 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 import models, fields
|
||||
|
||||
|
||||
class IrExportsLine(models.Model):
|
||||
_inherit = 'ir.exports.line'
|
||||
|
||||
sequence = fields.Integer()
|
||||
11
mrp_export_field_profile/ir.exports.line.csv
Normal file
11
mrp_export_field_profile/ir.exports.line.csv
Normal file
@@ -0,0 +1,11 @@
|
||||
"id","export_id/id","sequence","name"
|
||||
"prd_bom1","ir_exp_product_bom",0,"id"
|
||||
"prd_bom2","ir_exp_product_bom",4,"bom_ids/name"
|
||||
"prd_bom3","ir_exp_product_bom",8,"bom_ids/bom_line_ids/product_id/id"
|
||||
"prd_bom4","ir_exp_product_bom",12,"bom_ids/bom_line_ids/product_qty"
|
||||
"bom0","ir_exp_bom",0,"id"
|
||||
"bom1","ir_exp_bom",4,"name"
|
||||
"bom2","ir_exp_bom",8,"product_tmpl_id/id"
|
||||
"bom3","ir_exp_bom",12,"product_qty"
|
||||
"bom4","ir_exp_bom",16,"bom_line_ids/product_id/id"
|
||||
"bom6","ir_exp_bom",24,"bom_line_ids/product_qty"
|
||||
|
68
mrp_export_field_profile/ir_exports_line_data.xml
Normal file
68
mrp_export_field_profile/ir_exports_line_data.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<record id="prd_bom1" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_product_bom"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="name">id</field>
|
||||
</record>
|
||||
|
||||
<record id="prd_bom2" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_product_bom"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="name">bom_ids/name</field>
|
||||
</record>
|
||||
|
||||
<record id="prd_bom3" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_product_bom"/>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="name">bom_ids/bom_line_ids/product_id/id</field>
|
||||
</record>
|
||||
|
||||
<record id="prd_bom4" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_product_bom"/>
|
||||
<field name="sequence" eval="12"/>
|
||||
<field name="name">bom_ids/bom_line_ids/product_qty</field>
|
||||
</record>
|
||||
|
||||
<record id="bom0" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_bom"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="name">id</field>
|
||||
</record>
|
||||
|
||||
<record id="bom1" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_bom"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="name">name</field>
|
||||
</record>
|
||||
|
||||
<record id="bom2" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_bom"/>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="name">product_tmpl_id/id</field>
|
||||
</record>
|
||||
|
||||
<record id="bom3" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_bom"/>
|
||||
<field name="sequence" eval="12"/>
|
||||
<field name="name">product_qty</field>
|
||||
</record>
|
||||
|
||||
<record id="bom4" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_bom"/>
|
||||
<field name="sequence" eval="16"/>
|
||||
<field name="name">bom_line_ids/product_id/id</field>
|
||||
</record>
|
||||
|
||||
<record id="bom6" model="ir.exports.line">
|
||||
<field name="export_id" ref="ir_exp_bom"/>
|
||||
<field name="sequence" eval="24"/>
|
||||
<field name="name">bom_line_ids/product_qty</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
16
mrp_export_field_profile/misc_data.xml
Normal file
16
mrp_export_field_profile/misc_data.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="ir_exp_product_bom" model="ir.exports">
|
||||
<field name="name">Bill Of Material</field>
|
||||
<field name="resource">product.template</field>
|
||||
</record>
|
||||
|
||||
<record id="ir_exp_bom" model="ir.exports">
|
||||
<field name="name">Bill Of Material</field>
|
||||
<field name="resource">mrp.bom</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -25,18 +25,18 @@
|
||||
'summarize': 'Add predefined list for export',
|
||||
'maintainer': 'Akretion',
|
||||
'description': """
|
||||
Product Export Field Profile
|
||||
============================
|
||||
Product Export Field Profile
|
||||
============================
|
||||
|
||||
Add export list (native export screen) to:
|
||||
Add export list (native export screen) to:
|
||||
|
||||
* product
|
||||
* partner
|
||||
* product
|
||||
* partner
|
||||
|
||||
Note to mainteners
|
||||
------------------
|
||||
You can maintain csv data file and convert in xml
|
||||
with https://github.com/akretion/csv2xml4odoo
|
||||
Note to mainteners
|
||||
------------------
|
||||
You can maintain csv data file and convert in xml
|
||||
with https://github.com/akretion/csv2xml4odoo
|
||||
""",
|
||||
'category': 'product',
|
||||
'depends': [
|
||||
|
||||
Reference in New Issue
Block a user