From 7d4bf8b55992f8049968c7591e4c1160c6288203 Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Wed, 13 Nov 2013 14:51:48 +0100 Subject: [PATCH 01/13] [MIG] base_partner_sequence: from lp:openobject-addons/extra-trunk to OpenERP v7.0 * Conventions * implement 'copy' method, fix translation * change the scope of sequences to customers and suppliers --- base_partner_sequence/__init__.py | 22 +++++++ base_partner_sequence/__openerp__.py | 45 +++++++++++++ .../i18n/base_partner_sequence.pot | 21 ++++++ base_partner_sequence/i18n/de.po | 21 ++++++ base_partner_sequence/partner.py | 66 +++++++++++++++++++ base_partner_sequence/partner_sequence.xml | 21 ++++++ 6 files changed, 196 insertions(+) create mode 100644 base_partner_sequence/__init__.py create mode 100644 base_partner_sequence/__openerp__.py create mode 100644 base_partner_sequence/i18n/base_partner_sequence.pot create mode 100644 base_partner_sequence/i18n/de.po create mode 100644 base_partner_sequence/partner.py create mode 100644 base_partner_sequence/partner_sequence.xml diff --git a/base_partner_sequence/__init__.py b/base_partner_sequence/__init__.py new file mode 100644 index 000000000..a2cd05adc --- /dev/null +++ b/base_partner_sequence/__init__.py @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). +# +# 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 . import partner +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/__openerp__.py b/base_partner_sequence/__openerp__.py new file mode 100644 index 000000000..6fee88060 --- /dev/null +++ b/base_partner_sequence/__openerp__.py @@ -0,0 +1,45 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2013 initOS GmbH & Co. KG (). +# Author Thomas Rehn +# +# 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": "Add a sequence on customers' code", + "version": "1.1", + "author": "initOS GmbH & Co. KG", + "category": "Generic Modules/Base", + "website": "http://www.initos.com", + "depends": ["base"], + "summary": "Sets customer's code from a sequence", + "description": """ + This module adds the possibility to define a sequence for + the partner code. This code is then set as default when you + create a new customer or supplier, using the defined sequence. + No codes are assigned for contacts such as shipping and + invoice addresses. + This module is a migration of the original base_partner_sequence + addon to OpenERP version 7.0. + """, + "data": ['partner_sequence.xml'], + "demo": [], + "active": False, + "installable": True +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/i18n/base_partner_sequence.pot b/base_partner_sequence/i18n/base_partner_sequence.pot new file mode 100644 index 000000000..769df21c8 --- /dev/null +++ b/base_partner_sequence/i18n/base_partner_sequence.pot @@ -0,0 +1,21 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0-20131013-231025\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-11-13 13:47+0000\n" +"PO-Revision-Date: 2013-11-13 13:47+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "" + diff --git a/base_partner_sequence/i18n/de.po b/base_partner_sequence/i18n/de.po new file mode 100644 index 000000000..b2d209e70 --- /dev/null +++ b/base_partner_sequence/i18n/de.po @@ -0,0 +1,21 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0-20131013-231025\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-11-13 13:47+0000\n" +"PO-Revision-Date: 2013-11-13 13:47+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" + diff --git a/base_partner_sequence/partner.py b/base_partner_sequence/partner.py new file mode 100644 index 000000000..1b0d734e1 --- /dev/null +++ b/base_partner_sequence/partner.py @@ -0,0 +1,66 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2013 initOS GmbH & Co. KG (). +# Author Thomas Rehn +# +# 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.osv import orm, fields + + +class ResPartner(orm.Model): + """Assigns 'ref' from a sequence on creation and copying""" + + _inherit = 'res.partner' + + def create(self, cr, uid, vals, context=None): + context = context or {} + if not vals.get('ref') and self._needsRef(cr, uid, vals=vals, context=context): + vals['ref'] = self.pool.get('ir.sequence').get(cr, uid, 'res.partner') + return super(ResPartner, self).create(cr, uid, vals, context) + + def copy(self, cr, uid, id, default=None, context=None): + default = default or {} + if not default.get('ref') and self._needsRef(cr, uid, id=id, context=context): + default['ref'] = self.pool.get('ir.sequence').get(cr, uid, 'res.partner', context=context) + return super(ResPartner, self).copy(cr, uid, id, default, context=context) + + def _needsRef(self, cr, uid, id=None, vals=None, context=None): + """ + Checks whether a sequence value should be assigned to a partner's 'ref' + + :param cr: database cursor + :param uid: current user id + :param id: id of the partner object + :param vals: known field values of the partner object + :return: true iff a sequence value should be assigned to the partner's 'ref' + """ + if not vals and not id: + raise Exception('Either field values or an id must be provided.') + # only assign a 'ref' if it is a customer or supplier and + # if it not a child object (such as a shipping/invoice address) + if id: + vals = self.read(cr, uid, id, ['parent_id', 'customer', 'supplier'], context=context) + return not vals.get('parent_id') and (vals.get('customer') or vals.get('supplier')) + + _columns = { + 'ref': fields.char('Reference', size=64, readonly=True), + } + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/partner_sequence.xml b/base_partner_sequence/partner_sequence.xml new file mode 100644 index 000000000..76f3d8bb7 --- /dev/null +++ b/base_partner_sequence/partner_sequence.xml @@ -0,0 +1,21 @@ + + + + + # + # Sequences for res.partner + # + + + Partner code + res.partner + + + Partner code + res.partner + P/ + 5 + + + + From 75adcac3ae7a4efdb07685fad8dceff1a4929be5 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Tue, 19 Nov 2013 11:34:50 +0100 Subject: [PATCH 02/13] [IMP] Adapt to commercial partners [FIX] Replacd call to deprecated method --- base_partner_sequence/__openerp__.py | 15 ++++++++++++--- base_partner_sequence/partner.py | 19 +++++++++++++------ base_partner_sequence/partner_view.xml | 20 ++++++++++++++++++++ 3 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 base_partner_sequence/partner_view.xml diff --git a/base_partner_sequence/__openerp__.py b/base_partner_sequence/__openerp__.py index 6fee88060..0b7d60a8f 100644 --- a/base_partner_sequence/__openerp__.py +++ b/base_partner_sequence/__openerp__.py @@ -23,7 +23,7 @@ { "name": "Add a sequence on customers' code", "version": "1.1", - "author": "initOS GmbH & Co. KG", + "author": "Tiny/initOS GmbH & Co. KG", "category": "Generic Modules/Base", "website": "http://www.initos.com", "depends": ["base"], @@ -31,13 +31,22 @@ "description": """ This module adds the possibility to define a sequence for the partner code. This code is then set as default when you - create a new customer or supplier, using the defined sequence. + create a new commercial partner, using the defined sequence. + + The reference field is treated as a commercial field, i.e. it + is managed from the commercial partner and then propagated to + the partner's contacts. The field is visible on the contacts, + but it can only be modified from the commercial partner. + No codes are assigned for contacts such as shipping and invoice addresses. This module is a migration of the original base_partner_sequence addon to OpenERP version 7.0. """, - "data": ['partner_sequence.xml'], + "data": [ + 'partner_sequence.xml', + 'partner_view.xml', + ], "demo": [], "active": False, "installable": True diff --git a/base_partner_sequence/partner.py b/base_partner_sequence/partner.py index 1b0d734e1..674ffa66e 100644 --- a/base_partner_sequence/partner.py +++ b/base_partner_sequence/partner.py @@ -32,13 +32,13 @@ class ResPartner(orm.Model): def create(self, cr, uid, vals, context=None): context = context or {} if not vals.get('ref') and self._needsRef(cr, uid, vals=vals, context=context): - vals['ref'] = self.pool.get('ir.sequence').get(cr, uid, 'res.partner') + vals['ref'] = self.pool.get('ir.sequence').next_by_code(cr, uid, 'res.partner') return super(ResPartner, self).create(cr, uid, vals, context) def copy(self, cr, uid, id, default=None, context=None): default = default or {} if not default.get('ref') and self._needsRef(cr, uid, id=id, context=context): - default['ref'] = self.pool.get('ir.sequence').get(cr, uid, 'res.partner', context=context) + default['ref'] = self.pool.get('ir.sequence').next_by_code(cr, uid, 'res.partner', context=context) return super(ResPartner, self).copy(cr, uid, id, default, context=context) def _needsRef(self, cr, uid, id=None, vals=None, context=None): @@ -53,14 +53,21 @@ class ResPartner(orm.Model): """ if not vals and not id: raise Exception('Either field values or an id must be provided.') - # only assign a 'ref' if it is a customer or supplier and - # if it not a child object (such as a shipping/invoice address) + # only assign a 'ref' to commercial partners if id: - vals = self.read(cr, uid, id, ['parent_id', 'customer', 'supplier'], context=context) - return not vals.get('parent_id') and (vals.get('customer') or vals.get('supplier')) + vals = self.read(cr, uid, id, ['parent_id', 'is_company'], context=context) + return vals.get('is_company') or not vals.get('parent_id') _columns = { 'ref': fields.char('Reference', size=64, readonly=True), } + def _commercial_fields(self, cr, uid, context=None): + """ + Make the partner reference a field that is propagated + to the partner's contacts + """ + return super(ResPartner, self)._commercial_fields( + cr, uid, context=context) + ['ref'] + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/partner_view.xml b/base_partner_sequence/partner_view.xml new file mode 100644 index 000000000..00dcb16bb --- /dev/null +++ b/base_partner_sequence/partner_view.xml @@ -0,0 +1,20 @@ + + + + + + Make partner reference readonly when non-commercial + res.partner + + + + { + 'readonly': [('is_company', '=', False), + ('parent_id', '!=', False)]} + + + + + + + From 22c5283e4de60cbef77c1fb6ff47cf300939cd9b Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Tue, 26 Nov 2013 09:29:02 +0100 Subject: [PATCH 03/13] [FIX] base_partner_sequence: shortened long lines + bug in copy --- base_partner_sequence/partner.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/base_partner_sequence/partner.py b/base_partner_sequence/partner.py index 674ffa66e..190391fcc 100644 --- a/base_partner_sequence/partner.py +++ b/base_partner_sequence/partner.py @@ -31,15 +31,20 @@ class ResPartner(orm.Model): def create(self, cr, uid, vals, context=None): context = context or {} - if not vals.get('ref') and self._needsRef(cr, uid, vals=vals, context=context): - vals['ref'] = self.pool.get('ir.sequence').next_by_code(cr, uid, 'res.partner') + if not vals.get('ref') and self._needsRef(cr, uid, vals=vals, + context=context): + vals['ref'] = self.pool.get('ir.sequence')\ + .next_by_code(cr, uid, 'res.partner') return super(ResPartner, self).create(cr, uid, vals, context) def copy(self, cr, uid, id, default=None, context=None): default = default or {} - if not default.get('ref') and self._needsRef(cr, uid, id=id, context=context): - default['ref'] = self.pool.get('ir.sequence').next_by_code(cr, uid, 'res.partner', context=context) - return super(ResPartner, self).copy(cr, uid, id, default, context=context) + if self._needsRef(cr, uid, id=id, context=context): + default['ref'] = self.pool.get('ir.sequence')\ + .next_by_code(cr, uid, 'res.partner', + context=context) + return super(ResPartner, self).copy(cr, uid, id, default, + context=context) def _needsRef(self, cr, uid, id=None, vals=None, context=None): """ @@ -49,13 +54,15 @@ class ResPartner(orm.Model): :param uid: current user id :param id: id of the partner object :param vals: known field values of the partner object - :return: true iff a sequence value should be assigned to the partner's 'ref' + :return: true iff a sequence value should be assigned to the\ + partner's 'ref' """ if not vals and not id: raise Exception('Either field values or an id must be provided.') # only assign a 'ref' to commercial partners if id: - vals = self.read(cr, uid, id, ['parent_id', 'is_company'], context=context) + vals = self.read(cr, uid, id, ['parent_id', 'is_company'], + context=context) return vals.get('is_company') or not vals.get('parent_id') _columns = { From 37b53f46a852b40812140e8f880a2b33a3759790 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Fri, 18 Jul 2014 19:22:54 -0400 Subject: [PATCH 04/13] Fix pep8 --- base_partner_sequence/__init__.py | 2 +- base_partner_sequence/__openerp__.py | 6 +++--- .../static/description/icon.png | Bin 0 -> 9455 bytes 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 base_partner_sequence/static/description/icon.png diff --git a/base_partner_sequence/__init__.py b/base_partner_sequence/__init__.py index a2cd05adc..c6e9f2e38 100644 --- a/base_partner_sequence/__init__.py +++ b/base_partner_sequence/__init__.py @@ -18,5 +18,5 @@ # along with this program. If not, see . # ############################################################################## + from . import partner -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/__openerp__.py b/base_partner_sequence/__openerp__.py index 0b7d60a8f..22a6dd805 100644 --- a/base_partner_sequence/__openerp__.py +++ b/base_partner_sequence/__openerp__.py @@ -22,8 +22,8 @@ ############################################################################## { "name": "Add a sequence on customers' code", - "version": "1.1", - "author": "Tiny/initOS GmbH & Co. KG", + "version": "8.0.1.1.0", + "author": "Tiny/initOS GmbH & Co. KG,Odoo Community Association (OCA)", "category": "Generic Modules/Base", "website": "http://www.initos.com", "depends": ["base"], @@ -46,7 +46,7 @@ "data": [ 'partner_sequence.xml', 'partner_view.xml', - ], + ], "demo": [], "active": False, "installable": True diff --git a/base_partner_sequence/static/description/icon.png b/base_partner_sequence/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From 3712892fa5351ab7b65a160f73cc3c25375ca678 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 30 Apr 2015 10:42:29 +0200 Subject: [PATCH 05/13] Do no longer set the 'ref' field readonly Because it is set to readonly conditionally on the view. Setting the field to readonly prevents users to import it with csv files. --- base_partner_sequence/partner.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/base_partner_sequence/partner.py b/base_partner_sequence/partner.py index 190391fcc..9f66b41d5 100644 --- a/base_partner_sequence/partner.py +++ b/base_partner_sequence/partner.py @@ -21,7 +21,7 @@ # ############################################################################## -from openerp.osv import orm, fields +from openerp.osv import orm class ResPartner(orm.Model): @@ -65,10 +65,6 @@ class ResPartner(orm.Model): context=context) return vals.get('is_company') or not vals.get('parent_id') - _columns = { - 'ref': fields.char('Reference', size=64, readonly=True), - } - def _commercial_fields(self, cr, uid, context=None): """ Make the partner reference a field that is propagated From 47a6020dea02b6c01e443046d46b974f5d07f443 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Tue, 1 Sep 2015 13:48:55 -0400 Subject: [PATCH 06/13] OCA Transbot updated translations from Transifex --- base_partner_sequence/i18n/es.po | 32 +++++++++++++++++++++++++++++ base_partner_sequence/i18n/fr.po | 32 +++++++++++++++++++++++++++++ base_partner_sequence/i18n/nl.po | 31 ++++++++++++++++++++++++++++ base_partner_sequence/i18n/pt_BR.po | 32 +++++++++++++++++++++++++++++ base_partner_sequence/i18n/sl.po | 32 +++++++++++++++++++++++++++++ 5 files changed, 159 insertions(+) create mode 100644 base_partner_sequence/i18n/es.po create mode 100644 base_partner_sequence/i18n/fr.po create mode 100644 base_partner_sequence/i18n/nl.po create mode 100644 base_partner_sequence/i18n/pt_BR.po create mode 100644 base_partner_sequence/i18n/sl.po diff --git a/base_partner_sequence/i18n/es.po b/base_partner_sequence/i18n/es.po new file mode 100644 index 000000000..d20303d02 --- /dev/null +++ b/base_partner_sequence/i18n/es.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# Francisco Palm , 2015 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-23 21:40+0000\n" +"PO-Revision-Date: 2015-09-13 14:50+0000\n" +"Last-Translator: Francisco Palm \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Socio" + +#. module: base_partner_sequence +#: view:res.partner:base_partner_sequence.view_partner_form +msgid "" +"{\n" +" 'readonly': [('is_company', '=', False),\n" +" ('parent_id', '!=', False)]}" +msgstr "{\n'readonly': [('is_company', '=', False),\n('parent_id', '!=', False)]}" diff --git a/base_partner_sequence/i18n/fr.po b/base_partner_sequence/i18n/fr.po new file mode 100644 index 000000000..19911d7c7 --- /dev/null +++ b/base_partner_sequence/i18n/fr.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# Bruno JOLIVEAU, 2015 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-28 15:54+0000\n" +"PO-Revision-Date: 2015-08-19 15:15+0000\n" +"Last-Translator: Bruno JOLIVEAU\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partenaire" + +#. module: base_partner_sequence +#: view:res.partner:base_partner_sequence.view_partner_form +msgid "" +"{\n" +" 'readonly': [('is_company', '=', False),\n" +" ('parent_id', '!=', False)]}" +msgstr "" diff --git a/base_partner_sequence/i18n/nl.po b/base_partner_sequence/i18n/nl.po new file mode 100644 index 000000000..b1e4c66aa --- /dev/null +++ b/base_partner_sequence/i18n/nl.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-23 21:40+0000\n" +"PO-Revision-Date: 2015-10-01 12:32+0000\n" +"Last-Translator: Maxime Chambreuil \n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: base_partner_sequence +#: view:res.partner:base_partner_sequence.view_partner_form +msgid "" +"{\n" +" 'readonly': [('is_company', '=', False),\n" +" ('parent_id', '!=', False)]}" +msgstr "" diff --git a/base_partner_sequence/i18n/pt_BR.po b/base_partner_sequence/i18n/pt_BR.po new file mode 100644 index 000000000..207979b3f --- /dev/null +++ b/base_partner_sequence/i18n/pt_BR.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# danimaribeiro , 2015 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-28 15:54+0000\n" +"PO-Revision-Date: 2015-07-22 18:40+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Parceiro" + +#. module: base_partner_sequence +#: view:res.partner:base_partner_sequence.view_partner_form +msgid "" +"{\n" +" 'readonly': [('is_company', '=', False),\n" +" ('parent_id', '!=', False)]}" +msgstr "" diff --git a/base_partner_sequence/i18n/sl.po b/base_partner_sequence/i18n/sl.po new file mode 100644 index 000000000..6d9894c0e --- /dev/null +++ b/base_partner_sequence/i18n/sl.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-28 15:54+0000\n" +"PO-Revision-Date: 2015-05-28 07:14+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: base_partner_sequence +#: view:res.partner:base_partner_sequence.view_partner_form +msgid "" +"{\n" +" 'readonly': [('is_company', '=', False),\n" +" ('parent_id', '!=', False)]}" +msgstr "{\n 'readonly': [('is_company', '=', False),\n ('parent_id', '!=', False)]}" From 4f79f0c216b677919f6155b554f2765cd5b24218 Mon Sep 17 00:00:00 2001 From: "Laurent Mignon (ACSONE)" Date: Wed, 28 Oct 2015 16:26:45 +0100 Subject: [PATCH 07/13] [IMP] base_partner_sequence Structure + new API --- base_partner_sequence/README.rst | 68 +++++++++++++++++ base_partner_sequence/__init__.py | 23 +----- base_partner_sequence/__openerp__.py | 28 ++----- .../{ => data}/partner_sequence.xml | 0 base_partner_sequence/models/__init__.py | 2 + base_partner_sequence/models/partner.py | 69 +++++++++++++++++ base_partner_sequence/partner.py | 76 ------------------- base_partner_sequence/tests/__init__.py | 2 + .../tests/test_base_partner_sequence.py | 19 +++++ .../{ => views}/partner_view.xml | 0 10 files changed, 168 insertions(+), 119 deletions(-) create mode 100644 base_partner_sequence/README.rst rename base_partner_sequence/{ => data}/partner_sequence.xml (100%) create mode 100644 base_partner_sequence/models/__init__.py create mode 100644 base_partner_sequence/models/partner.py delete mode 100644 base_partner_sequence/partner.py create mode 100644 base_partner_sequence/tests/__init__.py create mode 100644 base_partner_sequence/tests/test_base_partner_sequence.py rename base_partner_sequence/{ => views}/partner_view.xml (100%) diff --git a/base_partner_sequence/README.rst b/base_partner_sequence/README.rst new file mode 100644 index 000000000..39c89d65d --- /dev/null +++ b/base_partner_sequence/README.rst @@ -0,0 +1,68 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +====================================== +Add a sequence on partner's reference. +====================================== + +This module adds the possibility to define a sequence for +the partner's reference. This reference is then set as default +when you create a new partner, using the defined sequence. + +The reference field is treated as a commercial field, i.e. it +is managed from the commercial partner and then propagated to +the partner's contacts. The field is visible on the contacts, +but it can only be modified from the commercial partner. + +No references are assigned for contacts such as shipping and +invoice addresses. +This module is a migration of the original base_partner_sequence +addon to OpenERP version 7.0. + + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/134/8.0 + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + + +Credits +======= + +Contributors +------------ + +* Thomas Rehn +* Stefan Rijnhart +* Yannick Vaucher +* Sandy Carter +* Laurent Mignon (ACSONE) +* Guewen Baconnier +* Alexandre Fayolle + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/base_partner_sequence/__init__.py b/base_partner_sequence/__init__.py index c6e9f2e38..fcf98fb46 100644 --- a/base_partner_sequence/__init__.py +++ b/base_partner_sequence/__init__.py @@ -1,22 +1,3 @@ # -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# -# 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 . import partner +from . import models +from . import tests diff --git a/base_partner_sequence/__openerp__.py b/base_partner_sequence/__openerp__.py index 22a6dd805..be79f9951 100644 --- a/base_partner_sequence/__openerp__.py +++ b/base_partner_sequence/__openerp__.py @@ -22,33 +22,17 @@ ############################################################################## { "name": "Add a sequence on customers' code", - "version": "8.0.1.1.0", - "author": "Tiny/initOS GmbH & Co. KG,Odoo Community Association (OCA)", + "version": "8.0.1.1.1", + "author": "Tiny/initOS GmbH & Co. KG," + "ACSONE SA/NV," + "Odoo Community Association (OCA)", "category": "Generic Modules/Base", "website": "http://www.initos.com", - "depends": ["base"], "summary": "Sets customer's code from a sequence", - "description": """ - This module adds the possibility to define a sequence for - the partner code. This code is then set as default when you - create a new commercial partner, using the defined sequence. - - The reference field is treated as a commercial field, i.e. it - is managed from the commercial partner and then propagated to - the partner's contacts. The field is visible on the contacts, - but it can only be modified from the commercial partner. - - No codes are assigned for contacts such as shipping and - invoice addresses. - This module is a migration of the original base_partner_sequence - addon to OpenERP version 7.0. - """, "data": [ - 'partner_sequence.xml', - 'partner_view.xml', + 'data/partner_sequence.xml', + 'views/partner_view.xml', ], - "demo": [], "active": False, "installable": True } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/partner_sequence.xml b/base_partner_sequence/data/partner_sequence.xml similarity index 100% rename from base_partner_sequence/partner_sequence.xml rename to base_partner_sequence/data/partner_sequence.xml diff --git a/base_partner_sequence/models/__init__.py b/base_partner_sequence/models/__init__.py new file mode 100644 index 000000000..cb85880b7 --- /dev/null +++ b/base_partner_sequence/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import partner diff --git a/base_partner_sequence/models/partner.py b/base_partner_sequence/models/partner.py new file mode 100644 index 000000000..8a6f84274 --- /dev/null +++ b/base_partner_sequence/models/partner.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# © 2004-2009 Tiny SPRL (). +# © 2013 initOS GmbH & Co. KG (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, api + + +class ResPartner(models.Model): + """Assigns 'ref' from a sequence on creation and copying""" + + _inherit = 'res.partner' + + @api.model + def _needsRef(self, partner_id=None, vals=None): + """ + Checks whether a sequence value should be assigned to a partner's 'ref' + + :param parnter_id: id of the partner object + :param vals: known field values of the partner object + :return: true iff a sequence value should be assigned to the\ + partner's 'ref' + """ + if not vals and not partner_id: + raise Exception('Either field values or an id must be provided.') + vals = vals or {} + # only assign a 'ref' to commercial partners + if partner_id: + partner = self.browse(partner_id) + vals.setdefault('is_company', partner.is_company) + vals.setdefault('parent_id', partner.parent_id.id) + return vals.get('is_company') or not vals.get('parent_id') + + @api.model + def _commercial_fields(self): + """ + Make the partner reference a field that is propagated + to the partner's contacts + """ + return super(ResPartner, self)._commercial_fields() + ['ref'] + + @api.model + def _get_next_ref(self, partner=None, vals=None): + return self.env['ir.sequence'].get('res.partner') + + @api.model + def create(self, vals): + if not vals.get('ref') and self._needsRef(vals=vals): + vals['ref'] = self._get_next_ref(vals=vals) + return super(ResPartner, self).create(vals) + + @api.multi + def write(self, vals): + for partner in self: + ref = vals.get('ref') if 'ref' in vals else partner.ref + if not ref and self._needsRef(partner.id, vals): + vals['ref'] = self._get_next_ref(partner, vals) + super(ResPartner, partner).write(vals) + return True + + @api.one + def copy(self, default=None): + default = default or {} + if self._needsRef(self.id): + default.update({ + 'ref': self._get_next_ref(), + }) + + return super(ResPartner, self).copy(default) diff --git a/base_partner_sequence/partner.py b/base_partner_sequence/partner.py deleted file mode 100644 index 9f66b41d5..000000000 --- a/base_partner_sequence/partner.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# Copyright (C) 2013 initOS GmbH & Co. KG (). -# Author Thomas Rehn -# -# 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.osv import orm - - -class ResPartner(orm.Model): - """Assigns 'ref' from a sequence on creation and copying""" - - _inherit = 'res.partner' - - def create(self, cr, uid, vals, context=None): - context = context or {} - if not vals.get('ref') and self._needsRef(cr, uid, vals=vals, - context=context): - vals['ref'] = self.pool.get('ir.sequence')\ - .next_by_code(cr, uid, 'res.partner') - return super(ResPartner, self).create(cr, uid, vals, context) - - def copy(self, cr, uid, id, default=None, context=None): - default = default or {} - if self._needsRef(cr, uid, id=id, context=context): - default['ref'] = self.pool.get('ir.sequence')\ - .next_by_code(cr, uid, 'res.partner', - context=context) - return super(ResPartner, self).copy(cr, uid, id, default, - context=context) - - def _needsRef(self, cr, uid, id=None, vals=None, context=None): - """ - Checks whether a sequence value should be assigned to a partner's 'ref' - - :param cr: database cursor - :param uid: current user id - :param id: id of the partner object - :param vals: known field values of the partner object - :return: true iff a sequence value should be assigned to the\ - partner's 'ref' - """ - if not vals and not id: - raise Exception('Either field values or an id must be provided.') - # only assign a 'ref' to commercial partners - if id: - vals = self.read(cr, uid, id, ['parent_id', 'is_company'], - context=context) - return vals.get('is_company') or not vals.get('parent_id') - - def _commercial_fields(self, cr, uid, context=None): - """ - Make the partner reference a field that is propagated - to the partner's contacts - """ - return super(ResPartner, self)._commercial_fields( - cr, uid, context=context) + ['ref'] - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/base_partner_sequence/tests/__init__.py b/base_partner_sequence/tests/__init__.py new file mode 100644 index 000000000..8ef33bbfe --- /dev/null +++ b/base_partner_sequence/tests/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import test_base_partner_sequence diff --git a/base_partner_sequence/tests/test_base_partner_sequence.py b/base_partner_sequence/tests/test_base_partner_sequence.py new file mode 100644 index 000000000..24296253a --- /dev/null +++ b/base_partner_sequence/tests/test_base_partner_sequence.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# © 2015 ACSONE SA/NV (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import openerp.tests.common as common + + +class TestBasePartnerSequence(common.TransactionCase): + + def test_ref_sequence_on_partner(self): + res_partner = self.env['res.partner'] + partner = res_partner.create({ + 'name': "test1", + 'email': "test@test.com"}) + self.assertTrue(partner.ref, "A partner has always a ref.") + + copy = partner.copy() + self.assertTrue(copy.ref, "A partner with ref created by copy " + "has a ref by default.") diff --git a/base_partner_sequence/partner_view.xml b/base_partner_sequence/views/partner_view.xml similarity index 100% rename from base_partner_sequence/partner_view.xml rename to base_partner_sequence/views/partner_view.xml From d08ee2975b88541d987e37bdbbccd9021911e4ab Mon Sep 17 00:00:00 2001 From: cubells Date: Fri, 16 Dec 2016 05:34:15 +0100 Subject: [PATCH 08/13] base_partner_sequence module --- base_partner_sequence/README.rst | 16 ++++--- base_partner_sequence/__init__.py | 7 +++- base_partner_sequence/__openerp__.py | 38 ++++++----------- .../data/partner_sequence.xml | 26 ++++-------- .../i18n/base_partner_sequence.pot | 21 ---------- base_partner_sequence/models/__init__.py | 5 +++ base_partner_sequence/models/partner.py | 42 +++++++++++-------- base_partner_sequence/tests/__init__.py | 5 +++ .../tests/test_base_partner_sequence.py | 28 ++++++++++--- base_partner_sequence/views/partner_view.xml | 26 +++++------- 10 files changed, 101 insertions(+), 113 deletions(-) delete mode 100644 base_partner_sequence/i18n/base_partner_sequence.pot diff --git a/base_partner_sequence/README.rst b/base_partner_sequence/README.rst index 39c89d65d..040ba9227 100644 --- a/base_partner_sequence/README.rst +++ b/base_partner_sequence/README.rst @@ -7,7 +7,7 @@ Add a sequence on partner's reference. ====================================== This module adds the possibility to define a sequence for -the partner's reference. This reference is then set as default +the partner's reference. This reference is then set as default when you create a new partner, using the defined sequence. The reference field is treated as a commercial field, i.e. it @@ -17,8 +17,6 @@ but it can only be modified from the commercial partner. No references are assigned for contacts such as shipping and invoice addresses. -This module is a migration of the original base_partner_sequence -addon to OpenERP version 7.0. Usage @@ -26,17 +24,16 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/134/8.0 + :target: https://runbot.odoo-community.org/runbot/134/9.0 Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. - +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. Credits ======= @@ -51,6 +48,7 @@ Contributors * Laurent Mignon (ACSONE) * Guewen Baconnier * Alexandre Fayolle +* Vicent Cubells Maintainer ---------- diff --git a/base_partner_sequence/__init__.py b/base_partner_sequence/__init__.py index fcf98fb46..062d23fcc 100644 --- a/base_partner_sequence/__init__.py +++ b/base_partner_sequence/__init__.py @@ -1,3 +1,8 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- +# Copyright 2004-2009 Tiny SPRL (). +# Copyright 2013 initOS GmbH & Co. KG (). +# Copyright 2016 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import models from . import tests diff --git a/base_partner_sequence/__openerp__.py b/base_partner_sequence/__openerp__.py index be79f9951..5e3163105 100644 --- a/base_partner_sequence/__openerp__.py +++ b/base_partner_sequence/__openerp__.py @@ -1,38 +1,26 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# Copyright (C) 2013 initOS GmbH & Co. KG (). -# Author Thomas Rehn -# -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# Copyright 2004-2009 Tiny SPRL (). +# Copyright 2013 initOS GmbH & Co. KG (). +# Copyright 2016 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { "name": "Add a sequence on customers' code", - "version": "8.0.1.1.1", + "version": "9.0.0.1.0", "author": "Tiny/initOS GmbH & Co. KG," "ACSONE SA/NV," + "Tecnativa, " "Odoo Community Association (OCA)", "category": "Generic Modules/Base", "website": "http://www.initos.com", + "depends": [ + 'base', + ], "summary": "Sets customer's code from a sequence", "data": [ 'data/partner_sequence.xml', 'views/partner_view.xml', ], - "active": False, - "installable": True + "installable": True, + "license": "AGPL-3", } diff --git a/base_partner_sequence/data/partner_sequence.xml b/base_partner_sequence/data/partner_sequence.xml index 76f3d8bb7..aa053d1bd 100644 --- a/base_partner_sequence/data/partner_sequence.xml +++ b/base_partner_sequence/data/partner_sequence.xml @@ -1,21 +1,11 @@ - - + - # - # Sequences for res.partner - # + + Partner code + res.partner + P/ + 5 + - - Partner code - res.partner - - - Partner code - res.partner - P/ - 5 - - - - + diff --git a/base_partner_sequence/i18n/base_partner_sequence.pot b/base_partner_sequence/i18n/base_partner_sequence.pot deleted file mode 100644 index 769df21c8..000000000 --- a/base_partner_sequence/i18n/base_partner_sequence.pot +++ /dev/null @@ -1,21 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0-20131013-231025\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-13 13:47+0000\n" -"PO-Revision-Date: 2013-11-13 13:47+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: base_partner_sequence -#: model:ir.model,name:base_partner_sequence.model_res_partner -msgid "Partner" -msgstr "" - diff --git a/base_partner_sequence/models/__init__.py b/base_partner_sequence/models/__init__.py index cb85880b7..9e8bfde26 100644 --- a/base_partner_sequence/models/__init__.py +++ b/base_partner_sequence/models/__init__.py @@ -1,2 +1,7 @@ # -*- coding: utf-8 -*- +# Copyright 2004-2009 Tiny SPRL (). +# Copyright 2013 initOS GmbH & Co. KG (). +# Copyright 2016 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import partner diff --git a/base_partner_sequence/models/partner.py b/base_partner_sequence/models/partner.py index 8a6f84274..9dea8b649 100644 --- a/base_partner_sequence/models/partner.py +++ b/base_partner_sequence/models/partner.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- -# © 2004-2009 Tiny SPRL (). -# © 2013 initOS GmbH & Co. KG (). +# Copyright 2004-2009 Tiny SPRL (). +# Copyright 2013 initOS GmbH & Co. KG (). +# Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, api +from openerp import models, api, exceptions, _ class ResPartner(models.Model): @@ -16,20 +17,24 @@ class ResPartner(models.Model): """ Checks whether a sequence value should be assigned to a partner's 'ref' - :param parnter_id: id of the partner object + :param partner_id: id of the partner object :param vals: known field values of the partner object - :return: true iff a sequence value should be assigned to the\ - partner's 'ref' + :return: true if a sequence value should be assigned to the + partner's 'ref' """ if not vals and not partner_id: - raise Exception('Either field values or an id must be provided.') - vals = vals or {} + raise exceptions.Warning( + _('Either field values or an id must be provided.') + ) + if vals is None: + vals = {} + values = vals.copy() # only assign a 'ref' to commercial partners if partner_id: partner = self.browse(partner_id) - vals.setdefault('is_company', partner.is_company) - vals.setdefault('parent_id', partner.parent_id.id) - return vals.get('is_company') or not vals.get('parent_id') + values.setdefault('is_company', partner.is_company) + values.setdefault('parent_id', partner.parent_id.id) + return values.get('is_company') or not values.get('parent_id') @api.model def _commercial_fields(self): @@ -41,7 +46,7 @@ class ResPartner(models.Model): @api.model def _get_next_ref(self, partner=None, vals=None): - return self.env['ir.sequence'].get('res.partner') + return self.env['ir.sequence'].next_by_code('res.partner') @api.model def create(self, vals): @@ -58,12 +63,13 @@ class ResPartner(models.Model): super(ResPartner, partner).write(vals) return True - @api.one + @api.multi def copy(self, default=None): - default = default or {} - if self._needsRef(self.id): - default.update({ - 'ref': self._get_next_ref(), - }) + for partner in self: + default = default or {} + if self._needsRef(self.id): + default.update({ + 'ref': self._get_next_ref(), + }) return super(ResPartner, self).copy(default) diff --git a/base_partner_sequence/tests/__init__.py b/base_partner_sequence/tests/__init__.py index 8ef33bbfe..675c51b6e 100644 --- a/base_partner_sequence/tests/__init__.py +++ b/base_partner_sequence/tests/__init__.py @@ -1,2 +1,7 @@ # -*- coding: utf-8 -*- +# Copyright 2004-2009 Tiny SPRL (). +# Copyright 2013 initOS GmbH & Co. KG (). +# Copyright 2016 Tecnativa - Vicent Cubells +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import test_base_partner_sequence diff --git a/base_partner_sequence/tests/test_base_partner_sequence.py b/base_partner_sequence/tests/test_base_partner_sequence.py index 24296253a..32c68f2b1 100644 --- a/base_partner_sequence/tests/test_base_partner_sequence.py +++ b/base_partner_sequence/tests/test_base_partner_sequence.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# © 2015 ACSONE SA/NV (). +# Copyright 2015 ACSONE SA/NV (). +# Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import openerp.tests.common as common @@ -7,13 +8,28 @@ import openerp.tests.common as common class TestBasePartnerSequence(common.TransactionCase): - def test_ref_sequence_on_partner(self): - res_partner = self.env['res.partner'] - partner = res_partner.create({ + def setUp(self): + super(TestBasePartnerSequence, self).setUp() + + self.res_partner = self.env['res.partner'] + self.partner = self.res_partner.create({ 'name': "test1", 'email': "test@test.com"}) - self.assertTrue(partner.ref, "A partner has always a ref.") - copy = partner.copy() + def test_ref_sequence_on_partner(self): + # Test sequence on creating partner and copying it + self.assertTrue(self.partner.ref, "A partner has always a ref.") + + copy = self.partner.copy() self.assertTrue(copy.ref, "A partner with ref created by copy " "has a ref by default.") + + def test_ref_sequence_on_contact(self): + # Test if sequence doesn't increase on creating a contact child + contact = self.res_partner.create({ + 'name': "contact1", + 'email': "contact@contact.com", + 'parent_id': self.partner.id}) + self.assertEqual( + self.partner.ref, contact.ref, "All it's ok as sequence doesn't " + "increase.") diff --git a/base_partner_sequence/views/partner_view.xml b/base_partner_sequence/views/partner_view.xml index 00dcb16bb..f4207a625 100644 --- a/base_partner_sequence/views/partner_view.xml +++ b/base_partner_sequence/views/partner_view.xml @@ -1,20 +1,16 @@ - - + - - Make partner reference readonly when non-commercial - res.partner - - - - { - 'readonly': [('is_company', '=', False), - ('parent_id', '!=', False)]} - + + Make partner reference readonly when non-commercial + res.partner + + + + {'readonly': [('is_company', '=', False), ('parent_id', '!=', False)]} + + - - - + From 1e84c88f2ea0de05d096cd28f4933218a703bb2c Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Mon, 19 Dec 2016 11:45:34 +0100 Subject: [PATCH 09/13] [MIG] base_partner_sequence: Migration to 10.0 --- base_partner_sequence/README.rst | 32 +++-- .../{__openerp__.py => __manifest__.py} | 9 +- .../data/partner_sequence.xml | 2 - base_partner_sequence/models/partner.py | 111 ++++++++++-------- 4 files changed, 90 insertions(+), 64 deletions(-) rename base_partner_sequence/{__openerp__.py => __manifest__.py} (79%) diff --git a/base_partner_sequence/README.rst b/base_partner_sequence/README.rst index 040ba9227..acdb03db3 100644 --- a/base_partner_sequence/README.rst +++ b/base_partner_sequence/README.rst @@ -1,10 +1,10 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 -====================================== -Add a sequence on partner's reference. -====================================== +===================== +Base Partner Sequence +===================== This module adds the possibility to define a sequence for the partner's reference. This reference is then set as default @@ -18,13 +18,24 @@ but it can only be modified from the commercial partner. No references are assigned for contacts such as shipping and invoice addresses. +Installation +============ + +There are no special instructions regarding installation. + +Configuration +============= + +No configuration is needed. Usage ===== +To use this module, you need to: + .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/134/9.0 + :target: https://runbot.odoo-community.org/runbot/134/10.0 Bug Tracker @@ -38,6 +49,11 @@ help us smashing it by providing a detailed and welcomed feedback. Credits ======= +Images +------ + +* Odoo Community Association: `Icon `_. + Contributors ------------ @@ -49,6 +65,8 @@ Contributors * Guewen Baconnier * Alexandre Fayolle * Vicent Cubells +* Akim Juillerat + Maintainer ---------- @@ -63,4 +81,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/base_partner_sequence/__openerp__.py b/base_partner_sequence/__manifest__.py similarity index 79% rename from base_partner_sequence/__openerp__.py rename to base_partner_sequence/__manifest__.py index 5e3163105..39f656ce6 100644 --- a/base_partner_sequence/__openerp__.py +++ b/base_partner_sequence/__manifest__.py @@ -2,15 +2,16 @@ # Copyright 2004-2009 Tiny SPRL (). # Copyright 2013 initOS GmbH & Co. KG (). # Copyright 2016 Tecnativa - Vicent Cubells +# Copyright 2016 Camptocamp - Akim Juillerat (). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - { - "name": "Add a sequence on customers' code", - "version": "9.0.0.1.0", "author": "Tiny/initOS GmbH & Co. KG," "ACSONE SA/NV," "Tecnativa, " - "Odoo Community Association (OCA)", + "Odoo Community Association (OCA), " + "Camptocamp, ", + "name": "Add a sequence on customers' code", + "version": "10.0.1.0.0", "category": "Generic Modules/Base", "website": "http://www.initos.com", "depends": [ diff --git a/base_partner_sequence/data/partner_sequence.xml b/base_partner_sequence/data/partner_sequence.xml index aa053d1bd..77e3f7674 100644 --- a/base_partner_sequence/data/partner_sequence.xml +++ b/base_partner_sequence/data/partner_sequence.xml @@ -1,11 +1,9 @@ - Partner code res.partner P/ 5 - diff --git a/base_partner_sequence/models/partner.py b/base_partner_sequence/models/partner.py index 9dea8b649..abb5c99e9 100644 --- a/base_partner_sequence/models/partner.py +++ b/base_partner_sequence/models/partner.py @@ -1,10 +1,28 @@ # -*- coding: utf-8 -*- -# Copyright 2004-2009 Tiny SPRL (). -# Copyright 2013 initOS GmbH & Co. KG (). -# Copyright 2016 Tecnativa - Vicent Cubells -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2013 initOS GmbH & Co. KG (). +# Author Thomas Rehn +# Copyright (C) 2016 Camptocamp SA (). +# +# 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, api, exceptions, _ +from odoo import api, models, exceptions, _ class ResPartner(models.Model): @@ -13,28 +31,49 @@ class ResPartner(models.Model): _inherit = 'res.partner' @api.model - def _needsRef(self, partner_id=None, vals=None): + def create(self, vals): + if not vals.get('ref') and self._needsRef(vals=vals): + vals['ref'] = self.env['ir.sequence'].next_by_code('res.partner') + return super(ResPartner, self).create(vals) + + @api.multi + def copy(self, default=None): + default = default or {} + if self._needsRef(): + default['ref'] = self.env['ir.sequence'].\ + next_by_code('res.partner') + return super(ResPartner, self).copy(default) + + @api.multi + def write(self, vals): + for partner in self: + if not vals.get('ref') and partner._needsRef(vals): + vals['ref'] = self.env['ir.sequence'].\ + next_by_code('res.partner') + super(ResPartner, partner).write(vals) + return True + + @api.multi + def _needsRef(self, vals=None): """ Checks whether a sequence value should be assigned to a partner's 'ref' - :param partner_id: id of the partner object + :param cr: database cursor + :param uid: current user id + :param id: id of the partner object :param vals: known field values of the partner object - :return: true if a sequence value should be assigned to the - partner's 'ref' + :return: true iff a sequence value should be assigned to the\ + partner's 'ref' """ - if not vals and not partner_id: - raise exceptions.Warning( - _('Either field values or an id must be provided.') - ) - if vals is None: - vals = {} - values = vals.copy() + if not vals and not self: # pragma: no cover + raise exceptions.UserError(_( + 'Either field values or an id must be provided.')) # only assign a 'ref' to commercial partners - if partner_id: - partner = self.browse(partner_id) - values.setdefault('is_company', partner.is_company) - values.setdefault('parent_id', partner.parent_id.id) - return values.get('is_company') or not values.get('parent_id') + if self: + vals = {} + vals['is_company'] = self.is_company + vals['parent_id'] = self.parent_id + return vals.get('is_company') or not vals.get('parent_id') @api.model def _commercial_fields(self): @@ -43,33 +82,3 @@ class ResPartner(models.Model): to the partner's contacts """ return super(ResPartner, self)._commercial_fields() + ['ref'] - - @api.model - def _get_next_ref(self, partner=None, vals=None): - return self.env['ir.sequence'].next_by_code('res.partner') - - @api.model - def create(self, vals): - if not vals.get('ref') and self._needsRef(vals=vals): - vals['ref'] = self._get_next_ref(vals=vals) - return super(ResPartner, self).create(vals) - - @api.multi - def write(self, vals): - for partner in self: - ref = vals.get('ref') if 'ref' in vals else partner.ref - if not ref and self._needsRef(partner.id, vals): - vals['ref'] = self._get_next_ref(partner, vals) - super(ResPartner, partner).write(vals) - return True - - @api.multi - def copy(self, default=None): - for partner in self: - default = default or {} - if self._needsRef(self.id): - default.update({ - 'ref': self._get_next_ref(), - }) - - return super(ResPartner, self).copy(default) From fdef315a958258c94c8508b1056059e1ff48786c Mon Sep 17 00:00:00 2001 From: Denis Leemann Date: Wed, 8 Mar 2017 10:22:10 +0100 Subject: [PATCH 10/13] fix sequence increase on 'partner.write()' --- base_partner_sequence/models/partner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base_partner_sequence/models/partner.py b/base_partner_sequence/models/partner.py index abb5c99e9..7924c2120 100644 --- a/base_partner_sequence/models/partner.py +++ b/base_partner_sequence/models/partner.py @@ -47,9 +47,11 @@ class ResPartner(models.Model): @api.multi def write(self, vals): for partner in self: - if not vals.get('ref') and partner._needsRef(vals): + if not vals.get('ref') and partner._needsRef(vals) and \ + not partner.ref: vals['ref'] = self.env['ir.sequence'].\ next_by_code('res.partner') + super(ResPartner, partner).write(vals) return True From a12b38082cca7b958bc90abc0b94d8960c2770e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pigeon=20=28ACSONE=29?= Date: Mon, 29 May 2017 13:05:15 +0200 Subject: [PATCH 11/13] [CHG] re-introduce _get_next_ref method to allow overriding (#417) --- base_partner_sequence/models/partner.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/base_partner_sequence/models/partner.py b/base_partner_sequence/models/partner.py index 7924c2120..9ddb630ca 100644 --- a/base_partner_sequence/models/partner.py +++ b/base_partner_sequence/models/partner.py @@ -30,18 +30,21 @@ class ResPartner(models.Model): _inherit = 'res.partner' + @api.multi + def _get_next_ref(self, vals=None): + return self.env['ir.sequence'].next_by_code('res.partner') + @api.model def create(self, vals): if not vals.get('ref') and self._needsRef(vals=vals): - vals['ref'] = self.env['ir.sequence'].next_by_code('res.partner') + vals['ref'] = self._get_next_ref(vals=vals) return super(ResPartner, self).create(vals) @api.multi def copy(self, default=None): default = default or {} if self._needsRef(): - default['ref'] = self.env['ir.sequence'].\ - next_by_code('res.partner') + default['ref'] = self._get_next_ref() return super(ResPartner, self).copy(default) @api.multi @@ -49,8 +52,7 @@ class ResPartner(models.Model): for partner in self: if not vals.get('ref') and partner._needsRef(vals) and \ not partner.ref: - vals['ref'] = self.env['ir.sequence'].\ - next_by_code('res.partner') + vals['ref'] = self._get_next_ref(vals=vals) super(ResPartner, partner).write(vals) return True From 98758cd8002c2c55fd3dd94a799665569fe5392b Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 30 Jan 2016 17:16:15 -0500 Subject: [PATCH 12/13] OCA Transbot updated translations from Transifex --- base_partner_sequence/i18n/am.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/ar.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/bg.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/bs.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/ca.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/cs.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/da.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/el_GR.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/en_GB.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/es.po | 29 ++++++++++++------------ base_partner_sequence/i18n/es_CR.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/es_EC.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/es_MX.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/es_VE.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/et.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/eu.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/fi.po | 31 ++++++++++++++++++++++++++ base_partner_sequence/i18n/fr.po | 28 +++++++++++------------ base_partner_sequence/i18n/fr_CA.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/fr_CH.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/gl.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/hr.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/hr_HR.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/hu.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/it.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/ja.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/lt.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/lv.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/mk.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/mn.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/nb.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/nb_NO.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/nl.po | 27 +++++++++++----------- base_partner_sequence/i18n/nl_BE.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/nl_NL.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/pl.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/pt.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/pt_PT.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/ro.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/ru.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/sk.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/sl.po | 26 ++++++++++----------- base_partner_sequence/i18n/sr@latin.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/sv.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/th.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/tr.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/tr_TR.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/vi.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/zh_CN.po | 30 +++++++++++++++++++++++++ base_partner_sequence/i18n/zh_TW.po | 30 +++++++++++++++++++++++++ 50 files changed, 1433 insertions(+), 58 deletions(-) create mode 100644 base_partner_sequence/i18n/am.po create mode 100644 base_partner_sequence/i18n/ar.po create mode 100644 base_partner_sequence/i18n/bg.po create mode 100644 base_partner_sequence/i18n/bs.po create mode 100644 base_partner_sequence/i18n/ca.po create mode 100644 base_partner_sequence/i18n/cs.po create mode 100644 base_partner_sequence/i18n/da.po create mode 100644 base_partner_sequence/i18n/el_GR.po create mode 100644 base_partner_sequence/i18n/en_GB.po create mode 100644 base_partner_sequence/i18n/es_CR.po create mode 100644 base_partner_sequence/i18n/es_EC.po create mode 100644 base_partner_sequence/i18n/es_MX.po create mode 100644 base_partner_sequence/i18n/es_VE.po create mode 100644 base_partner_sequence/i18n/et.po create mode 100644 base_partner_sequence/i18n/eu.po create mode 100644 base_partner_sequence/i18n/fi.po create mode 100644 base_partner_sequence/i18n/fr_CA.po create mode 100644 base_partner_sequence/i18n/fr_CH.po create mode 100644 base_partner_sequence/i18n/gl.po create mode 100644 base_partner_sequence/i18n/hr.po create mode 100644 base_partner_sequence/i18n/hr_HR.po create mode 100644 base_partner_sequence/i18n/hu.po create mode 100644 base_partner_sequence/i18n/it.po create mode 100644 base_partner_sequence/i18n/ja.po create mode 100644 base_partner_sequence/i18n/lt.po create mode 100644 base_partner_sequence/i18n/lv.po create mode 100644 base_partner_sequence/i18n/mk.po create mode 100644 base_partner_sequence/i18n/mn.po create mode 100644 base_partner_sequence/i18n/nb.po create mode 100644 base_partner_sequence/i18n/nb_NO.po create mode 100644 base_partner_sequence/i18n/nl_BE.po create mode 100644 base_partner_sequence/i18n/nl_NL.po create mode 100644 base_partner_sequence/i18n/pl.po create mode 100644 base_partner_sequence/i18n/pt.po create mode 100644 base_partner_sequence/i18n/pt_PT.po create mode 100644 base_partner_sequence/i18n/ro.po create mode 100644 base_partner_sequence/i18n/ru.po create mode 100644 base_partner_sequence/i18n/sk.po create mode 100644 base_partner_sequence/i18n/sr@latin.po create mode 100644 base_partner_sequence/i18n/sv.po create mode 100644 base_partner_sequence/i18n/th.po create mode 100644 base_partner_sequence/i18n/tr.po create mode 100644 base_partner_sequence/i18n/tr_TR.po create mode 100644 base_partner_sequence/i18n/vi.po create mode 100644 base_partner_sequence/i18n/zh_CN.po create mode 100644 base_partner_sequence/i18n/zh_TW.po diff --git a/base_partner_sequence/i18n/am.po b/base_partner_sequence/i18n/am.po new file mode 100644 index 000000000..7ee793570 --- /dev/null +++ b/base_partner_sequence/i18n/am.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: am\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "ተባባሪ" diff --git a/base_partner_sequence/i18n/ar.po b/base_partner_sequence/i18n/ar.po new file mode 100644 index 000000000..f5f027c4e --- /dev/null +++ b/base_partner_sequence/i18n/ar.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "الشريك" diff --git a/base_partner_sequence/i18n/bg.po b/base_partner_sequence/i18n/bg.po new file mode 100644 index 000000000..5b1a93172 --- /dev/null +++ b/base_partner_sequence/i18n/bg.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-31 01:39+0000\n" +"PO-Revision-Date: 2016-12-31 01:39+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:69 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Партньор" diff --git a/base_partner_sequence/i18n/bs.po b/base_partner_sequence/i18n/bs.po new file mode 100644 index 000000000..64dc31c0f --- /dev/null +++ b/base_partner_sequence/i18n/bs.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Bosnian (https://www.transifex.com/oca/teams/23907/bs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bs\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/ca.po b/base_partner_sequence/i18n/ca.po new file mode 100644 index 000000000..de0d379a4 --- /dev/null +++ b/base_partner_sequence/i18n/ca.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/cs.po b/base_partner_sequence/i18n/cs.po new file mode 100644 index 000000000..4fc1f008c --- /dev/null +++ b/base_partner_sequence/i18n/cs.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Czech (https://www.transifex.com/oca/teams/23907/cs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: cs\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Společník" diff --git a/base_partner_sequence/i18n/da.po b/base_partner_sequence/i18n/da.po new file mode 100644 index 000000000..ada1b86ff --- /dev/null +++ b/base_partner_sequence/i18n/da.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-21 03:40+0000\n" +"PO-Revision-Date: 2016-12-21 03:40+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Danish (https://www.transifex.com/oca/teams/23907/da/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: da\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:69 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/el_GR.po b/base_partner_sequence/i18n/el_GR.po new file mode 100644 index 000000000..a5d287893 --- /dev/null +++ b/base_partner_sequence/i18n/el_GR.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: el_GR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Συνεργάτης" diff --git a/base_partner_sequence/i18n/en_GB.po b/base_partner_sequence/i18n/en_GB.po new file mode 100644 index 000000000..c4b0c132a --- /dev/null +++ b/base_partner_sequence/i18n/en_GB.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: English (United Kingdom) (https://www.transifex.com/oca/teams/23907/en_GB/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en_GB\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/es.po b/base_partner_sequence/i18n/es.po index d20303d02..98e6fad17 100644 --- a/base_partner_sequence/i18n/es.po +++ b/base_partner_sequence/i18n/es.po @@ -3,15 +3,16 @@ # * base_partner_sequence # # Translators: -# Francisco Palm , 2015 +# OCA Transbot , 2017 +# Pedro M. Baeza , 2017 msgid "" msgstr "" -"Project-Id-Version: partner-contact (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-23 21:40+0000\n" -"PO-Revision-Date: 2015-09-13 14:50+0000\n" -"Last-Translator: Francisco Palm \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/es/)\n" +"POT-Creation-Date: 2017-11-21 01:48+0000\n" +"PO-Revision-Date: 2017-11-21 01:48+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,14 +20,12 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: base_partner_sequence -#: model:ir.model,name:base_partner_sequence.model_res_partner -msgid "Partner" -msgstr "Socio" +#: code:addons/base_partner_sequence/models/partner.py:73 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "Debe proveer algún valor o un ID." #. module: base_partner_sequence -#: view:res.partner:base_partner_sequence.view_partner_form -msgid "" -"{\n" -" 'readonly': [('is_company', '=', False),\n" -" ('parent_id', '!=', False)]}" -msgstr "{\n'readonly': [('is_company', '=', False),\n('parent_id', '!=', False)]}" +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/es_CR.po b/base_partner_sequence/i18n/es_CR.po new file mode 100644 index 000000000..e1ae8c940 --- /dev/null +++ b/base_partner_sequence/i18n/es_CR.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/oca/teams/23907/es_CR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_CR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/es_EC.po b/base_partner_sequence/i18n/es_EC.po new file mode 100644 index 000000000..db3c90b3a --- /dev/null +++ b/base_partner_sequence/i18n/es_EC.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Ecuador) (https://www.transifex.com/oca/teams/23907/es_EC/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_EC\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/es_MX.po b/base_partner_sequence/i18n/es_MX.po new file mode 100644 index 000000000..2db6106d0 --- /dev/null +++ b/base_partner_sequence/i18n/es_MX.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_MX\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/es_VE.po b/base_partner_sequence/i18n/es_VE.po new file mode 100644 index 000000000..f2767cc7d --- /dev/null +++ b/base_partner_sequence/i18n/es_VE.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Venezuela) (https://www.transifex.com/oca/teams/23907/es_VE/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_VE\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/et.po b/base_partner_sequence/i18n/et.po new file mode 100644 index 000000000..0eb77bfc6 --- /dev/null +++ b/base_partner_sequence/i18n/et.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Estonian (https://www.transifex.com/oca/teams/23907/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/eu.po b/base_partner_sequence/i18n/eu.po new file mode 100644 index 000000000..54f72902d --- /dev/null +++ b/base_partner_sequence/i18n/eu.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Basque (https://www.transifex.com/oca/teams/23907/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: eu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Kidea" diff --git a/base_partner_sequence/i18n/fi.po b/base_partner_sequence/i18n/fi.po new file mode 100644 index 000000000..b52155278 --- /dev/null +++ b/base_partner_sequence/i18n/fi.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: partner-contact (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-19 01:46+0000\n" +"PO-Revision-Date: 2015-05-21 21:57+0000\n" +"Last-Translator: <>\n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Kumppani" + +#. module: base_partner_sequence +#: view:res.partner:base_partner_sequence.view_partner_form +msgid "" +"{\n" +" 'readonly': [('is_company', '=', False),\n" +" ('parent_id', '!=', False)]}" +msgstr "" diff --git a/base_partner_sequence/i18n/fr.po b/base_partner_sequence/i18n/fr.po index 19911d7c7..c7d4c7a6c 100644 --- a/base_partner_sequence/i18n/fr.po +++ b/base_partner_sequence/i18n/fr.po @@ -3,15 +3,15 @@ # * base_partner_sequence # # Translators: -# Bruno JOLIVEAU, 2015 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: partner-contact (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-28 15:54+0000\n" -"PO-Revision-Date: 2015-08-19 15:15+0000\n" -"Last-Translator: Bruno JOLIVEAU\n" -"Language-Team: French (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/fr/)\n" +"POT-Creation-Date: 2017-11-21 01:48+0000\n" +"PO-Revision-Date: 2017-11-21 01:48+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,14 +19,12 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: base_partner_sequence -#: model:ir.model,name:base_partner_sequence.model_res_partner -msgid "Partner" -msgstr "Partenaire" +#: code:addons/base_partner_sequence/models/partner.py:73 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" #. module: base_partner_sequence -#: view:res.partner:base_partner_sequence.view_partner_form -msgid "" -"{\n" -" 'readonly': [('is_company', '=', False),\n" -" ('parent_id', '!=', False)]}" -msgstr "" +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Contact" diff --git a/base_partner_sequence/i18n/fr_CA.po b/base_partner_sequence/i18n/fr_CA.po new file mode 100644 index 000000000..ecde352d6 --- /dev/null +++ b/base_partner_sequence/i18n/fr_CA.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (Canada) (https://www.transifex.com/oca/teams/23907/fr_CA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr_CA\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partenaire" diff --git a/base_partner_sequence/i18n/fr_CH.po b/base_partner_sequence/i18n/fr_CH.po new file mode 100644 index 000000000..686c41bef --- /dev/null +++ b/base_partner_sequence/i18n/fr_CH.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (Switzerland) (https://www.transifex.com/oca/teams/23907/fr_CH/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr_CH\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partenaire" diff --git a/base_partner_sequence/i18n/gl.po b/base_partner_sequence/i18n/gl.po new file mode 100644 index 000000000..a2225ccf3 --- /dev/null +++ b/base_partner_sequence/i18n/gl.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: gl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/base_partner_sequence/i18n/hr.po b/base_partner_sequence/i18n/hr.po new file mode 100644 index 000000000..c56ed808b --- /dev/null +++ b/base_partner_sequence/i18n/hr.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-31 01:39+0000\n" +"PO-Revision-Date: 2016-12-31 01:39+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:69 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/hr_HR.po b/base_partner_sequence/i18n/hr_HR.po new file mode 100644 index 000000000..c5714c7ef --- /dev/null +++ b/base_partner_sequence/i18n/hr_HR.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 03:41+0000\n" +"PO-Revision-Date: 2017-05-31 03:41+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_HR\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:73 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "Mora biti upisana vrijedonst u polju ili postojati ID partnera" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/hu.po b/base_partner_sequence/i18n/hu.po new file mode 100644 index 000000000..4e5a0f3f4 --- /dev/null +++ b/base_partner_sequence/i18n/hu.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/it.po b/base_partner_sequence/i18n/it.po new file mode 100644 index 000000000..5a6822300 --- /dev/null +++ b/base_partner_sequence/i18n/it.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 03:41+0000\n" +"PO-Revision-Date: 2017-05-31 03:41+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:73 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "Devono essere forniti i valori dei campi o un identificativo" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/ja.po b/base_partner_sequence/i18n/ja.po new file mode 100644 index 000000000..20b5e19a2 --- /dev/null +++ b/base_partner_sequence/i18n/ja.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Japanese (https://www.transifex.com/oca/teams/23907/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "パートナ" diff --git a/base_partner_sequence/i18n/lt.po b/base_partner_sequence/i18n/lt.po new file mode 100644 index 000000000..a26275ab5 --- /dev/null +++ b/base_partner_sequence/i18n/lt.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: lt\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partneris" diff --git a/base_partner_sequence/i18n/lv.po b/base_partner_sequence/i18n/lv.po new file mode 100644 index 000000000..c41d4e99b --- /dev/null +++ b/base_partner_sequence/i18n/lv.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Latvian (https://www.transifex.com/oca/teams/23907/lv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: lv\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partneris" diff --git a/base_partner_sequence/i18n/mk.po b/base_partner_sequence/i18n/mk.po new file mode 100644 index 000000000..64b50c1ab --- /dev/null +++ b/base_partner_sequence/i18n/mk.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Macedonian (https://www.transifex.com/oca/teams/23907/mk/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: mk\n" +"Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Партнер" diff --git a/base_partner_sequence/i18n/mn.po b/base_partner_sequence/i18n/mn.po new file mode 100644 index 000000000..0d76bf6e4 --- /dev/null +++ b/base_partner_sequence/i18n/mn.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Mongolian (https://www.transifex.com/oca/teams/23907/mn/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: mn\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Харилцагч" diff --git a/base_partner_sequence/i18n/nb.po b/base_partner_sequence/i18n/nb.po new file mode 100644 index 000000000..1d5f2a69e --- /dev/null +++ b/base_partner_sequence/i18n/nb.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Norwegian Bokmål (https://www.transifex.com/oca/teams/23907/nb/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nb\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/nb_NO.po b/base_partner_sequence/i18n/nb_NO.po new file mode 100644 index 000000000..4e6b8aabb --- /dev/null +++ b/base_partner_sequence/i18n/nb_NO.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/teams/23907/nb_NO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nb_NO\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/nl.po b/base_partner_sequence/i18n/nl.po index b1e4c66aa..4c25db464 100644 --- a/base_partner_sequence/i18n/nl.po +++ b/base_partner_sequence/i18n/nl.po @@ -3,14 +3,15 @@ # * base_partner_sequence # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: partner-contact (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-23 21:40+0000\n" -"PO-Revision-Date: 2015-10-01 12:32+0000\n" -"Last-Translator: Maxime Chambreuil \n" -"Language-Team: Dutch (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/nl/)\n" +"POT-Creation-Date: 2017-11-21 01:48+0000\n" +"PO-Revision-Date: 2017-11-21 01:48+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -18,14 +19,12 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: base_partner_sequence -#: model:ir.model,name:base_partner_sequence.model_res_partner -msgid "Partner" -msgstr "Partner" +#: code:addons/base_partner_sequence/models/partner.py:73 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" #. module: base_partner_sequence -#: view:res.partner:base_partner_sequence.view_partner_form -msgid "" -"{\n" -" 'readonly': [('is_company', '=', False),\n" -" ('parent_id', '!=', False)]}" -msgstr "" +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Relatie" diff --git a/base_partner_sequence/i18n/nl_BE.po b/base_partner_sequence/i18n/nl_BE.po new file mode 100644 index 000000000..da4f0328f --- /dev/null +++ b/base_partner_sequence/i18n/nl_BE.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (Belgium) (https://www.transifex.com/oca/teams/23907/nl_BE/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_BE\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Relatie" diff --git a/base_partner_sequence/i18n/nl_NL.po b/base_partner_sequence/i18n/nl_NL.po new file mode 100644 index 000000000..975f2f7c7 --- /dev/null +++ b/base_partner_sequence/i18n/nl_NL.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-10 01:50+0000\n" +"PO-Revision-Date: 2017-06-10 01:50+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:73 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Relatie" diff --git a/base_partner_sequence/i18n/pl.po b/base_partner_sequence/i18n/pl.po new file mode 100644 index 000000000..e48b7ad51 --- /dev/null +++ b/base_partner_sequence/i18n/pl.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Polish (https://www.transifex.com/oca/teams/23907/pl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pl\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>=14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/pt.po b/base_partner_sequence/i18n/pt.po new file mode 100644 index 000000000..64b49ae85 --- /dev/null +++ b/base_partner_sequence/i18n/pt.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# Tiago Baptista , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-21 03:40+0000\n" +"PO-Revision-Date: 2016-12-21 03:40+0000\n" +"Last-Translator: Tiago Baptista , 2016\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:69 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Parceiro" diff --git a/base_partner_sequence/i18n/pt_PT.po b/base_partner_sequence/i18n/pt_PT.po new file mode 100644 index 000000000..da646a673 --- /dev/null +++ b/base_partner_sequence/i18n/pt_PT.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# Tiago Baptista , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-20 18:18+0000\n" +"PO-Revision-Date: 2017-01-20 18:18+0000\n" +"Last-Translator: Tiago Baptista , 2017\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:69 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Parceiro" diff --git a/base_partner_sequence/i18n/ro.po b/base_partner_sequence/i18n/ro.po new file mode 100644 index 000000000..dd635d1e2 --- /dev/null +++ b/base_partner_sequence/i18n/ro.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ro\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partener" diff --git a/base_partner_sequence/i18n/ru.po b/base_partner_sequence/i18n/ru.po new file mode 100644 index 000000000..63957857e --- /dev/null +++ b/base_partner_sequence/i18n/ru.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Russian (https://www.transifex.com/oca/teams/23907/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Контрагент" diff --git a/base_partner_sequence/i18n/sk.po b/base_partner_sequence/i18n/sk.po new file mode 100644 index 000000000..5ed13d87c --- /dev/null +++ b/base_partner_sequence/i18n/sk.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovak (https://www.transifex.com/oca/teams/23907/sk/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sk\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/sl.po b/base_partner_sequence/i18n/sl.po index 6d9894c0e..50b45f20f 100644 --- a/base_partner_sequence/i18n/sl.po +++ b/base_partner_sequence/i18n/sl.po @@ -3,30 +3,28 @@ # * base_partner_sequence # # Translators: -# Matjaž Mozetič , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: partner-contact (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-28 15:54+0000\n" -"PO-Revision-Date: 2015-05-28 07:14+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-partner-contact-8-0/language/sl/)\n" +"POT-Creation-Date: 2016-12-21 03:40+0000\n" +"PO-Revision-Date: 2016-12-21 03:40+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Language: sl\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:69 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + #. module: base_partner_sequence #: model:ir.model,name:base_partner_sequence.model_res_partner msgid "Partner" msgstr "Partner" - -#. module: base_partner_sequence -#: view:res.partner:base_partner_sequence.view_partner_form -msgid "" -"{\n" -" 'readonly': [('is_company', '=', False),\n" -" ('parent_id', '!=', False)]}" -msgstr "{\n 'readonly': [('is_company', '=', False),\n ('parent_id', '!=', False)]}" diff --git a/base_partner_sequence/i18n/sr@latin.po b/base_partner_sequence/i18n/sr@latin.po new file mode 100644 index 000000000..d8b8cc1c0 --- /dev/null +++ b/base_partner_sequence/i18n/sr@latin.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Serbian (Latin) (https://www.transifex.com/oca/teams/23907/sr@latin/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sr@latin\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/base_partner_sequence/i18n/sv.po b/base_partner_sequence/i18n/sv.po new file mode 100644 index 000000000..be777d0da --- /dev/null +++ b/base_partner_sequence/i18n/sv.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Swedish (https://www.transifex.com/oca/teams/23907/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Företag" diff --git a/base_partner_sequence/i18n/th.po b/base_partner_sequence/i18n/th.po new file mode 100644 index 000000000..45fc638e2 --- /dev/null +++ b/base_partner_sequence/i18n/th.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Thai (https://www.transifex.com/oca/teams/23907/th/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: th\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "พาร์ทเนอร์" diff --git a/base_partner_sequence/i18n/tr.po b/base_partner_sequence/i18n/tr.po new file mode 100644 index 000000000..090cf1c38 --- /dev/null +++ b/base_partner_sequence/i18n/tr.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "İş Ortağı" diff --git a/base_partner_sequence/i18n/tr_TR.po b/base_partner_sequence/i18n/tr_TR.po new file mode 100644 index 000000000..b81a2a9ba --- /dev/null +++ b/base_partner_sequence/i18n/tr_TR.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr_TR\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Ortak" diff --git a/base_partner_sequence/i18n/vi.po b/base_partner_sequence/i18n/vi.po new file mode 100644 index 000000000..98df599ea --- /dev/null +++ b/base_partner_sequence/i18n/vi.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Vietnamese (https://www.transifex.com/oca/teams/23907/vi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: vi\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "Đối tác" diff --git a/base_partner_sequence/i18n/zh_CN.po b/base_partner_sequence/i18n/zh_CN.po new file mode 100644 index 000000000..6b4f06b5c --- /dev/null +++ b/base_partner_sequence/i18n/zh_CN.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "业务伙伴" diff --git a/base_partner_sequence/i18n/zh_TW.po b/base_partner_sequence/i18n/zh_TW.po new file mode 100644 index 000000000..06430b262 --- /dev/null +++ b/base_partner_sequence/i18n/zh_TW.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_partner_sequence +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-10 03:39+0000\n" +"PO-Revision-Date: 2017-03-10 03:39+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Chinese (Taiwan) (https://www.transifex.com/oca/teams/23907/zh_TW/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_TW\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: base_partner_sequence +#: code:addons/base_partner_sequence/models/partner.py:71 +#, python-format +msgid "Either field values or an id must be provided." +msgstr "" + +#. module: base_partner_sequence +#: model:ir.model,name:base_partner_sequence.model_res_partner +msgid "Partner" +msgstr "夥伴" From fb17b9058cab5be97dbfc3cda49b05f4b768f2cc Mon Sep 17 00:00:00 2001 From: jesusVMayor Date: Wed, 13 Dec 2017 18:38:31 +0100 Subject: [PATCH 13/13] [MIG]migration of base_partner_sequence --- base_partner_sequence/__init__.py | 2 +- base_partner_sequence/__manifest__.py | 3 +-- base_partner_sequence/models/__init__.py | 2 +- base_partner_sequence/models/partner.py | 32 ++++-------------------- 4 files changed, 8 insertions(+), 31 deletions(-) diff --git a/base_partner_sequence/__init__.py b/base_partner_sequence/__init__.py index 062d23fcc..0b9e04a87 100644 --- a/base_partner_sequence/__init__.py +++ b/base_partner_sequence/__init__.py @@ -1,7 +1,7 @@ -# -*- coding: utf-8 -*- # Copyright 2004-2009 Tiny SPRL (). # Copyright 2013 initOS GmbH & Co. KG (). # Copyright 2016 Tecnativa - Vicent Cubells +# Copyright 2016 Camptocamp - Akim Juillerat (). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/base_partner_sequence/__manifest__.py b/base_partner_sequence/__manifest__.py index 39f656ce6..867b9b6ed 100644 --- a/base_partner_sequence/__manifest__.py +++ b/base_partner_sequence/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2004-2009 Tiny SPRL (). # Copyright 2013 initOS GmbH & Co. KG (). # Copyright 2016 Tecnativa - Vicent Cubells @@ -11,7 +10,7 @@ "Odoo Community Association (OCA), " "Camptocamp, ", "name": "Add a sequence on customers' code", - "version": "10.0.1.0.0", + "version": "11.0.1.0.0", "category": "Generic Modules/Base", "website": "http://www.initos.com", "depends": [ diff --git a/base_partner_sequence/models/__init__.py b/base_partner_sequence/models/__init__.py index 9e8bfde26..0ebe9647a 100644 --- a/base_partner_sequence/models/__init__.py +++ b/base_partner_sequence/models/__init__.py @@ -1,7 +1,7 @@ -# -*- coding: utf-8 -*- # Copyright 2004-2009 Tiny SPRL (). # Copyright 2013 initOS GmbH & Co. KG (). # Copyright 2016 Tecnativa - Vicent Cubells +# Copyright 2016 Camptocamp - Akim Juillerat (). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import partner diff --git a/base_partner_sequence/models/partner.py b/base_partner_sequence/models/partner.py index 9ddb630ca..8a3c74b84 100644 --- a/base_partner_sequence/models/partner.py +++ b/base_partner_sequence/models/partner.py @@ -1,26 +1,8 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# Copyright (C) 2013 initOS GmbH & Co. KG (). -# Author Thomas Rehn -# Copyright (C) 2016 Camptocamp SA (). -# -# 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 . -# -############################################################################## +# Copyright 2004-2009 Tiny SPRL (). +# Copyright 2013 initOS GmbH & Co. KG (). +# Copyright 2016 Tecnativa - Vicent Cubells +# Copyright 2016 Camptocamp - Akim Juillerat (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models, exceptions, _ @@ -53,7 +35,6 @@ class ResPartner(models.Model): if not vals.get('ref') and partner._needsRef(vals) and \ not partner.ref: vals['ref'] = self._get_next_ref(vals=vals) - super(ResPartner, partner).write(vals) return True @@ -62,9 +43,6 @@ class ResPartner(models.Model): """ Checks whether a sequence value should be assigned to a partner's 'ref' - :param cr: database cursor - :param uid: current user id - :param id: id of the partner object :param vals: known field values of the partner object :return: true iff a sequence value should be assigned to the\ partner's 'ref'