From f9d00d736aa758d41559a5d026dcf7f8edde4000 Mon Sep 17 00:00:00 2001 From: jesusVMayor Date: Wed, 13 Dec 2017 18:38:31 +0100 Subject: [PATCH] [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'