openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #02493
lp:~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference into lp:openerp-product-attributes
Jonatan Cloutier has proposed merging lp:~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference into lp:openerp-product-attributes.
Requested reviews:
Product Core Editors (product-core-editors)
For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference/+merge/156649
--
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference/+merge/156649
Your team OpenERP Community is subscribed to branch lp:openerp-product-attributes.
=== added directory 'product_unique_internal_reference'
=== added file 'product_unique_internal_reference/__init__.py'
--- product_unique_internal_reference/__init__.py 1970-01-01 00:00:00 +0000
+++ product_unique_internal_reference/__init__.py 2013-04-02 17:43:25 +0000
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import product_unique_internal_reference
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added file 'product_unique_internal_reference/__openerp__.py'
--- product_unique_internal_reference/__openerp__.py 1970-01-01 00:00:00 +0000
+++ product_unique_internal_reference/__openerp__.py 2013-04-02 17:43:25 +0000
@@ -0,0 +1,39 @@
+# -*- encoding: utf-8 -*-
+
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.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/>.
+#
+##############################################################################
+
+{
+ 'name' : 'Product unique internal reference',
+ 'version' : '1.0',
+ "author" : "Savoir-faire Linux",
+ "website" : "http://www.savoirfairelinux.com",
+ 'license': 'AGPL-3',
+ 'category' : 'Sales Management',
+ 'depends' : ['product'],
+ 'description': """
+Make the Internal reference unique.
+""",
+ 'data' : [],
+ 'auto_install': False,
+ 'installable': True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added directory 'product_unique_internal_reference/i18n'
=== added file 'product_unique_internal_reference/i18n/fr.po'
--- product_unique_internal_reference/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ product_unique_internal_reference/i18n/fr.po 2013-04-02 17:43:25 +0000
@@ -0,0 +1,27 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_unique_internal_reference
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-03-26 16:23+0000\n"
+"PO-Revision-Date: 2013-03-26 15:06-0500\n"
+"Last-Translator: Marc Cassuto <marc.cassuto@xxxxxxxxxxxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: product_unique_internal_reference
+#: model:ir.model,name:product_unique_internal_reference.model_product_product
+msgid "Product"
+msgstr "Produit"
+
+#. module: product_unique_internal_reference
+#: sql_constraint:product.product:0
+msgid "Internal Reference must be unique."
+msgstr "La référence internet doit être unique."
+
=== added file 'product_unique_internal_reference/i18n/product_unique_internal_reference.pot'
--- product_unique_internal_reference/i18n/product_unique_internal_reference.pot 1970-01-01 00:00:00 +0000
+++ product_unique_internal_reference/i18n/product_unique_internal_reference.pot 2013-04-02 17:43:25 +0000
@@ -0,0 +1,27 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * product_unique_internal_reference
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-03-26 16:23+0000\n"
+"PO-Revision-Date: 2013-03-26 16:23+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: product_unique_internal_reference
+#: model:ir.model,name:product_unique_internal_reference.model_product_product
+msgid "Product"
+msgstr ""
+
+#. module: product_unique_internal_reference
+#: sql_constraint:product.product:0
+msgid "Internal Reference must be unique."
+msgstr ""
+
=== added file 'product_unique_internal_reference/product_unique_internal_reference.py'
--- product_unique_internal_reference/product_unique_internal_reference.py 1970-01-01 00:00:00 +0000
+++ product_unique_internal_reference/product_unique_internal_reference.py 2013-04-02 17:43:25 +0000
@@ -0,0 +1,28 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from openerp.osv import fields, orm
+
+class product_product(orm.Model):
+ _inherit = 'product.product'
+
+ _sql_constraints = [ ('default_code_unique', 'unique (default_code)', "Internal Reference must be unique.") ]
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Follow ups