Merge lp:~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by Jonatan Cloutier
Status: Rejected
Rejected by: Maxime Chambreuil (http://www.savoirfairelinux.com)
Proposed branch: lp:~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 171 lines (+145/-0)
5 files modified
product_unique_internal_reference/__init__.py (+24/-0)
product_unique_internal_reference/__openerp__.py (+39/-0)
product_unique_internal_reference/i18n/fr.po (+27/-0)
product_unique_internal_reference/i18n/product_unique_internal_reference.pot (+27/-0)
product_unique_internal_reference/product_unique_internal_reference.py (+28/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openerp-product-attributes/product_unique_internal_reference
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Disapprove
Stefan Rijnhart (Opener) Needs Fixing
Joao Alfredo Gama Batista Needs Fixing
Review via email: mp+156649@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Joao Alfredo Gama Batista (joao-gama) wrote :

Hi Jonatan,

In the file __openerp__.py the license in the header is the AGPL but in your __init__.py file the licese is GPL. Please make sure that all file headers use the same license.

review: Needs Fixing
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

There are already two modules on apps.openerp.com that do this. Not saying that it is not useful to have one in the community project, but what you can learn from them is that they make sure to add a ' (copy)' suffix when copying a product. Presumably the constraint would make it impossible to copy a product otherwise. Can you do so too?

review: Needs Fixing
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Set as 'Work in progress', without response from the author since 2 months.

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :
review: Disapprove
Revision history for this message
debaetsr (rubendebaets) wrote :

Hey,

I guess I found something really useful for you, take a look, you won't regret <http://actual.rodgibbons.com/e4fkgcw>

ruben

Unmerged revisions

205. By Jonatan Cloutier

Add product_unique_internal_reference module

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import product_unique_internal_reference
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
24
025
=== 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 @@
1# -*- encoding: utf-8 -*-
2
3##############################################################################
4#
5# OpenERP, Open Source Management Solution
6# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23{
24 'name' : 'Product unique internal reference',
25 'version' : '1.0',
26 "author" : "Savoir-faire Linux",
27 "website" : "http://www.savoirfairelinux.com",
28 'license': 'AGPL-3',
29 'category' : 'Sales Management',
30 'depends' : ['product'],
31 'description': """
32Make the Internal reference unique.
33""",
34 'data' : [],
35 'auto_install': False,
36 'installable': True
37}
38# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
39
040
=== 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 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * product_unique_internal_reference
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-03-26 16:23+0000\n"
10"PO-Revision-Date: 2013-03-26 15:06-0500\n"
11"Last-Translator: Marc Cassuto <marc.cassuto@savoirfairelinux.com>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17
18#. module: product_unique_internal_reference
19#: model:ir.model,name:product_unique_internal_reference.model_product_product
20msgid "Product"
21msgstr "Produit"
22
23#. module: product_unique_internal_reference
24#: sql_constraint:product.product:0
25msgid "Internal Reference must be unique."
26msgstr "La référence internet doit être unique."
27
028
=== 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 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * product_unique_internal_reference
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-03-26 16:23+0000\n"
10"PO-Revision-Date: 2013-03-26 16:23+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: product_unique_internal_reference
19#: model:ir.model,name:product_unique_internal_reference.model_product_product
20msgid "Product"
21msgstr ""
22
23#. module: product_unique_internal_reference
24#: sql_constraint:product.product:0
25msgid "Internal Reference must be unique."
26msgstr ""
27
028
=== 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 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import fields, orm
23
24class product_product(orm.Model):
25 _inherit = 'product.product'
26
27 _sql_constraints = [ ('default_code_unique', 'unique (default_code)', "Internal Reference must be unique.") ]
28# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches