[ADD] product_export_field_profile module

This commit is contained in:
David Béal
2015-05-24 14:34:29 +02:00
parent 0bae792e79
commit db89d01739
7 changed files with 215 additions and 0 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': 'Product Export Field Profile',
'version': '1.0',
'author': 'Akretion',
'summarize': 'Add predefined list for export',
'maintainer': 'Akretion',
'description': """
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
""",
'category': 'product',
'depends': [
'product_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,15 @@
"id","export_id/id","sequence","name"
"partner0","ir_exp_partner",0,"name"
"partner1","ir_exp_partner",4,"parent_id"
"partner2","ir_exp_partner",8,"city"
"partner3","ir_exp_partner",12,"zip"
"partner4","ir_exp_partner",16,"street"
"partner5","ir_exp_partner",20,"phone"
"partner6","ir_exp_partner",24,"mobile"
"partner7","ir_exp_partner",28,"is_company"
"partner8","ir_exp_partner",32,"function"
"product0","ir_exp_product",0,"profile_id"
"product1","ir_exp_product",4,"categ_id"
"product2","ir_exp_product",8,"name"
"product3","ir_exp_product",12,"attribute_line_ids/attribute_id/id"
"product4","ir_exp_product",16,"attribute_line_ids/value_ids/id"
1 id export_id/id sequence name
2 partner0 ir_exp_partner 0 name
3 partner1 ir_exp_partner 4 parent_id
4 partner2 ir_exp_partner 8 city
5 partner3 ir_exp_partner 12 zip
6 partner4 ir_exp_partner 16 street
7 partner5 ir_exp_partner 20 phone
8 partner6 ir_exp_partner 24 mobile
9 partner7 ir_exp_partner 28 is_company
10 partner8 ir_exp_partner 32 function
11 product0 ir_exp_product 0 profile_id
12 product1 ir_exp_product 4 categ_id
13 product2 ir_exp_product 8 name
14 product3 ir_exp_product 12 attribute_line_ids/attribute_id/id
15 product4 ir_exp_product 16 attribute_line_ids/value_ids/id

View File

@@ -0,0 +1,92 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record id="partner0" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="0"/>
<field name="name">name</field>
</record>
<record id="partner1" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="4"/>
<field name="name">parent_id</field>
</record>
<record id="partner2" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="8"/>
<field name="name">city</field>
</record>
<record id="partner3" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="12"/>
<field name="name">zip</field>
</record>
<record id="partner4" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="16"/>
<field name="name">street</field>
</record>
<record id="partner5" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="20"/>
<field name="name">phone</field>
</record>
<record id="partner6" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="24"/>
<field name="name">mobile</field>
</record>
<record id="partner7" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="28"/>
<field name="name">is_company</field>
</record>
<record id="partner8" model="ir.exports.line">
<field name="export_id" ref="ir_exp_partner"/>
<field name="sequence" eval="32"/>
<field name="name">function</field>
</record>
<record id="product0" model="ir.exports.line">
<field name="export_id" ref="ir_exp_product"/>
<field name="sequence" eval="0"/>
<field name="name">profile_id</field>
</record>
<record id="product1" model="ir.exports.line">
<field name="export_id" ref="ir_exp_product"/>
<field name="sequence" eval="4"/>
<field name="name">categ_id</field>
</record>
<record id="product2" model="ir.exports.line">
<field name="export_id" ref="ir_exp_product"/>
<field name="sequence" eval="8"/>
<field name="name">name</field>
</record>
<record id="product3" model="ir.exports.line">
<field name="export_id" ref="ir_exp_product"/>
<field name="sequence" eval="12"/>
<field name="name">attribute_line_ids/attribute_id/id</field>
</record>
<record id="product4" model="ir.exports.line">
<field name="export_id" ref="ir_exp_product"/>
<field name="sequence" eval="16"/>
<field name="name">attribute_line_ids/value_ids/id</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_partner" model="ir.exports">
<field name="name">Partner</field>
<field name="resource">res.partner</field>
</record>
<record id="ir_exp_product" model="ir.exports">
<field name="name">Product</field>
<field name="resource">product.template</field>
</record>
</data>
</openerp>