[ADD] mrp_export_field_profile module

This commit is contained in:
David Béal
2015-05-24 18:43:47 +02:00
parent db89d01739
commit f5d86f7bc8
8 changed files with 196 additions and 9 deletions

View 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

View File

@@ -0,0 +1 @@
from . import export

View 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',
}

View 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()

View 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"
1 id export_id/id sequence name
2 prd_bom1 ir_exp_product_bom 0 id
3 prd_bom2 ir_exp_product_bom 4 bom_ids/name
4 prd_bom3 ir_exp_product_bom 8 bom_ids/bom_line_ids/product_id/id
5 prd_bom4 ir_exp_product_bom 12 bom_ids/bom_line_ids/product_qty
6 bom0 ir_exp_bom 0 id
7 bom1 ir_exp_bom 4 name
8 bom2 ir_exp_bom 8 product_tmpl_id/id
9 bom3 ir_exp_bom 12 product_qty
10 bom4 ir_exp_bom 16 bom_line_ids/product_id/id
11 bom6 ir_exp_bom 24 bom_line_ids/product_qty

View 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>

View 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>

View File

@@ -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': [