From f5d86f7bc8332f60a1f01361b7f9a13f2e714450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=A9al?= Date: Sun, 24 May 2015 18:43:47 +0200 Subject: [PATCH] [ADD] mrp_export_field_profile module --- mrp_export_field_profile/README.rst | 12 ++++ mrp_export_field_profile/__init__.py | 1 + mrp_export_field_profile/__openerp__.py | 52 ++++++++++++++ mrp_export_field_profile/export.py | 27 ++++++++ mrp_export_field_profile/ir.exports.line.csv | 11 +++ .../ir_exports_line_data.xml | 68 +++++++++++++++++++ mrp_export_field_profile/misc_data.xml | 16 +++++ product_export_field_profile/__openerp__.py | 18 ++--- 8 files changed, 196 insertions(+), 9 deletions(-) create mode 100644 mrp_export_field_profile/README.rst create mode 100644 mrp_export_field_profile/__init__.py create mode 100644 mrp_export_field_profile/__openerp__.py create mode 100644 mrp_export_field_profile/export.py create mode 100644 mrp_export_field_profile/ir.exports.line.csv create mode 100644 mrp_export_field_profile/ir_exports_line_data.xml create mode 100644 mrp_export_field_profile/misc_data.xml diff --git a/mrp_export_field_profile/README.rst b/mrp_export_field_profile/README.rst new file mode 100644 index 0000000..110f0f7 --- /dev/null +++ b/mrp_export_field_profile/README.rst @@ -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 diff --git a/mrp_export_field_profile/__init__.py b/mrp_export_field_profile/__init__.py new file mode 100644 index 0000000..4435ea7 --- /dev/null +++ b/mrp_export_field_profile/__init__.py @@ -0,0 +1 @@ +from . import export diff --git a/mrp_export_field_profile/__openerp__.py b/mrp_export_field_profile/__openerp__.py new file mode 100644 index 0000000..58bfb97 --- /dev/null +++ b/mrp_export_field_profile/__openerp__.py @@ -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 . +# +############################################################################## + +{ + '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', +} diff --git a/mrp_export_field_profile/export.py b/mrp_export_field_profile/export.py new file mode 100644 index 0000000..a79d83e --- /dev/null +++ b/mrp_export_field_profile/export.py @@ -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 . +# +############################################################################## + +from openerp import models, fields + + +class IrExportsLine(models.Model): + _inherit = 'ir.exports.line' + + sequence = fields.Integer() diff --git a/mrp_export_field_profile/ir.exports.line.csv b/mrp_export_field_profile/ir.exports.line.csv new file mode 100644 index 0000000..35cea8d --- /dev/null +++ b/mrp_export_field_profile/ir.exports.line.csv @@ -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" diff --git a/mrp_export_field_profile/ir_exports_line_data.xml b/mrp_export_field_profile/ir_exports_line_data.xml new file mode 100644 index 0000000..b7c6b6a --- /dev/null +++ b/mrp_export_field_profile/ir_exports_line_data.xml @@ -0,0 +1,68 @@ + + + + + + + + + id + + + + + + bom_ids/name + + + + + + bom_ids/bom_line_ids/product_id/id + + + + + + bom_ids/bom_line_ids/product_qty + + + + + + id + + + + + + name + + + + + + product_tmpl_id/id + + + + + + product_qty + + + + + + bom_line_ids/product_id/id + + + + + + bom_line_ids/product_qty + + + + + diff --git a/mrp_export_field_profile/misc_data.xml b/mrp_export_field_profile/misc_data.xml new file mode 100644 index 0000000..11b8cb1 --- /dev/null +++ b/mrp_export_field_profile/misc_data.xml @@ -0,0 +1,16 @@ + + + + + + Bill Of Material + product.template + + + + Bill Of Material + mrp.bom + + + + diff --git a/product_export_field_profile/__openerp__.py b/product_export_field_profile/__openerp__.py index 60db510..3b37738 100644 --- a/product_export_field_profile/__openerp__.py +++ b/product_export_field_profile/__openerp__.py @@ -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': [