diff --git a/partner_default_lang_parent/__init__.py b/partner_default_lang_parent/__init__.py new file mode 100644 index 0000000..4b363e2 --- /dev/null +++ b/partner_default_lang_parent/__init__.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Partner Default Lang Parent module for OpenERP +# Copyright (C) 2015 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# 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 . +# +############################################################################## + + diff --git a/partner_default_lang_parent/__openerp__.py b/partner_default_lang_parent/__openerp__.py new file mode 100644 index 0000000..6393d99 --- /dev/null +++ b/partner_default_lang_parent/__openerp__.py @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Partner Default Lang Parent module for OpenERP +# Copyright (C) 2015 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# 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': 'Partner Default Lang Parent', + 'version': '0.1', + 'category': 'Partner', + 'license': 'AGPL-3', + 'summary': 'A new contact gets the language of the parent by default', + 'description': """ +By default, if you create a new contact on a company form, this new contact will have the language of the user that create it. This module changes this behavior : a contact now gets the language of it's parent company by default. + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['base'], + 'data': ['partner_view.xml'], + 'installable': True, +} diff --git a/partner_default_lang_parent/partner_view.xml b/partner_default_lang_parent/partner_view.xml new file mode 100644 index 0000000..0d1286c --- /dev/null +++ b/partner_default_lang_parent/partner_view.xml @@ -0,0 +1,26 @@ + + + + + + + + partner_default_lang_parent.partner.form + res.partner + + + + + + + {'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang} + + + + + +