Browse Source

[MIG]migration of base_partner_sequence

pull/668/head
jesusVMayor 7 years ago
committed by Quentin Groulard
parent
commit
f9d00d736a
  1. 2
      base_partner_sequence/__init__.py
  2. 3
      base_partner_sequence/__manifest__.py
  3. 2
      base_partner_sequence/models/__init__.py
  4. 32
      base_partner_sequence/models/partner.py

2
base_partner_sequence/__init__.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
# Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2016 Camptocamp - Akim Juillerat (<http://www.camptocamp.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

3
base_partner_sequence/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
# 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": [

2
base_partner_sequence/models/__init__.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
# Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2016 Camptocamp - Akim Juillerat (<http://www.camptocamp.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import partner

32
base_partner_sequence/models/partner.py

@ -1,26 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
# Author Thomas Rehn <thomas.rehn at initos.com>
# Copyright (C) 2016 Camptocamp SA (<http://www.camptocamp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright 2013 initOS GmbH & Co. KG (<http://www.initos.com>).
# Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2016 Camptocamp - Akim Juillerat (<http://www.camptocamp.com>).
# 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'

Loading…
Cancel
Save