diff --git a/__unported__/crm_claim_categ_as_name/__init__.py b/__unported__/crm_claim_categ_as_name/__init__.py deleted file mode 100644 index 0170dbc3..00000000 --- a/__unported__/crm_claim_categ_as_name/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################### -# # -# crm_claim_categ_as_name for OpenERP # -# Copyright (C) 2012 Akretion Benoît GUILLOT # -# # -# 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 . # -# # -############################################################################### - -import crm_claim_rma - diff --git a/__unported__/crm_claim_categ_as_name/__openerp__.py b/__unported__/crm_claim_categ_as_name/__openerp__.py deleted file mode 100644 index ab3b243a..00000000 --- a/__unported__/crm_claim_categ_as_name/__openerp__.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################### -# # -# crm_claim_categ_as_name for OpenERP # -# Copyright (C) 2012 Akretion Benoît GUILLOT # -# # -# 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': 'crm_claim_categ_as_name', - 'version': '1.0', - 'category': 'Generic Modules/CRM & SRM', - 'license': 'AGPL-3', - 'description': """ - - """, - 'author': 'akretion', - 'website': 'http://www.akretion.com/', - 'depends': ['crm_claim_rma'], - 'init_xml': [], - 'update_xml': [ - 'crm_claim_rma_view.xml', - ], - 'demo_xml': [], - 'installable': False, - 'active': False, -} - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/__unported__/crm_claim_categ_as_name/crm_claim_rma.py b/__unported__/crm_claim_categ_as_name/crm_claim_rma.py deleted file mode 100644 index 6fd0a13e..00000000 --- a/__unported__/crm_claim_categ_as_name/crm_claim_rma.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################### -# # -# crm_claim_categ_as_name for OpenERP # -# Copyright (C) 2012 Akretion Benoît GUILLOT # -# # -# 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 osv import fields, osv - -class crm_claim(osv.osv): - _inherit = 'crm.claim' - - _columns = { - 'name': fields.related('categ_id', 'name', relation='crm.case.categ', type='char', string='Claim Subject', size=128, store=True), - 'categ_id': fields.many2one('crm.case.categ', 'Category', \ - domain="[('section_id','=',section_id),\ - ('object_id.model', '=', 'crm.claim')]", required=True), - } - \ No newline at end of file diff --git a/crm_claim_categ_as_name/__init__.py b/crm_claim_categ_as_name/__init__.py new file mode 100644 index 00000000..6877a51a --- /dev/null +++ b/crm_claim_categ_as_name/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Module for OpenERP +# Copyright (C) 2012-2014 Akretion. All Rights Reserved +# @author Benoît GUILLOT +# +# 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 claim diff --git a/crm_claim_categ_as_name/__openerp__.py b/crm_claim_categ_as_name/__openerp__.py new file mode 100644 index 00000000..72e77811 --- /dev/null +++ b/crm_claim_categ_as_name/__openerp__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Module for OpenERP +# Copyright (C) 2012-2014 Akretion. All Rights Reserved +# @author Benoît GUILLOT +# +# 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': 'crm_claim_categ_as_name', + 'version': '1.0', + 'category': 'Generic Modules/CRM & SRM', + 'license': 'AGPL-3', + 'description': + """ + Replace claim name by category. It makes easier to filter on claims. + """, + 'author': 'akretion', + 'website': 'http://www.akretion.com/', + 'depends': ['crm_claim_rma'], + 'data': [ + 'claim_view.xml', + ], + 'demo': [], + 'installable': True, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/crm_claim_categ_as_name/claim.py b/crm_claim_categ_as_name/claim.py new file mode 100644 index 00000000..01beec75 --- /dev/null +++ b/crm_claim_categ_as_name/claim.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Module for OpenERP +# Copyright (C) 2012-2014 Akretion. All Rights Reserved +# @author Benoît GUILLOT +# +# 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 fields, orm + + +class crm_claim(orm.Model): + _inherit = 'crm.claim' + + _columns = { + 'name': fields.related( + 'categ_id', + 'name', + relation='crm.case.categ', + type='char', + string='Claim Subject', + size=128, + store=True), + 'categ_id': fields.many2one( + 'crm.case.categ', + 'Category', + domain="[('section_id', '=', section_id), \ + ('object_id.model', '=', 'crm.claim')]", + required=True), + } diff --git a/__unported__/crm_claim_categ_as_name/crm_claim_rma_view.xml b/crm_claim_categ_as_name/claim_view.xml similarity index 52% rename from __unported__/crm_claim_categ_as_name/crm_claim_rma_view.xml rename to crm_claim_categ_as_name/claim_view.xml index 559dc4fd..4b344d20 100644 --- a/__unported__/crm_claim_categ_as_name/crm_claim_rma_view.xml +++ b/crm_claim_categ_as_name/claim_view.xml @@ -1,7 +1,7 @@ @@ -10,12 +10,12 @@ CRM - Claim product return Form crm.claim - + - - - - + + + +